From 22099ad780b327bf9cb4c5dc8bca7e76c1d8c3c2 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Wed, 28 Oct 2020 10:41:06 -0700 Subject: [PATCH 01/20] Implemented initial functions for flash loan to short swap. --- .../connectors/Uniswap/UniswapConnector.sol | 215 +++++++++++++++++- 1 file changed, 214 insertions(+), 1 deletion(-) diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index b5630320..68f0eb8f 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -6,12 +6,19 @@ pragma solidity >=0.6.0; */ // Uniswap +import { + IUniswapV2Callee +} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol"; import { IUniswapV2Router02 } from "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import { IUniswapV2Factory } from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; +import { + UniswapV2Library, + IUniswapV2Pair +} from "@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol"; // Primitive import { IOption } from "../../option/interfaces/IOption.sol"; import { IRegistry } from "../../option/interfaces/IRegistry.sol"; @@ -27,7 +34,7 @@ import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; -contract UniswapConnector is Ownable, ReentrancyGuard { +contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { using SafeMath for uint256; using SafeERC20 for IERC20; @@ -35,7 +42,9 @@ contract UniswapConnector is Ownable, ReentrancyGuard { IUniswapV2Factory public factory; ITrader public trader; IRegistry public registry; + address public quoteToken; // Designated stablecoin for Primitive. + address public constant WETH = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"; event Initialized(address indexed from, address indexed quoteToken); event UpdatedRouter(address indexed from, address indexed newRouter); @@ -171,6 +180,210 @@ contract UniswapConnector is Ownable, ReentrancyGuard { return success; } + /** + * @dev Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens. + * @notice If the first address in the path is not the redeemToken address, the tx will fail. + * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens + * @param optionToken The address of the Option contract. + * @param amountIn The quantity of options to mint. + * @param amountOutMin The minimum quantity of tokens to receive in exchange for the redeemTokens. + * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken. + * @param to The address to send the redeemToken proceeds and optionTokens to. + * @param deadline The timestamp for a trade to fail at if not successful. + * @return bool Whether the transaction was successful or not. + */ + function mintShortOptionsThenSwapToTokens( + IOption optionToken, + uint256 amountIn, + uint256 amountOutMin, + address[] calldata path, + address to, + uint256 deadline + ) public returns (bool) { + // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract. + // Mints option and redeem tokens to this contract. + (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( + optionToken, + amountIn, + address(this) + ); + + // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender. + // Reverts if the first address in the path is not the optionToken address. + address redeemToken = optionToken.redeemToken(); + (, bool success) = _swapExactOptionsForTokens( + redeemToken, + outputRedeems, // shortOptionTokens = redeemTokens + amountOutMin, + path, + to, + deadline + ); + // Fail early if the swap failed. + require(success, "ERR_SWAP_FAILED"); + + // Send optionTokens (long options) to the "to" address. + IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens + return success; + } + + /** + * @dev Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference. + * @notice If the first address in the path is not the redeemToken address, the tx will fail. + * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens + * @param optionToken The address of the Option contract. + * @param amountIn The quantity of options to mint. + * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens. + * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken. + * @param to The address to send the redeemToken proceeds and optionTokens to. + * @param deadline The timestamp for a trade to fail at if not successful. + * @return bool Whether the transaction was successful or not. + */ + function flashloanMintShortOptionsThenSwap( + IOption optionToken, + uint256 flashLoanQuantity, + uint256 amountOutMin, + address[] calldata path, + address to, + uint256 deadline + ) public returns (bool) { + require(flashLoanQuantity > 0, "ERR_ZERO"); + // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. + + // Mints option and redeem tokens to this contract. + // Store in memory for gas savings. + ITrader trader_ = trader; + address underlyingToken = optionToken.getUnderlyingTokenAddress(); + address redeemToken = optionToken.redeemToken(); + + // Approve underlyingTokens to be sent to the Primitive Trader contract. + IERC20(underlyingToken).approve(address(trader_), uint256(-1)); + + // Mint optionTokens using the underlyingTokens received from UniswapV2 flashloan. + // Sends underlyingTokens from this contract and to the optionToken contract, then calls mintOptions. + // This contract receives the newly minted option and redeem tokens. + IERC20(underlyingToken).safeTransfer( + address(optionToken), + flashLoanQuantity + ); + (uint256 outputOptions, uint256 outputRedeems) = optionToken + .mintOptions(address(this)); + + // Need to pay back the UniswapV2 flash loan by selling the redeemToken, then paying the remainder. + + // Swaps redeemTokens to the token specified at the end of the path, then sends to UniswapV2Pair. + // Reverts if the first address in the path is not the redeemToken address. + // Reverts if the last address in the path is not the underlyingToken address. + // path[0] = redeemToken, path[1] = dai, path[2] = underlyingToken + require(path[2] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); + (uint256[] memory amounts, bool success) = _swapExactOptionsForTokens( + redeemToken, + outputRedeems, // shortOptionTokens = redeemTokens + amountOutMin, + path, + msg.sender, + deadline + ); + // Fail early if the swap failed. + require(success, "ERR_SWAP_FAILED"); + + // The remainder is the flash loan amount - amount from selling redeemTokens. + uint256 remainder = flashLoanQuantity > amounts[1] + ? flashLoanQuantity.sub(amounts[1]) + : 0; + + // Pull underlyingTokens from the original spender to pay the remainder of the flash loan. + IERC20(underlyingToken).safeTransferFrom(to, msg.sender, remainder); + + // Send optionTokens (long options) to the "spender" address. + IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens + return success; + } + + function executeFlashMint( + uint256 amountOptions, + uint256 amountOutMin, + IOption optionToken + ) public { + address redeemToken = optionToken.redeemToken(); + address underlyingToken = optionToken.getUnderlyingTokenAddress(); + address pairAddress = factory.getPair(quoteToken, underlyingToken); + address[] memory path = new address[](3); + path[0] = redeemToken; + path[1] = quoteToken; + path[2] = underlyingToken; + IUniswapV2Pair pair = IUniswapV2Pair(pairAddress); + + bytes4 selector = bytes4( + keccak256( + bytes( + "flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)" + ) + ) + ); + bytes memory params = abi.encodeWithSelector( + selector, // function to call in this contract + optionToken, // option token to mint with flash loaned tokens + amountOptions, // quantity of tokens from flash loan + amountOutMin, // total price paid for selling redeemTokens from the minted optionTokens + path, // redeemToken -> stablecoin -> underlyingToken + msg.sender, // address to pull the remainder loan amount to pay, and send optionTokens to. + now + 15 minutes // deadline of this function call + ); + + // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address. + // Then executes `flashLoanMintShortOptionsThenSwap`. + pair.swap(0, amountOptions, address(this), params); // redeemToken <> stablecoin pair swap + } + + // gets tokens/WETH via a V2 flash swap, mints options, swaps short tokens for tokens, pulls in difference, repays! + function uniswapV2Call( + address sender, + uint256 amount0, + uint256 amount1, + bytes calldata data + ) external override { + address[] memory path = new address[](2); + uint256 amountToken; + uint256 amountWETH; + { + // scope for token{0,1}, avoids stack too deep errors + address token0 = IUniswapV2Pair(msg.sender).token0(); + address token1 = IUniswapV2Pair(msg.sender).token1(); + assert( + msg.sender == UniswapV2Library.pairFor(factory, token0, token1) + ); // ensure that msg.sender is actually a V2 pair + assert(amount0 == 0 || amount1 == 0); // this strategy is unidirectional + path[0] = amount0 == 0 ? token0 : token1; // if amount[0] is input, path[0] is input + path[1] = amount0 == 0 ? token1 : token0; // if amount[0] is input, path[1] is input + amountToken = token0 == address(WETH) ? amount1 : amount0; // if token0 = weth, amountToken = amount1 + amountWETH = token0 == address(WETH) ? amount0 : amount1; // if token0 = weth, amountWeth = amount0 + } + + // if we get tokens + if (amountToken > 0) { + uint256 minETH = abi.decode(data, (uint256)); // slippage parameter for V1, passed in by caller + token.approve(address(exchangeV1), amountToken); + uint256 amountReceived = exchangeV1.tokenToEthSwapInput( + amountToken, + minETH, + uint256(-1) + ); + uint256 amountRequired = UniswapV2Library.getAmountsIn( + factory, + amountToken, + path + )[0]; + assert(amountReceived > amountRequired); // fail if we didn't get enough ETH back to repay our flash loan + WETH.deposit{ value: amountRequired }(); + assert(WETH.transfer(msg.sender, amountRequired)); // return WETH to V2 pair + (bool success, ) = sender.call{ + value: amountReceived - amountRequired + }(new bytes(0)); // keep the rest! (ETH) + assert(success); + } + } + /** * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. * @notice Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender. From 8c97d61ff4760150cfc62f882a02b64f8a9abce6 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Wed, 28 Oct 2020 13:35:20 -0700 Subject: [PATCH 02/20] Got flash swap to work. --- artifacts/IUniswapV2Callee.json | 37 + artifacts/IUniswapV2Pair.json | 660 ++++++++++++++++++ artifacts/USDC.json | 324 +++++++++ artifacts/UniswapConnector.json | 161 ++++- .../connectors/Uniswap/UniswapConnector.sol | 138 ++-- contracts/test/tokens/USDC.sol | 26 + deploy/2_deploy_tokens.js | 4 +- deploy/5_deploy_uni_connector.js | 32 +- .../localhost_31337/OptionFactory.json | 10 +- .../localhost_31337/OptionTemplateLib.json | 4 +- .../localhost_31337/RedeemFactory.json | 10 +- .../localhost_31337/RedeemTemplateLib.json | 4 +- deployments/localhost_31337/Registry.json | 18 +- deployments/localhost_31337/TestERC20.json | 30 +- deployments/localhost_31337/Trader.json | 6 +- deployments/localhost_31337/USDC.json | 518 ++++++++++++++ .../localhost_31337/UniswapConnector.json | 269 +++++-- deployments/localhost_31337/WETH9.json | 14 +- .../localhost_31337/WethConnector.json | 515 ++++++++++++++ ...bbfe2edb18d58d4e2fa1dd3902e0fa48359e4.json | 168 +++++ ...6f66961f1bfc5503ecbc7aab135d0ded78194.json | 165 +++++ ...52bf4d0839470eb21a9a6d0aff59f9c3124d2.json | 168 +++++ test/test_uni_connector.js | 202 ++++-- 23 files changed, 3251 insertions(+), 232 deletions(-) create mode 100644 artifacts/IUniswapV2Callee.json create mode 100644 artifacts/IUniswapV2Pair.json create mode 100644 artifacts/USDC.json create mode 100644 contracts/test/tokens/USDC.sol create mode 100644 deployments/localhost_31337/USDC.json create mode 100644 deployments/localhost_31337/WethConnector.json create mode 100644 deployments/localhost_31337/solcInputs/0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4.json create mode 100644 deployments/localhost_31337/solcInputs/0x85dbd266bfa14eb8805070676c56f66961f1bfc5503ecbc7aab135d0ded78194.json create mode 100644 deployments/localhost_31337/solcInputs/0xe9b46d9335602a13095a2a0530d52bf4d0839470eb21a9a6d0aff59f9c3124d2.json diff --git a/artifacts/IUniswapV2Callee.json b/artifacts/IUniswapV2Callee.json new file mode 100644 index 00000000..bd695125 --- /dev/null +++ b/artifacts/IUniswapV2Callee.json @@ -0,0 +1,37 @@ +{ + "contractName": "IUniswapV2Callee", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "uniswapV2Call", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/IUniswapV2Pair.json b/artifacts/IUniswapV2Pair.json new file mode 100644 index 00000000..645d87f0 --- /dev/null +++ b/artifacts/IUniswapV2Pair.json @@ -0,0 +1,660 @@ +{ + "contractName": "IUniswapV2Pair", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0In", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1In", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0Out", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1Out", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "Swap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint112", + "name": "reserve0", + "type": "uint112" + }, + { + "indexed": false, + "internalType": "uint112", + "name": "reserve1", + "type": "uint112" + } + ], + "name": "Sync", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_LIQUIDITY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReserves", + "outputs": [ + { + "internalType": "uint112", + "name": "reserve0", + "type": "uint112" + }, + { + "internalType": "uint112", + "name": "reserve1", + "type": "uint112" + }, + { + "internalType": "uint32", + "name": "blockTimestampLast", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "kLast", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "price0CumulativeLast", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "price1CumulativeLast", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "skim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount0Out", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1Out", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "swap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "sync", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token0", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token1", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/USDC.json b/artifacts/USDC.json new file mode 100644 index 00000000..9f5c885d --- /dev/null +++ b/artifacts/USDC.json @@ -0,0 +1,324 @@ +{ + "contractName": "USDC", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b506040516200189938038062001899833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919050505082828160039080519060200190620001dc9291906200049b565b508060049080519060200190620001f59291906200049b565b506012600560006101000a81548160ff021916908360ff16021790555050506200022633826200022f60201b60201c565b5050506200054a565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620002d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b620002e7600083836200040d60201b60201c565b62000303816002546200041260201b62000fb41790919060201c565b60028190555062000361816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546200041260201b62000fb41790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60008082840190508381101562000491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004de57805160ff19168380011785556200050f565b828001600101855582156200050f579182015b828111156200050e578251825591602001919060010190620004f1565b5b5090506200051e919062000522565b5090565b6200054791905b808211156200054357600081600090555060010162000529565b5090565b90565b61133f806200055a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ead707f49c84c141b066b6af793c81a83b66f209561a87d30dffae0c79952f9364736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ead707f49c84c141b066b6af793c81a83b66f209561a87d30dffae0c79952f9364736f6c63430006020033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index ecc0cd48..ca233f38 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -201,6 +201,19 @@ "name": "UpdatedTrader", "type": "event" }, + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -282,6 +295,55 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "pairAddress", + "type": "address" + }, + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "flashLoanQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "flashloanMintShortOptionsThenSwap", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "getMaxDeadline", @@ -430,6 +492,73 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintShortOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + } + ], + "name": "openFlashShort", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "owner", @@ -711,10 +840,38 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "uniswapV2Call", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b61489680620000fb6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80637b103999116100c3578063acc794381161007c578063acc79438146108a1578063c0d7865514610948578063c45a01551461098c578063f2fde38b146109d6578063f441e35014610a1a578063f887ea4014610ac05761014d565b80637b103999146106135780638ac323291461065d5780638d2a1cf1146107215780638da5cb5b146107cf578063a6bc18f914610819578063a91ee0dc1461085d5761014d565b806351b8498f1161011557806351b8498f146103dd5780635bb478081461049f5780636af255d7146104e35780636bd64c3a146105675780636d4542bd14610585578063715018a6146106095761014d565b80631459457a146101525780631758078b146102165780631cfb886d14610260578063217a4b70146102a45780632ea4fbb4146102ee575b600080fd5b610214600480360360a081101561016857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b0a565b005b61021e61114d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102a26004803603602081101561027657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611173565b005b6102ac6112da565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c3600480360360c081101561030457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561035557600080fd5b82018360208201111561036757600080fd5b8035906020019184602083028401116401000000008311171561038957600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611300565b604051808215151515815260200191505060405180910390f35b61045d600480360360a08110156103f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611497565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e1600480360360208110156104b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061167a565b005b610525600480360360208110156104f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117e1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61056f611921565b6040518082815260200191505060405180910390f35b6105c76004803603602081101561059b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611932565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610611611b13565b005b61061b611c9b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610707600480360360e081101561067357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611cc1565b604051808215151515815260200191505060405180910390f35b6107b5600480360360e081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611deb565b604051808215151515815260200191505060405180910390f35b6107d7612337565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61085b6004803603602081101561082f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612360565b005b61089f6004803603602081101561087357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124c7565b005b61092b600480360360c08110156108b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061262e565b604051808381526020018281526020019250505060405180910390f35b61098a6004803603602081101561095e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f59565b005b6109946130c0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a18600480360360208110156109ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506130e6565b005b610aa660048036036080811015610a3057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506132f3565b604051808215151515815260200191505060405180910390f35b610ac861361e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b12613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ee3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61117b613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461123c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006113108a8a3061364c565b9150915060006113658b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a61384c565b915050806113db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61148686838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142657600080fd5b505afa15801561143a573d6000803e3d6000fd5b505050506040513d602081101561145057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b809350505050979650505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561158557600080fd5b505afa158015611599573d6000803e3d6000fd5b505050506040513d60208110156115af57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611665576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61166e81611932565b91505095945050505050565b611682613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611743576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156118db57600080fd5b505af11580156118ef573d6000803e3d6000fd5b505050506040513d602081101561190557600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611a2a57600080fd5b505afa158015611a3e573d6000803e3d6000fd5b505050506040513d6020811015611a5457600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b0a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b611b1b613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bdc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000611cd48a898989898961262e565b915091506000611ce98a84848b8b8b8b611deb565b905080611d5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16611e6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611f0333308a8473ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b600080611f118c8c3061364c565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611fbc57600080fd5b505af1158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561209f57600080fd5b505af11580156120b3573d6000803e3d6000fd5b505050506040513d60208110156120c957600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561220c57600080fd5b505af1158015612220573d6000803e3d6000fd5b505050506040513d606081101561223657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061230933828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a957600080fd5b505afa1580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612368613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612429576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b6124cf613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612590576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166126b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006127048b611932565b905061273333308c8473ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156127fc57600080fd5b505af1158015612810573d6000803e3d6000fd5b505050506040513d602081101561282657600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561296457600080fd5b505af1158015612978573d6000803e3d6000fd5b505050506040513d604081101561298e57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612a7b57600080fd5b505af1158015612a8f573d6000803e3d6000fd5b505050506040513d6020811015612aa557600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612afd57600080fd5b505afa158015612b11573d6000803e3d6000fd5b505050506040513d6020811015612b2757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612bde57600080fd5b505af1158015612bf2573d6000803e3d6000fd5b505050506040513d6020811015612c0857600080fd5b8101908080519060200190929190505050506000612d408573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015612c6557600080fd5b505afa158015612c79573d6000803e3d6000fd5b505050506040513d6020811015612c8f57600080fd5b8101908080519060200190929190505050612d328773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015612ce857600080fd5b505afa158015612cfc573d6000803e3d6000fd5b505050506040513d6020811015612d1257600080fd5b810190808051906020019092919050505087613d7b90919063ffffffff16565b613e0190919063ffffffff16565b9050612def3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d8e57600080fd5b505afa158015612da2573d6000803e3d6000fd5b505050506040513d6020811015612db857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015612eab57600080fd5b505af1158015612ebf573d6000803e3d6000fd5b505050506040513d6060811015612ed557600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612f2889838773ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b612f61613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613022576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6130ee613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146131af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806147f06026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080613301868530613e4b565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561337257600080fd5b505afa158015613386573d6000803e3d6000fd5b505050506040513d602081101561339c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561345357600080fd5b505af1158015613467573d6000803e3d6000fd5b505050506040513d602081101561347d57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561354b57600080fd5b505af115801561355f573d6000803e3d6000fd5b505050506040513d604081101561357557600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600080600084116136c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6137723386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561371157600080fd5b505afa158015613725573d6000803e3d6000fd5b505050506040513d602081101561373b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156137f357600080fd5b505af1158015613807573d6000803e3d6000fd5b505050506040513d604081101561381d57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061387457fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139d357600080fd5b505af11580156139e7573d6000803e3d6000fd5b505050506040513d60208110156139fd57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015613ac6578082015181840152602081019050613aab565b505050509050019650505050505050600060405180830381600087803b158015613aef57600080fd5b505af1158015613b03573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015613b2d57600080fd5b8101908080516040519392919084640100000000821115613b4d57600080fd5b83820191506020820185811115613b6357600080fd5b8251866020820283011164010000000082111715613b8057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613bb7578082015181840152602081019050613b9c565b5050505090500160405250505092506001915050965096945050505050565b613c898363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614493565b505050565b613d75846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614493565b50505050565b600080831415613d8e5760009050613dfb565b6000828402905082848281613d9f57fe5b0414613df6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806148166021913960400191505060405180910390fd5b809150505b92915050565b6000613e4383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506146de565b905092915050565b6000806000808511613ec5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613f4357600080fd5b505afa158015613f57573d6000803e3d6000fd5b505050506040513d6020811015613f6d57600080fd5b81019080805190602001909291905050501015613ff2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006141188773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561403d57600080fd5b505afa158015614051573d6000803e3d6000fd5b505050506040513d602081101561406757600080fd5b810190808051906020019092919050505061410a8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140c057600080fd5b505afa1580156140d4573d6000803e3d6000fd5b505050506040513d60208110156140ea57600080fd5b810190808051906020019092919050505089613d7b90919063ffffffff16565b613e0190919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561416157600080fd5b505afa158015614175573d6000803e3d6000fd5b505050506040513d602081101561418b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561421857600080fd5b505afa15801561422c573d6000803e3d6000fd5b505050506040513d602081101561424257600080fd5b810190808051906020019092919050505010156142c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6143743388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561431357600080fd5b505afa158015614327573d6000803e3d6000fd5b505050506040513d602081101561433d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6143a13388888a73ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561442357600080fd5b505af1158015614437573d6000803e3d6000fd5b505050506040513d606081101561444d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6144b28273ffffffffffffffffffffffffffffffffffffffff166147a4565b614524576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106145735780518252602082019150602081019050602083039250614550565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146145d5576040519150601f19603f3d011682016040523d82523d6000602084013e6145da565b606091505b509150915081614652576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156146d85780806020019051602081101561467157600080fd5b81019080805190602001909291905050506146d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614837602a913960400191505060405180910390fd5b5b50505050565b6000808311829061478a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561474f578082015181840152602081019050614734565b50505050905090810190601f16801561477c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161479657fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156147e657506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206a02d8925e0d15fbbdc88e403bfbf23469009b1d75d38009b0fb6b108535ae4f64736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80637b103999116100c3578063acc794381161007c578063acc79438146108a1578063c0d7865514610948578063c45a01551461098c578063f2fde38b146109d6578063f441e35014610a1a578063f887ea4014610ac05761014d565b80637b103999146106135780638ac323291461065d5780638d2a1cf1146107215780638da5cb5b146107cf578063a6bc18f914610819578063a91ee0dc1461085d5761014d565b806351b8498f1161011557806351b8498f146103dd5780635bb478081461049f5780636af255d7146104e35780636bd64c3a146105675780636d4542bd14610585578063715018a6146106095761014d565b80631459457a146101525780631758078b146102165780631cfb886d14610260578063217a4b70146102a45780632ea4fbb4146102ee575b600080fd5b610214600480360360a081101561016857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b0a565b005b61021e61114d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102a26004803603602081101561027657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611173565b005b6102ac6112da565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c3600480360360c081101561030457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561035557600080fd5b82018360208201111561036757600080fd5b8035906020019184602083028401116401000000008311171561038957600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611300565b604051808215151515815260200191505060405180910390f35b61045d600480360360a08110156103f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611497565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e1600480360360208110156104b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061167a565b005b610525600480360360208110156104f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117e1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61056f611921565b6040518082815260200191505060405180910390f35b6105c76004803603602081101561059b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611932565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610611611b13565b005b61061b611c9b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610707600480360360e081101561067357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611cc1565b604051808215151515815260200191505060405180910390f35b6107b5600480360360e081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611deb565b604051808215151515815260200191505060405180910390f35b6107d7612337565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61085b6004803603602081101561082f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612360565b005b61089f6004803603602081101561087357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124c7565b005b61092b600480360360c08110156108b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061262e565b604051808381526020018281526020019250505060405180910390f35b61098a6004803603602081101561095e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f59565b005b6109946130c0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a18600480360360208110156109ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506130e6565b005b610aa660048036036080811015610a3057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506132f3565b604051808215151515815260200191505060405180910390f35b610ac861361e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b12613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ee3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61117b613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461123c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006113108a8a3061364c565b9150915060006113658b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a61384c565b915050806113db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61148686838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142657600080fd5b505afa15801561143a573d6000803e3d6000fd5b505050506040513d602081101561145057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b809350505050979650505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561158557600080fd5b505afa158015611599573d6000803e3d6000fd5b505050506040513d60208110156115af57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611665576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61166e81611932565b91505095945050505050565b611682613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611743576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156118db57600080fd5b505af11580156118ef573d6000803e3d6000fd5b505050506040513d602081101561190557600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611a2a57600080fd5b505afa158015611a3e573d6000803e3d6000fd5b505050506040513d6020811015611a5457600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b0a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b611b1b613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bdc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000611cd48a898989898961262e565b915091506000611ce98a84848b8b8b8b611deb565b905080611d5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16611e6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611f0333308a8473ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b600080611f118c8c3061364c565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611fbc57600080fd5b505af1158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561209f57600080fd5b505af11580156120b3573d6000803e3d6000fd5b505050506040513d60208110156120c957600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561220c57600080fd5b505af1158015612220573d6000803e3d6000fd5b505050506040513d606081101561223657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061230933828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a957600080fd5b505afa1580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612368613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612429576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b6124cf613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612590576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166126b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006127048b611932565b905061273333308c8473ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156127fc57600080fd5b505af1158015612810573d6000803e3d6000fd5b505050506040513d602081101561282657600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561296457600080fd5b505af1158015612978573d6000803e3d6000fd5b505050506040513d604081101561298e57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612a7b57600080fd5b505af1158015612a8f573d6000803e3d6000fd5b505050506040513d6020811015612aa557600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612afd57600080fd5b505afa158015612b11573d6000803e3d6000fd5b505050506040513d6020811015612b2757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612bde57600080fd5b505af1158015612bf2573d6000803e3d6000fd5b505050506040513d6020811015612c0857600080fd5b8101908080519060200190929190505050506000612d408573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015612c6557600080fd5b505afa158015612c79573d6000803e3d6000fd5b505050506040513d6020811015612c8f57600080fd5b8101908080519060200190929190505050612d328773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015612ce857600080fd5b505afa158015612cfc573d6000803e3d6000fd5b505050506040513d6020811015612d1257600080fd5b810190808051906020019092919050505087613d7b90919063ffffffff16565b613e0190919063ffffffff16565b9050612def3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d8e57600080fd5b505afa158015612da2573d6000803e3d6000fd5b505050506040513d6020811015612db857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015612eab57600080fd5b505af1158015612ebf573d6000803e3d6000fd5b505050506040513d6060811015612ed557600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612f2889838773ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b612f61613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613022576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6130ee613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146131af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806147f06026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080613301868530613e4b565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561337257600080fd5b505afa158015613386573d6000803e3d6000fd5b505050506040513d602081101561339c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561345357600080fd5b505af1158015613467573d6000803e3d6000fd5b505050506040513d602081101561347d57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561354b57600080fd5b505af115801561355f573d6000803e3d6000fd5b505050506040513d604081101561357557600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600080600084116136c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6137723386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561371157600080fd5b505afa158015613725573d6000803e3d6000fd5b505050506040513d602081101561373b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156137f357600080fd5b505af1158015613807573d6000803e3d6000fd5b505050506040513d604081101561381d57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061387457fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139d357600080fd5b505af11580156139e7573d6000803e3d6000fd5b505050506040513d60208110156139fd57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015613ac6578082015181840152602081019050613aab565b505050509050019650505050505050600060405180830381600087803b158015613aef57600080fd5b505af1158015613b03573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015613b2d57600080fd5b8101908080516040519392919084640100000000821115613b4d57600080fd5b83820191506020820185811115613b6357600080fd5b8251866020820283011164010000000082111715613b8057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613bb7578082015181840152602081019050613b9c565b5050505090500160405250505092506001915050965096945050505050565b613c898363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614493565b505050565b613d75846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614493565b50505050565b600080831415613d8e5760009050613dfb565b6000828402905082848281613d9f57fe5b0414613df6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806148166021913960400191505060405180910390fd5b809150505b92915050565b6000613e4383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506146de565b905092915050565b6000806000808511613ec5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613f4357600080fd5b505afa158015613f57573d6000803e3d6000fd5b505050506040513d6020811015613f6d57600080fd5b81019080805190602001909291905050501015613ff2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006141188773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561403d57600080fd5b505afa158015614051573d6000803e3d6000fd5b505050506040513d602081101561406757600080fd5b810190808051906020019092919050505061410a8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140c057600080fd5b505afa1580156140d4573d6000803e3d6000fd5b505050506040513d60208110156140ea57600080fd5b810190808051906020019092919050505089613d7b90919063ffffffff16565b613e0190919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561416157600080fd5b505afa158015614175573d6000803e3d6000fd5b505050506040513d602081101561418b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561421857600080fd5b505afa15801561422c573d6000803e3d6000fd5b505050506040513d602081101561424257600080fd5b810190808051906020019092919050505010156142c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6143743388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561431357600080fd5b505afa158015614327573d6000803e3d6000fd5b505050506040513d602081101561433d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6143a13388888a73ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561442357600080fd5b505af1158015614437573d6000803e3d6000fd5b505050506040513d606081101561444d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6144b28273ffffffffffffffffffffffffffffffffffffffff166147a4565b614524576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106145735780518252602082019150602081019050602083039250614550565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146145d5576040519150601f19603f3d011682016040523d82523d6000602084013e6145da565b606091505b509150915081614652576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156146d85780806020019051602081101561467157600080fd5b81019080805190602001909291905050506146d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614837602a913960400191505060405180910390fd5b5b50505050565b6000808311829061478a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561474f578082015181840152602081019050614734565b50505050905090810190601f16801561477c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161479657fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156147e657506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206a02d8925e0d15fbbdc88e403bfbf23469009b1d75d38009b0fb6b108535ae4f64736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615bc180620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638ac32329116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610dce578063f2fde38b14610e18578063f441e35014610e5c578063f887ea4014610f02576101c4565b8063acc7943814610c99578063ad5c464814610d40578063c0d7865514610d8a576101c4565b806395f0ae76116100d357806395f0ae76146109955780639bb9ef2914610ac3578063a6bc18f914610c11578063a91ee0dc14610c55576101c4565b80638ac32329146107d95780638d2a1cf11461089d5780638da5cb5b1461094b576101c4565b806351b8498f116101665780636bd64c3a116101405780636bd64c3a146106e35780636d4542bd14610701578063715018a6146107855780637b1039991461078f576101c4565b806351b8498f146105595780635bb478081461061b5780636af255d71461065f576101c4565b80631cfb886d116101a25780631cfb886d14610384578063217a4b70146103c85780632ea4fbb41461041257806338bd2aaa14610501576101c4565b806310d1e85c146101c95780631459457a146102765780631758078b1461033a575b600080fd5b610274600480360360808110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184600183028401116401000000008311171561026457600080fd5b9091929391929390505050610f4c565b005b610338600480360360a081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611041565b005b610342611684565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c66004803603602081101561039a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116aa565b005b6103d0611811565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e7600480360360c081101561042857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611837565b604051808215151515815260200191505060405180910390f35b6105576004803603606081101561051757600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ce565b005b6105d9600480360360a081101561056f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612172565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61065d6004803603602081101561063157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612355565b005b6106a16004803603602081101561067557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124bc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb6125fc565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061260d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078d6127ee565b005b610797612976565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610883600480360360e08110156107ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061299c565b604051808215151515815260200191505060405180910390f35b610931600480360360e08110156108b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ac6565b604051808215151515815260200191505060405180910390f35b610953613012565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aa9600480360360c08110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109fc57600080fd5b820183602082011115610a0e57600080fd5b80359060200191846020830284011164010000000083111715610a3057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061303b565b604051808215151515815260200191505060405180910390f35b610bf7600480360360e0811015610ad957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610b4a57600080fd5b820183602082011115610b5c57600080fd5b80359060200191846020830284011164010000000083111715610b7e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613196565b604051808215151515815260200191505060405180910390f35b610c5360048036036020811015610c2757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134cd565b005b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613634565b005b610d23600480360360c0811015610caf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061379b565b604051808381526020018281526020019250505060405180910390f35b610d486140c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dcc60048036036020811015610da057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140de565b005b610dd6614245565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e5a60048036036020811015610e2e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061426b565b005b610ee860048036036080811015610e7257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614478565b604051808215151515815260200191505060405180910390f35b610f0a6147a3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610fbb576040519150601f19603f3d011682016040523d82523d6000602084013e610fc0565b606091505b509150915081611038576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6110496147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461110a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611292576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461141a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116b26147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611773576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006118478a8a306147d1565b91509150600061189c8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6149d1565b91505080611912576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6119bd86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195d57600080fd5b505afa158015611971573d6000803e3d6000fd5b505050506040513d602081101561198757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9b57600080fd5b505afa158015611aaf573d6000803e3d6000fd5b505050506040513d6020811015611ac557600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611bcf57600080fd5b505afa158015611be3573d6000803e3d6000fd5b505050506040513d6020811015611bf957600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611c3e5781602001602082028038833980820191505090505b5090508381600081518110611c4f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611cb957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611d0157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615b06605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611e60578082015181840152602081019050611e45565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2f57600080fd5b505afa158015611f43573d6000803e3d6000fd5b505050506040513d6020811015611f5957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f8c576000611f8e565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611fef57600080fd5b505afa158015612003573d6000803e3d6000fd5b505050506040513d602081101561201957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461204b578b61204e565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156120fd5780820151818401526020810190506120e2565b50505050905090810190601f16801561212a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561214c57600080fd5b505af1158015612160573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561226057600080fd5b505afa158015612274573d6000803e3d6000fd5b505050506040513d602081101561228a57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612340576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6123498161260d565b91505095945050505050565b61235d6147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461241e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156125b657600080fd5b505af11580156125ca573d6000803e3d6000fd5b505050506040513d60208110156125e057600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561270557600080fd5b505afa158015612719573d6000803e3d6000fd5b505050506040513d602081101561272f57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6127f66147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146128b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006129af8a898989898961379b565b9150915060006129c48a84848b8b8b8b612ac6565b905080612a39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612b49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612bde33308a8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b600080612bec8c8c306147d1565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c9757600080fd5b505af1158015612cab573d6000803e3d6000fd5b505050506040513d6020811015612cc157600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d7a57600080fd5b505af1158015612d8e573d6000803e3d6000fd5b505050506040513d6020811015612da457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612ee757600080fd5b505af1158015612efb573d6000803e3d6000fd5b505050506040513d6060811015612f1157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612fe433828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f8457600080fd5b505afa158015612f98573d6000803e3d6000fd5b505050506040513d6020811015612fae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600061304b8989306147d1565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561309757600080fd5b505afa1580156130ab573d6000803e3d6000fd5b505050506040513d60208110156130c157600080fd5b8101908080519060200190929190505050905060006130e482848b8b8b8b6149d1565b9150508061315a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61318587858d73ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b809450505050509695505050505050565b600080861161320d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000613249613226600389614f0090919063ffffffff16565b61323b6103e88a614f0090919063ffffffff16565b614f8690919063ffffffff16565b905060008873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561329357600080fd5b505afa1580156132a7573d6000803e3d6000fd5b505050506040513d60208110156132bd57600080fd5b81019080805190602001909291905050509050613311858b6132ea6103e88661500e90919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6133d18173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561339157600080fd5b505afa1580156133a5573d6000803e3d6000fd5b505050506040513d60208110156133bb57600080fd5b8101908080519060200190929190505050615058565b6133fc8a898373ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b6134bc8173ffffffffffffffffffffffffffffffffffffffff166370a082318c6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561347c57600080fd5b505afa158015613490573d6000803e3d6000fd5b505050506040513d60208110156134a657600080fd5b8101908080519060200190929190505050615058565b600192505050979650505050505050565b6134d56147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613596576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363c6147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138718b61260d565b90506138a033308c8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396957600080fd5b505af115801561397d573d6000803e3d6000fd5b505050506040513d602081101561399357600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ad157600080fd5b505af1158015613ae5573d6000803e3d6000fd5b505050506040513d6040811015613afb57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be857600080fd5b505af1158015613bfc573d6000803e3d6000fd5b505050506040513d6020811015613c1257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6a57600080fd5b505afa158015613c7e573d6000803e3d6000fd5b505050506040513d6020811015613c9457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4b57600080fd5b505af1158015613d5f573d6000803e3d6000fd5b505050506040513d6020811015613d7557600080fd5b8101908080519060200190929190505050506000613ead8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dd257600080fd5b505afa158015613de6573d6000803e3d6000fd5b505050506040513d6020811015613dfc57600080fd5b8101908080519060200190929190505050613e9f8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5557600080fd5b505afa158015613e69573d6000803e3d6000fd5b505050506040513d6020811015613e7f57600080fd5b810190808051906020019092919050505087614f0090919063ffffffff16565b61500e90919063ffffffff16565b9050613f5c3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613efb57600080fd5b505afa158015613f0f573d6000803e3d6000fd5b505050506040513d6020811015613f2557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401857600080fd5b505af115801561402c573d6000803e3d6000fd5b505050506040513d606081101561404257600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061409589838773ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140e66147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146141a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6142736147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143ba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615abf6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806144868685306150f1565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144f757600080fd5b505afa15801561450b573d6000803e3d6000fd5b505050506040513d602081101561452157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d857600080fd5b505af11580156145ec573d6000803e3d6000fd5b505050506040513d602081101561460257600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146d057600080fd5b505af11580156146e4573d6000803e3d6000fd5b505050506040513d60408110156146fa57600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b6000806000841161484a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6148f73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561489657600080fd5b505afa1580156148aa573d6000803e3d6000fd5b505050506040513d60208110156148c057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561497857600080fd5b505af115801561498c573d6000803e3d6000fd5b505050506040513d60408110156149a257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106149f957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614a8a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614b5857600080fd5b505af1158015614b6c573d6000803e3d6000fd5b505050506040513d6020811015614b8257600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614c4b578082015181840152602081019050614c30565b505050509050019650505050505050600060405180830381600087803b158015614c7457600080fd5b505af1158015614c88573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614cb257600080fd5b8101908080516040519392919084640100000000821115614cd257600080fd5b83820191506020820185811115614ce857600080fd5b8251866020820283011164010000000082111715614d0557600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614d3c578082015181840152602081019050614d21565b5050505090500160405250505092506001915050965096945050505050565b614e0e8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615739565b505050565b614efa846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615739565b50505050565b600080831415614f135760009050614f80565b6000828402905082848281614f2457fe5b0414614f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615ae56021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015615004576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061505083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615984565b905092915050565b6150ee81604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a4a565b50565b600080600080851161516b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156151e957600080fd5b505afa1580156151fd573d6000803e3d6000fd5b505050506040513d602081101561521357600080fd5b81019080805190602001909291905050501015615298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006153be8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156152e357600080fd5b505afa1580156152f7573d6000803e3d6000fd5b505050506040513d602081101561530d57600080fd5b81019080805190602001909291905050506153b08973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561536657600080fd5b505afa15801561537a573d6000803e3d6000fd5b505050506040513d602081101561539057600080fd5b810190808051906020019092919050505089614f0090919063ffffffff16565b61500e90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561540757600080fd5b505afa15801561541b573d6000803e3d6000fd5b505050506040513d602081101561543157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156154be57600080fd5b505afa1580156154d2573d6000803e3d6000fd5b505050506040513d60208110156154e857600080fd5b8101908080519060200190929190505050101561556d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61561a3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155b957600080fd5b505afa1580156155cd573d6000803e3d6000fd5b505050506040513d60208110156155e357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6156473388888a73ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156156c957600080fd5b505af11580156156dd573d6000803e3d6000fd5b505050506040513d60608110156156f357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6157588273ffffffffffffffffffffffffffffffffffffffff16615a73565b6157ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061581957805182526020820191506020810190506020830392506157f6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461587b576040519150601f19603f3d011682016040523d82523d6000602084013e615880565b606091505b5091509150816158f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561597e5780806020019051602081101561591757600080fd5b810190808051906020019092919050505061597d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b62602a913960400191505060405180910390fd5b5b50505050565b60008083118290615a30576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156159f55780820151818401526020810190506159da565b50505050905090810190601f168015615a225780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615a3c57fe5b049050809150509392505050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ab557506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220bcff2a0b5703dd8579bace6132dccc3cae8078514c6b24bb7f05af54046a03c264736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638ac32329116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610dce578063f2fde38b14610e18578063f441e35014610e5c578063f887ea4014610f02576101c4565b8063acc7943814610c99578063ad5c464814610d40578063c0d7865514610d8a576101c4565b806395f0ae76116100d357806395f0ae76146109955780639bb9ef2914610ac3578063a6bc18f914610c11578063a91ee0dc14610c55576101c4565b80638ac32329146107d95780638d2a1cf11461089d5780638da5cb5b1461094b576101c4565b806351b8498f116101665780636bd64c3a116101405780636bd64c3a146106e35780636d4542bd14610701578063715018a6146107855780637b1039991461078f576101c4565b806351b8498f146105595780635bb478081461061b5780636af255d71461065f576101c4565b80631cfb886d116101a25780631cfb886d14610384578063217a4b70146103c85780632ea4fbb41461041257806338bd2aaa14610501576101c4565b806310d1e85c146101c95780631459457a146102765780631758078b1461033a575b600080fd5b610274600480360360808110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184600183028401116401000000008311171561026457600080fd5b9091929391929390505050610f4c565b005b610338600480360360a081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611041565b005b610342611684565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c66004803603602081101561039a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116aa565b005b6103d0611811565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e7600480360360c081101561042857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611837565b604051808215151515815260200191505060405180910390f35b6105576004803603606081101561051757600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ce565b005b6105d9600480360360a081101561056f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612172565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61065d6004803603602081101561063157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612355565b005b6106a16004803603602081101561067557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124bc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb6125fc565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061260d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078d6127ee565b005b610797612976565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610883600480360360e08110156107ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061299c565b604051808215151515815260200191505060405180910390f35b610931600480360360e08110156108b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ac6565b604051808215151515815260200191505060405180910390f35b610953613012565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aa9600480360360c08110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109fc57600080fd5b820183602082011115610a0e57600080fd5b80359060200191846020830284011164010000000083111715610a3057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061303b565b604051808215151515815260200191505060405180910390f35b610bf7600480360360e0811015610ad957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610b4a57600080fd5b820183602082011115610b5c57600080fd5b80359060200191846020830284011164010000000083111715610b7e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613196565b604051808215151515815260200191505060405180910390f35b610c5360048036036020811015610c2757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134cd565b005b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613634565b005b610d23600480360360c0811015610caf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061379b565b604051808381526020018281526020019250505060405180910390f35b610d486140c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dcc60048036036020811015610da057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140de565b005b610dd6614245565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e5a60048036036020811015610e2e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061426b565b005b610ee860048036036080811015610e7257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614478565b604051808215151515815260200191505060405180910390f35b610f0a6147a3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610fbb576040519150601f19603f3d011682016040523d82523d6000602084013e610fc0565b606091505b509150915081611038576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6110496147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461110a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611292576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461141a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116b26147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611773576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006118478a8a306147d1565b91509150600061189c8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6149d1565b91505080611912576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6119bd86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195d57600080fd5b505afa158015611971573d6000803e3d6000fd5b505050506040513d602081101561198757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9b57600080fd5b505afa158015611aaf573d6000803e3d6000fd5b505050506040513d6020811015611ac557600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611bcf57600080fd5b505afa158015611be3573d6000803e3d6000fd5b505050506040513d6020811015611bf957600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611c3e5781602001602082028038833980820191505090505b5090508381600081518110611c4f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611cb957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611d0157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615b06605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611e60578082015181840152602081019050611e45565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2f57600080fd5b505afa158015611f43573d6000803e3d6000fd5b505050506040513d6020811015611f5957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f8c576000611f8e565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611fef57600080fd5b505afa158015612003573d6000803e3d6000fd5b505050506040513d602081101561201957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461204b578b61204e565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156120fd5780820151818401526020810190506120e2565b50505050905090810190601f16801561212a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561214c57600080fd5b505af1158015612160573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561226057600080fd5b505afa158015612274573d6000803e3d6000fd5b505050506040513d602081101561228a57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612340576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6123498161260d565b91505095945050505050565b61235d6147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461241e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156125b657600080fd5b505af11580156125ca573d6000803e3d6000fd5b505050506040513d60208110156125e057600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561270557600080fd5b505afa158015612719573d6000803e3d6000fd5b505050506040513d602081101561272f57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6127f66147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146128b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006129af8a898989898961379b565b9150915060006129c48a84848b8b8b8b612ac6565b905080612a39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612b49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612bde33308a8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b600080612bec8c8c306147d1565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c9757600080fd5b505af1158015612cab573d6000803e3d6000fd5b505050506040513d6020811015612cc157600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d7a57600080fd5b505af1158015612d8e573d6000803e3d6000fd5b505050506040513d6020811015612da457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612ee757600080fd5b505af1158015612efb573d6000803e3d6000fd5b505050506040513d6060811015612f1157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612fe433828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f8457600080fd5b505afa158015612f98573d6000803e3d6000fd5b505050506040513d6020811015612fae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600061304b8989306147d1565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561309757600080fd5b505afa1580156130ab573d6000803e3d6000fd5b505050506040513d60208110156130c157600080fd5b8101908080519060200190929190505050905060006130e482848b8b8b8b6149d1565b9150508061315a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61318587858d73ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b809450505050509695505050505050565b600080861161320d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000613249613226600389614f0090919063ffffffff16565b61323b6103e88a614f0090919063ffffffff16565b614f8690919063ffffffff16565b905060008873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561329357600080fd5b505afa1580156132a7573d6000803e3d6000fd5b505050506040513d60208110156132bd57600080fd5b81019080805190602001909291905050509050613311858b6132ea6103e88661500e90919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6133d18173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561339157600080fd5b505afa1580156133a5573d6000803e3d6000fd5b505050506040513d60208110156133bb57600080fd5b8101908080519060200190929190505050615058565b6133fc8a898373ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b6134bc8173ffffffffffffffffffffffffffffffffffffffff166370a082318c6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561347c57600080fd5b505afa158015613490573d6000803e3d6000fd5b505050506040513d60208110156134a657600080fd5b8101908080519060200190929190505050615058565b600192505050979650505050505050565b6134d56147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613596576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363c6147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138718b61260d565b90506138a033308c8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396957600080fd5b505af115801561397d573d6000803e3d6000fd5b505050506040513d602081101561399357600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ad157600080fd5b505af1158015613ae5573d6000803e3d6000fd5b505050506040513d6040811015613afb57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be857600080fd5b505af1158015613bfc573d6000803e3d6000fd5b505050506040513d6020811015613c1257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6a57600080fd5b505afa158015613c7e573d6000803e3d6000fd5b505050506040513d6020811015613c9457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4b57600080fd5b505af1158015613d5f573d6000803e3d6000fd5b505050506040513d6020811015613d7557600080fd5b8101908080519060200190929190505050506000613ead8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dd257600080fd5b505afa158015613de6573d6000803e3d6000fd5b505050506040513d6020811015613dfc57600080fd5b8101908080519060200190929190505050613e9f8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5557600080fd5b505afa158015613e69573d6000803e3d6000fd5b505050506040513d6020811015613e7f57600080fd5b810190808051906020019092919050505087614f0090919063ffffffff16565b61500e90919063ffffffff16565b9050613f5c3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613efb57600080fd5b505afa158015613f0f573d6000803e3d6000fd5b505050506040513d6020811015613f2557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401857600080fd5b505af115801561402c573d6000803e3d6000fd5b505050506040513d606081101561404257600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061409589838773ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140e66147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146141a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6142736147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143ba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615abf6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806144868685306150f1565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144f757600080fd5b505afa15801561450b573d6000803e3d6000fd5b505050506040513d602081101561452157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d857600080fd5b505af11580156145ec573d6000803e3d6000fd5b505050506040513d602081101561460257600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146d057600080fd5b505af11580156146e4573d6000803e3d6000fd5b505050506040513d60408110156146fa57600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b6000806000841161484a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6148f73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561489657600080fd5b505afa1580156148aa573d6000803e3d6000fd5b505050506040513d60208110156148c057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561497857600080fd5b505af115801561498c573d6000803e3d6000fd5b505050506040513d60408110156149a257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106149f957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614a8a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614b5857600080fd5b505af1158015614b6c573d6000803e3d6000fd5b505050506040513d6020811015614b8257600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614c4b578082015181840152602081019050614c30565b505050509050019650505050505050600060405180830381600087803b158015614c7457600080fd5b505af1158015614c88573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614cb257600080fd5b8101908080516040519392919084640100000000821115614cd257600080fd5b83820191506020820185811115614ce857600080fd5b8251866020820283011164010000000082111715614d0557600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614d3c578082015181840152602081019050614d21565b5050505090500160405250505092506001915050965096945050505050565b614e0e8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615739565b505050565b614efa846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615739565b50505050565b600080831415614f135760009050614f80565b6000828402905082848281614f2457fe5b0414614f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615ae56021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015615004576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061505083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615984565b905092915050565b6150ee81604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a4a565b50565b600080600080851161516b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156151e957600080fd5b505afa1580156151fd573d6000803e3d6000fd5b505050506040513d602081101561521357600080fd5b81019080805190602001909291905050501015615298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006153be8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156152e357600080fd5b505afa1580156152f7573d6000803e3d6000fd5b505050506040513d602081101561530d57600080fd5b81019080805190602001909291905050506153b08973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561536657600080fd5b505afa15801561537a573d6000803e3d6000fd5b505050506040513d602081101561539057600080fd5b810190808051906020019092919050505089614f0090919063ffffffff16565b61500e90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561540757600080fd5b505afa15801561541b573d6000803e3d6000fd5b505050506040513d602081101561543157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156154be57600080fd5b505afa1580156154d2573d6000803e3d6000fd5b505050506040513d60208110156154e857600080fd5b8101908080519060200190929190505050101561556d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61561a3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155b957600080fd5b505afa1580156155cd573d6000803e3d6000fd5b505050506040513d60208110156155e357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6156473388888a73ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156156c957600080fd5b505af11580156156dd573d6000803e3d6000fd5b505050506040513d60608110156156f357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6157588273ffffffffffffffffffffffffffffffffffffffff16615a73565b6157ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061581957805182526020820191506020810190506020830392506157f6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461587b576040519150601f19603f3d011682016040523d82523d6000602084013e615880565b606091505b5091509150816158f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561597e5780806020019051602081101561591757600080fd5b810190808051906020019092919050505061597d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b62602a913960400191505060405180910390fd5b5b50505050565b60008083118290615a30576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156159f55780820151818401526020810190506159da565b50505050905090810190601f168015615a225780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615a3c57fe5b049050809150509392505050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ab557506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220bcff2a0b5703dd8579bace6132dccc3cae8078514c6b24bb7f05af54046a03c264736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index 68f0eb8f..9f94ee05 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -16,9 +16,8 @@ import { IUniswapV2Factory } from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import { - UniswapV2Library, IUniswapV2Pair -} from "@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol"; +} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; // Primitive import { IOption } from "../../option/interfaces/IOption.sol"; import { IRegistry } from "../../option/interfaces/IRegistry.sol"; @@ -34,6 +33,8 @@ import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; +import "@nomiclabs/buidler/console.sol"; + contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { using SafeMath for uint256; using SafeERC20 for IERC20; @@ -44,7 +45,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { IRegistry public registry; address public quoteToken; // Designated stablecoin for Primitive. - address public constant WETH = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"; + address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; event Initialized(address indexed from, address indexed quoteToken); event UpdatedRouter(address indexed from, address indexed newRouter); @@ -196,7 +197,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { IOption optionToken, uint256 amountIn, uint256 amountOutMin, - address[] calldata path, + address[] memory path, address to, uint256 deadline ) public returns (bool) { @@ -232,7 +233,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { * @notice If the first address in the path is not the redeemToken address, the tx will fail. * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens * @param optionToken The address of the Option contract. - * @param amountIn The quantity of options to mint. + * @param flashLoanQuantity The quantity of options to mint. * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens. * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken. * @param to The address to send the redeemToken proceeds and optionTokens to. @@ -240,10 +241,11 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { * @return bool Whether the transaction was successful or not. */ function flashloanMintShortOptionsThenSwap( + address pairAddress, IOption optionToken, uint256 flashLoanQuantity, uint256 amountOutMin, - address[] calldata path, + address[] memory path, address to, uint256 deadline ) public returns (bool) { @@ -251,13 +253,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. // Mints option and redeem tokens to this contract. - // Store in memory for gas savings. - ITrader trader_ = trader; - address underlyingToken = optionToken.getUnderlyingTokenAddress(); - address redeemToken = optionToken.redeemToken(); - - // Approve underlyingTokens to be sent to the Primitive Trader contract. - IERC20(underlyingToken).approve(address(trader_), uint256(-1)); + /* address underlyingToken = optionToken.getUnderlyingTokenAddress(); // Mint optionTokens using the underlyingTokens received from UniswapV2 flashloan. // Sends underlyingTokens from this contract and to the optionToken contract, then calls mintOptions. @@ -275,32 +271,54 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Reverts if the first address in the path is not the redeemToken address. // Reverts if the last address in the path is not the underlyingToken address. // path[0] = redeemToken, path[1] = dai, path[2] = underlyingToken - require(path[2] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); - (uint256[] memory amounts, bool success) = _swapExactOptionsForTokens( - redeemToken, - outputRedeems, // shortOptionTokens = redeemTokens - amountOutMin, - path, - msg.sender, - deadline + { + require(path[2] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); + ( + uint256[] memory amounts, + bool success + ) = _swapExactOptionsForTokens( + optionToken.redeemToken(), + outputRedeems, // shortOptionTokens = redeemTokens + amountOutMin, + path, + msg.sender, + deadline + ); + // Fail early if the swap failed. + require(success, "ERR_SWAP_FAILED"); + + // The remainder is the flash loan amount - amount from selling redeemTokens. + uint256 remainder = flashLoanQuantity > amounts[1] + ? flashLoanQuantity.sub(amounts[1]) + : 0; + + // Pull underlyingTokens from the original spender to pay the remainder of the flash loan. + IERC20(underlyingToken).safeTransferFrom(to, msg.sender, remainder); + + // Send optionTokens (long options) to the "spender" address. + IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens + } */ + uint256 quantityWithFee = flashLoanQuantity.mul(1000).add( + flashLoanQuantity.mul(3) ); - // Fail early if the swap failed. - require(success, "ERR_SWAP_FAILED"); - - // The remainder is the flash loan amount - amount from selling redeemTokens. - uint256 remainder = flashLoanQuantity > amounts[1] - ? flashLoanQuantity.sub(amounts[1]) - : 0; + /* uint256 remainder = quantityWithFee > amounts[1] + ? quantityWithFee.sub(amounts[1]) + : 0; */ + address underlyingToken = optionToken.getUnderlyingTokenAddress(); // Pull underlyingTokens from the original spender to pay the remainder of the flash loan. - IERC20(underlyingToken).safeTransferFrom(to, msg.sender, remainder); - - // Send optionTokens (long options) to the "spender" address. - IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens - return success; + IERC20(underlyingToken).safeTransferFrom( + to, + pairAddress, + quantityWithFee.div(1000) + ); + console.log(IERC20(underlyingToken).balanceOf(address(this))); + IERC20(underlyingToken).safeTransfer(pairAddress, flashLoanQuantity); + console.log(IERC20(underlyingToken).balanceOf(pairAddress)); + return true; } - function executeFlashMint( + function openFlashShort( uint256 amountOptions, uint256 amountOutMin, IOption optionToken @@ -317,12 +335,13 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { bytes4 selector = bytes4( keccak256( bytes( - "flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)" + "flashloanMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address,uint256)" ) ) ); bytes memory params = abi.encodeWithSelector( selector, // function to call in this contract + pairAddress, optionToken, // option token to mint with flash loaned tokens amountOptions, // quantity of tokens from flash loan amountOutMin, // total price paid for selling redeemTokens from the minted optionTokens @@ -333,7 +352,13 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address. // Then executes `flashLoanMintShortOptionsThenSwap`. - pair.swap(0, amountOptions, address(this), params); // redeemToken <> stablecoin pair swap + uint256 amount0Out = pair.token0() == underlyingToken + ? amountOptions + : 0; + uint256 amount1Out = pair.token0() == underlyingToken + ? 0 + : amountOptions; + pair.swap(amount0Out, amount1Out, address(this), params); // redeemToken <> stablecoin pair swap } // gets tokens/WETH via a V2 flash swap, mints options, swaps short tokens for tokens, pulls in difference, repays! @@ -343,45 +368,8 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { uint256 amount1, bytes calldata data ) external override { - address[] memory path = new address[](2); - uint256 amountToken; - uint256 amountWETH; - { - // scope for token{0,1}, avoids stack too deep errors - address token0 = IUniswapV2Pair(msg.sender).token0(); - address token1 = IUniswapV2Pair(msg.sender).token1(); - assert( - msg.sender == UniswapV2Library.pairFor(factory, token0, token1) - ); // ensure that msg.sender is actually a V2 pair - assert(amount0 == 0 || amount1 == 0); // this strategy is unidirectional - path[0] = amount0 == 0 ? token0 : token1; // if amount[0] is input, path[0] is input - path[1] = amount0 == 0 ? token1 : token0; // if amount[0] is input, path[1] is input - amountToken = token0 == address(WETH) ? amount1 : amount0; // if token0 = weth, amountToken = amount1 - amountWETH = token0 == address(WETH) ? amount0 : amount1; // if token0 = weth, amountWeth = amount0 - } - - // if we get tokens - if (amountToken > 0) { - uint256 minETH = abi.decode(data, (uint256)); // slippage parameter for V1, passed in by caller - token.approve(address(exchangeV1), amountToken); - uint256 amountReceived = exchangeV1.tokenToEthSwapInput( - amountToken, - minETH, - uint256(-1) - ); - uint256 amountRequired = UniswapV2Library.getAmountsIn( - factory, - amountToken, - path - )[0]; - assert(amountReceived > amountRequired); // fail if we didn't get enough ETH back to repay our flash loan - WETH.deposit{ value: amountRequired }(); - assert(WETH.transfer(msg.sender, amountRequired)); // return WETH to V2 pair - (bool success, ) = sender.call{ - value: amountReceived - amountRequired - }(new bytes(0)); // keep the rest! (ETH) - assert(success); - } + (bool success, bytes memory returnData) = address(this).call(data); + require(success, "ERR_UNISWAPV2_CALL_FAIL"); } /** diff --git a/contracts/test/tokens/USDC.sol b/contracts/test/tokens/USDC.sol new file mode 100644 index 00000000..88370583 --- /dev/null +++ b/contracts/test/tokens/USDC.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.2; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +contract USDC is ERC20 { + constructor( + string memory name, + string memory symbol, + uint256 initialSupply + ) public ERC20(name, symbol) { + _mint(msg.sender, initialSupply); + } + + /** + * @dev Function to mint tokens + * @param to The address that will receive the minted tokens. + * @param value The amount of tokens to mint. + * @return A boolean that indicates if the operation was successful. + */ + function mint(address to, uint256 value) public returns (bool) { + _mint(to, value); + return true; + } +} diff --git a/deploy/2_deploy_tokens.js b/deploy/2_deploy_tokens.js index de81cc4c..a53a400d 100644 --- a/deploy/2_deploy_tokens.js +++ b/deploy/2_deploy_tokens.js @@ -15,9 +15,9 @@ module.exports = async ({ getNamedAccounts, deployments }) => { args: ["ETH", "Ether", parseEther("10000")], }); - const usdcToken = await deploy("TestERC20", { + const usdcToken = await deploy("USDC", { from: deployer, - contractName: "TestERC20", + contractName: "USDC", args: ["USDC", "Stablecoin", parseEther("10000")], }); diff --git a/deploy/5_deploy_uni_connector.js b/deploy/5_deploy_uni_connector.js index bd3cf146..53feb886 100644 --- a/deploy/5_deploy_uni_connector.js +++ b/deploy/5_deploy_uni_connector.js @@ -7,9 +7,9 @@ const { ADDRESSES } = require("../test/lib/constants"); const { UNI_FACTORY, UNI_ROUTER02 } = ADDRESSES; module.exports = async ({ getNamedAccounts, deployments }) => { - const signer = ethers.provider.getSigner(deployer); const { log, deploy } = deployments; const { deployer } = await getNamedAccounts(); + const signer = ethers.provider.getSigner(deployer); const chain = await bre.getChainId(); const uniswapConnector = await deploy("UniswapConnector", { from: deployer, @@ -25,42 +25,34 @@ module.exports = async ({ getNamedAccounts, deployments }) => { const trader = await deployments.get("Trader"); let STABLECOIN; - if (chain == 4) { + if (chain == 1) { + STABLECOIN = "0x6b175474e89094c44da98b954eedeac495271d0f"; // Mainnet Dai + } else { let USDC = await deployments.get("USDC"); STABLECOIN = USDC.address; - } else if (chain == 1) { - STABLECOIN = "0x6b175474e89094c44da98b954eedeac495271d0f"; // Mainnet Dai } const quoteTokenAddress = await uniswapInstance.quoteToken(); if (quoteTokenAddress == bre.ethers.constants.AddressZero) { await uniswapInstance.setQuoteToken(STABLECOIN); } - const uniswapAddresses = await uniswapInstance.getUniswapAddresses(); - const routerAddress = uniswapAddresses.router; - const factoryAddress = uniswapAddresses.factory; + const routerAddress = await uniswapInstance.router(); + const factoryAddress = await uniswapInstance.factory(); if ( routerAddress == bre.ethers.constants.AddressZero && factoryAddress == bre.ethers.constants.AddressZero ) { - await uniswapInstance.setUniswapProtocol( - UNI_ROUTER02, - UNI_FACTORY, - true - ); + await uniswapInstance.setRouter(UNI_ROUTER02); + await uniswapInstance.setFactory(UNI_FACTORY); } - const primitiveAddresses = await uniswapInstance.getPrimitiveAddresses(); - const traderAddress = primitiveAddresses.trader; - const registryAddress = primitiveAddresses.registry; + const traderAddress = await uniswapInstance.trader(); + const registryAddress = await uniswapInstance.registry(); if ( traderAddress == bre.ethers.constants.AddressZero && registryAddress == bre.ethers.constants.AddressZero ) { - await uniswapInstance.setPrimitiveProtocol( - trader.address, - registry.address, - true - ); + await uniswapInstance.setTrader(trader.address); + await uniswapInstance.setRegistry(registry.address); } let deployed = [uniswapConnector]; diff --git a/deployments/localhost_31337/OptionFactory.json b/deployments/localhost_31337/OptionFactory.json index 2e4461be..81b0baf4 100644 --- a/deployments/localhost_31337/OptionFactory.json +++ b/deployments/localhost_31337/OptionFactory.json @@ -200,7 +200,7 @@ "transactionIndex": 0, "gasUsed": "1170529", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000800000000000001000000000000000000000000000000000000020000000000000000000800000000001000000000000000080000400000000000000000000000008000000000000000000000000000000000000000010000000000000000000000000000000020000000000200000000000000000000000000000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x537c681bcfbe78ae523b521e3d71f1c301835d2207a73d32335f0f47e44586f0", + "blockHash": "0x6ea549b06021885f1028e685fd208549ab6b207f2056985a73b9828312f12ff8", "transactionHash": "0x35e324c0cb366f501d58a343c88a89345df4ada5d774ce65d5b7f39805809833", "logs": [ { @@ -215,7 +215,7 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x537c681bcfbe78ae523b521e3d71f1c301835d2207a73d32335f0f47e44586f0" + "blockHash": "0x6ea549b06021885f1028e685fd208549ab6b207f2056985a73b9828312f12ff8" }, { "transactionIndex": 0, @@ -229,7 +229,7 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0x537c681bcfbe78ae523b521e3d71f1c301835d2207a73d32335f0f47e44586f0" + "blockHash": "0x6ea549b06021885f1028e685fd208549ab6b207f2056985a73b9828312f12ff8" } ], "blockNumber": 4, @@ -241,7 +241,7 @@ "args": [ "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7" ], - "solcInputHash": "0x6790736ad89befcaa7be92ed1ac7f7481d75836c60f47e71202b55e2673ecb84", + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"calculateOptionAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"consData\",\"type\":\"bytes\"}],\"name\":\"cloneConstructor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"deployClone\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deployOptionTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"redeemAddress\",\"type\":\"address\"}],\"name\":\"initRedeemToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionTemplate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"calculateOptionAddress(address,address,uint256,uint256,uint256)\":{\"details\":\"Calculates the option token's address using the five option parameters.\",\"returns\":{\"_0\":\"The address of the option with the parameter arguments.\"}},\"deployClone(address,address,uint256,uint256,uint256)\":{\"details\":\"Deploys a create2 clone of the option template contract.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp for option expiry.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the strike ERC-20 token.\",\"underlyingToken\":\"The address of the underlying ERC-20 token.\"}},\"deployOptionTemplate()\":{\"details\":\"Deploys the bytecode for the Option contract.\"},\"initRedeemToken(address,address)\":{\"details\":\"Only the factory can call the initRedeemToken function to set the redeem token address. This function is only callable by the Registry contract (the owner).\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/applications/factories/OptionFactory.sol\":\"OptionFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/applications/NullCloneConstructor.sol\":{\"keccak256\":\"0x986f08b84ba86c6fc0f98ece380f7c48d231c95bcaab0ea1cd346dc93397def7\",\"urls\":[\"bzz-raw://4c0d8018a1bb734d2d1c047b8d3109ce802875572206c6fcff7fd418233f989d\",\"dweb:/ipfs/QmSJrgfHPjCyQu8MRJUirvepa92ZrEkoy4RPBmTPXargtZ\"]},\"contracts/option/applications/factories/OptionFactory.sol\":{\"keccak256\":\"0x7719a6f6afd8f6174230b87b8ff9e417218b26a45604bbd3ddd7011eef00069b\",\"urls\":[\"bzz-raw://e42d76f3b3c36bd5116c1116151b30e38a3ff375f6e9e9dc7397f0ba563e4932\",\"dweb:/ipfs/QmdjYZZbKZp4YMP9jXLBk8VfofPxGDqpVnFjD9kxW9ADR4\"]},\"contracts/option/interfaces/IFlash.sol\":{\"keccak256\":\"0x7caaea0111eb7c370eb36f59936e916a7998ceb17dd5f754707e9435f1cec133\",\"urls\":[\"bzz-raw://7e432d5aca4a5f5fee04e39b1c5412fda50af319df47f44ef5e7561a60f9ad8b\",\"dweb:/ipfs/QmXfy2RYBgiHRX5JKBXJhfLV3NSgsT4DxLS7jLrqbrMdiG\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IOptionFactory.sol\":{\"keccak256\":\"0x523335d4aa7b9895d0afd9dbc14e3f3356a1d64827a6f90571c08aef54fe5a3c\",\"urls\":[\"bzz-raw://6e59a331ddd34d836f0fd2a25800cf29ccf0a5d8a074ff2aefa4072106f1388d\",\"dweb:/ipfs/QmXMEvdgdhUgprAG2fAX95imL2vdPAfsoi6NemzvbqMQvK\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/libraries/CloneLib.sol\":{\"keccak256\":\"0x982f3d93fc17c4bc21a8bc122482b6e4aae93819bc5bdf6545d9a2a43cc86381\",\"urls\":[\"bzz-raw://559f62da36cca4457d8e2e63493a425f26c8aa4edad053bdfcbc188bd6f36d22\",\"dweb:/ipfs/QmRE1yu1te4hK6eooGie9oinWVyoa9SccNtPN9ma2WyYFR\"]},\"contracts/option/libraries/OptionTemplateLib.sol\":{\"keccak256\":\"0x016a2a2070fde7d3b526b950b118f13a61bfa0e6da3e9e7779ad07cf9a82c37f\",\"urls\":[\"bzz-raw://63c816d66b8287fe6e43bdbde876fdc152bbfd7e57f4e0ac0a9a8962549b218b\",\"dweb:/ipfs/Qmf1ef9k8sjQ4aCrWDmHtBRSJpRGgKsbhCyFzxNhKhqLF3\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Option.sol\":{\"keccak256\":\"0x25d1b63eb6a225b4b99113e08a6ba78eaf7ac6e92d087c15a440ebf7ab085989\",\"urls\":[\"bzz-raw://137f3007937abd8b1bb2ef7fab95c6f833cc4f788135501db64c8cc69a87d13e\",\"dweb:/ipfs/QmYP9WRcGvZkSZheB9TeincSeH6Gm9dQVQMBPh5SjJzWyZ\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50604051620016e5380380620016e58339818101604052602081101561003557600080fd5b8101908080519060200190929190505050600061005661010960201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506101038161011160201b60201c565b50610325565b600033905090565b61011f61010960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610267576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180620016bf6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61138a80620003356000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146102835780638dd7cc90146102cd578063b570eed814610317578063d604a1ef14610321578063f2fde38b146103e357610093565b80632e53926d1461009857806335638b6b1461015a57806352e831dd146101be578063715018a614610279575b600080fd5b610118600480360360a08110156100ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050610427565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bc6004803603604081101561017057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061051e565b005b610277600480360360208110156101d457600080fd5b81019080803590602001906401000000008111156101f157600080fd5b82018360208201111561020357600080fd5b8035906020019184600183028401116401000000008311171561022557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610682565b005b610281610685565b005b61028b61080d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d5610836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031f61085c565b005b6103a1600480360360a081101561033757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061091d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610425600480360360208110156103f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c89565b005b600080610432610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018481526020018381526020018281526020019650505050505050604051602081830303815290604052805190602001209050600061050e600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610ec1565b9050809250505095945050505050565b610526610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663b43bb135826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561066657600080fd5b505af115801561067a573d6000803e3d6000fd5b505050505050565b50565b61068d610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73__$e66ec45a77c89e1b8bb13f01de0ae8794c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a057600080fd5b505af41580156108b4573d6000803e3d6000fd5b505050506040513d60208110156108ca57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000610927610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4552525f4e4f5f4445504c4f5945445f54454d504c415445000000000000000081525060200191505060405180910390fd5b6000610ab7610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140184815260200183815260200182815260200196505050505050506040516020818303038152906040528051906020012090506000610b96600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610eec565b90508073ffffffffffffffffffffffffffffffffffffffff1663d13f90b489898989896040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050600060405180830381600087803b158015610c6357600080fd5b505af1158015610c77573d6000803e3d6000fd5b50505050809250505095945050505050565b610c91610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061132f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b905090565b6000610edc82610ed085610fbe565b80519060200120610fd1565b905092915050565b600033905090565b60006060610ef984610fbe565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610fca3083610fe6565b9050919050565b6000610fde838330611261565b905092915050565b60608060006040519080825280601f01601f19166020018201604052801561101d5781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611061578082015181840152602081019050611046565b50505050905090810190601f16801561108e5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f1916602001820160405280156111495781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b81518110156112595781818151811061120357fe5b602001015160f81c60f81b83606383018151811061121d57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506111ee565b505092915050565b60008060ff60f81b83868660405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401838152602001828152602001945050505050604051602081830303815290604052805190602001209050606081901b60601c915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212206bc5c7af636179796e4d635411de3cbad2f362f9f11cd6a799fe3fc0fb4233ad64736f6c634300060200334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146102835780638dd7cc90146102cd578063b570eed814610317578063d604a1ef14610321578063f2fde38b146103e357610093565b80632e53926d1461009857806335638b6b1461015a57806352e831dd146101be578063715018a614610279575b600080fd5b610118600480360360a08110156100ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050610427565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bc6004803603604081101561017057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061051e565b005b610277600480360360208110156101d457600080fd5b81019080803590602001906401000000008111156101f157600080fd5b82018360208201111561020357600080fd5b8035906020019184600183028401116401000000008311171561022557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610682565b005b610281610685565b005b61028b61080d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d5610836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031f61085c565b005b6103a1600480360360a081101561033757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061091d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610425600480360360208110156103f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c89565b005b600080610432610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018481526020018381526020018281526020019650505050505050604051602081830303815290604052805190602001209050600061050e600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610ec1565b9050809250505095945050505050565b610526610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663b43bb135826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561066657600080fd5b505af115801561067a573d6000803e3d6000fd5b505050505050565b50565b61068d610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73__$e66ec45a77c89e1b8bb13f01de0ae8794c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a057600080fd5b505af41580156108b4573d6000803e3d6000fd5b505050506040513d60208110156108ca57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000610927610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4552525f4e4f5f4445504c4f5945445f54454d504c415445000000000000000081525060200191505060405180910390fd5b6000610ab7610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140184815260200183815260200182815260200196505050505050506040516020818303038152906040528051906020012090506000610b96600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610eec565b90508073ffffffffffffffffffffffffffffffffffffffff1663d13f90b489898989896040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050600060405180830381600087803b158015610c6357600080fd5b505af1158015610c77573d6000803e3d6000fd5b50505050809250505095945050505050565b610c91610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061132f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b905090565b6000610edc82610ed085610fbe565b80519060200120610fd1565b905092915050565b600033905090565b60006060610ef984610fbe565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610fca3083610fe6565b9050919050565b6000610fde838330611261565b905092915050565b60608060006040519080825280601f01601f19166020018201604052801561101d5781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611061578082015181840152602081019050611046565b50505050905090810190601f16801561108e5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f1916602001820160405280156111495781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b81518110156112595781818151811061120357fe5b602001015160f81c60f81b83606383018151811061121d57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506111ee565b505092915050565b60008060ff60f81b83868660405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401838152602001828152602001945050505050604051602081830303815290604052805190602001209050606081901b60601c915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212206bc5c7af636179796e4d635411de3cbad2f362f9f11cd6a799fe3fc0fb4233ad64736f6c63430006020033", @@ -297,7 +297,7 @@ "type": "t_address" }, { - "astId": 4357, + "astId": 4907, "contract": "contracts/option/applications/factories/OptionFactory.sol:OptionFactory", "label": "optionTemplate", "offset": 0, diff --git a/deployments/localhost_31337/OptionTemplateLib.json b/deployments/localhost_31337/OptionTemplateLib.json index 6d5fc851..90cb925e 100644 --- a/deployments/localhost_31337/OptionTemplateLib.json +++ b/deployments/localhost_31337/OptionTemplateLib.json @@ -7,7 +7,7 @@ "transactionIndex": 0, "gasUsed": "4032692", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1ed6c7e50bf469881e3d6a9aa3a51b178ddb442b3dfb6b4073b91c3ebdc61cdf", + "blockHash": "0xaaca74d231a5a6a63095c6e702e7e7f79f8e25015197f16473a5a8c07c1d67b9", "transactionHash": "0xc866fdda2f3c1258ccd2bdba65fc1a7a4687bcdbac19b59c697ca58b46393965", "logs": [], "blockNumber": 1, @@ -17,7 +17,7 @@ }, "address": "0x7c2C195CD6D34B8F845992d380aADB2730bB9C6F", "args": [], - "solcInputHash": "0x6790736ad89befcaa7be92ed1ac7f7481d75836c60f47e71202b55e2673ecb84", + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{\"deployTemplate()\":{\"details\":\"Deploys a clone of the deployed Option.sol contract.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/libraries/OptionTemplateLib.sol\":\"OptionTemplateLib\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/interfaces/IFlash.sol\":{\"keccak256\":\"0x7caaea0111eb7c370eb36f59936e916a7998ceb17dd5f754707e9435f1cec133\",\"urls\":[\"bzz-raw://7e432d5aca4a5f5fee04e39b1c5412fda50af319df47f44ef5e7561a60f9ad8b\",\"dweb:/ipfs/QmXfy2RYBgiHRX5JKBXJhfLV3NSgsT4DxLS7jLrqbrMdiG\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/libraries/OptionTemplateLib.sol\":{\"keccak256\":\"0x016a2a2070fde7d3b526b950b118f13a61bfa0e6da3e9e7779ad07cf9a82c37f\",\"urls\":[\"bzz-raw://63c816d66b8287fe6e43bdbde876fdc152bbfd7e57f4e0ac0a9a8962549b218b\",\"dweb:/ipfs/Qmf1ef9k8sjQ4aCrWDmHtBRSJpRGgKsbhCyFzxNhKhqLF3\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Option.sol\":{\"keccak256\":\"0x25d1b63eb6a225b4b99113e08a6ba78eaf7ac6e92d087c15a440ebf7ab085989\",\"urls\":[\"bzz-raw://137f3007937abd8b1bb2ef7fab95c6f833cc4f788135501db64c8cc69a87d13e\",\"dweb:/ipfs/QmYP9WRcGvZkSZheB9TeincSeH6Gm9dQVQMBPh5SjJzWyZ\"]}},\"version\":1}", "bytecode": "0x61484e610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b614571806102a88339019056fe608060405234801561001057600080fd5b50614551806100206000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c8063787eae301161010f578063a5ea11da116100a2578063c45a015511610071578063c45a015514610b11578063d13f90b414610b5b578063dd62ed3e14610bdd578063fa9ad7c414610c55576101e4565b8063a5ea11da14610984578063a9059cbb14610a49578063b43bb13514610aaf578063b592a13814610af3576101e4565b806395d89b41116100de57806395d89b41146107bf578063a1a4076114610842578063a457c2d71461088c578063a49b41d4146108f2576101e4565b8063787eae30146105cd5780637a4fe3871461068b57806383499805146106a957806387685fb91461070f576101e4565b806325cb5bc011610187578063440f5fd211610156578063440f5fd2146104ae5780634a9d1036146104f85780635e86929d1461051d57806370a0823114610575576101e4565b806325cb5bc0146103bc5780632f310bad146103da578063313ce567146104245780633950935114610448576101e4565b8063095ea7b3116101c3578063095ea7b31461029457806318160ddd146102fa5780631f12b3f81461031857806323b872dd14610336576101e4565b8062fe19fa146101e957806302a5fea21461020757806306fdde0314610211575b600080fd5b6101f1610cb4565b6040518082815260200191505060405180910390f35b61020f610cc0565b005b610219610f3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561025957808201518184015260208101905061023e565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e0600480360360408110156102aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f75565b604051808215151515815260200191505060405180910390f35b610302610f93565b6040518082815260200191505060405180910390f35b610320610f9d565b6040518082815260200191505060405180910390f35b6103a26004803603606081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fa3565b604051808215151515815260200191505060405180910390f35b6103c461107c565b6040518082815260200191505060405180910390f35b6103e2611089565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61042c6110af565b604051808260ff1660ff16815260200191505060405180910390f35b6104946004803603604081101561045e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110b4565b604051808215151515815260200191505060405180910390f35b6104b6611167565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610500611194565b604051808381526020018281526020019250505060405180910390f35b61055f6004803603602081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111a5565b6040518082815260200191505060405180910390f35b6105b76004803603602081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116fe565b6040518082815260200191505060405180910390f35b61066e600480360360608110156105e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561062a57600080fd5b82018360208201111561063c57600080fd5b8035906020019184600183028401116401000000008311171561065e57600080fd5b9091929391929390505050611746565b604051808381526020018281526020019250505060405180910390f35b610693611f87565b6040518082815260200191505060405180910390f35b6106eb600480360360208110156106bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f8d565b60405180848152602001838152602001828152602001935050505060405180910390f35b61071761257b565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b6107c76125fa565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108075780820151818401526020810190506107ec565b50505050905090810190601f1680156108345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61084a612633565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108d8600480360360408110156108a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612660565b604051808215151515815260200191505060405180910390f35b6108fa61272d565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060405180910390f35b61098c612791565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838152602001828152602001965050505050505060405180910390f35b610a9560048036036040811015610a5f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128cc565b604051808215151515815260200191505060405180910390f35b610af160048036036020811015610ac557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128ea565b005b610afb612b0f565b6040518082815260200191505060405180910390f35b610b19612b1c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bdb600480360360a0811015610b7157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612b42565b005b610c3f60048036036040811015610bf357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f71565b6040518082815260200191505060405180910390f35b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ff8565b604051808381526020018281526020019250505060405180910390f35b60006003800154905090565b600b60149054906101000a900460ff16610d42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff021916908315150217905550610f1f600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610e0257600080fd5b505afa158015610e16573d6000803e3d6000fd5b505050506040513d6020811015610e2c57600080fd5b8101908080519060200190929190505050600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610edf57600080fd5b505afa158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b810190808051906020019092919050505061340a565b6001600b60146101000a81548160ff021916908315150217905550565b6040518060400160405280601381526020017f5072696d6974697665205631204f7074696f6e0000000000000000000000000081525081565b6000610f89610f8261345b565b8484613463565b6001905092915050565b6000600254905090565b60095481565b6000610fb084848461365a565b61107184610fbc61345b565b61106c8560405180606001604052806028815260200161443b60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061102261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b600190509392505050565b6000600360040154905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b600061115d6110c161345b565b8461115885600160006110d261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b613463565b6001905092915050565b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600854600954915091509091565b6000600b60149054906101000a900460ff16611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d602081101561133e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156113d057600080fd5b505afa1580156113e4573d6000803e3d6000fd5b505050506040513d60208110156113fa57600080fd5b8101908080519060200190929190505050905060008111611483576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b808210156114f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16639dc29fac30836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561158057600080fd5b505af1158015611594573d6000803e3d6000fd5b505050506115c386828673ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561164057600080fd5b505afa158015611654573d6000803e3d6000fd5b505050506040513d602081101561166a57600080fd5b810190808051906020019092919050505091506116896008548361340a565b3373ffffffffffffffffffffffffffffffffffffffff167f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6826040518082815260200191505060405180910390a2809450505050506001600b60146101000a81548160ff021916908315150217905550919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080600b60149054906101000a900460ff166117cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506117ee613b1b565b611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008611611900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b858173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561197e57600080fd5b505afa158015611992573d6000803e3d6000fd5b505050506040513d60208110156119a857600080fd5b81019080805190602001909291905050501015611a2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b611a5887878373ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b6000858590501115611b38578673ffffffffffffffffffffffffffffffffffffffff16636511d275338888886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611b1f57600080fd5b505af1158015611b33573d6000803e3d6000fd5b505050505b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611bdc57600080fd5b505afa158015611bf0573d6000803e3d6000fd5b505050506040513d6020811015611c0657600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c9857600080fd5b505afa158015611cac573d6000803e3d6000fd5b505050506040513d6020811015611cc257600080fd5b810190808051906020019092919050505090506000611cec60095484613b2b90919063ffffffff16565b90506000611d17611d088b600854613b2b90919063ffffffff16565b84613b2b90919063ffffffff16565b90506000821180611d285750600081115b611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008a8211611dbb57611db6828c613b2b90919063ffffffff16565b611dbe565b60005b90506000611df0600360020154611de2600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000611dfd306116fe565b905081851015611e75576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f535452494b45535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b82811015611eeb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f4f5054494f4e535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b611ef53082613c45565b611eff868861340a565b3373ffffffffffffffffffffffffffffffffffffffff167f7fb8af33a94ca7bd709d59757a015eb48270f350724a5409fd77b579d0b7247d8e87604051808381526020018281526020019250505060405180910390a284819950995050505050505050506001600b60146101000a81548160ff02191690831515021790555094509492505050565b60085481565b6000806000600b60149054906101000a900460ff16612014576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156120ff57600080fd5b505afa158015612113573d6000803e3d6000fd5b505050506040513d602081101561212957600080fd5b810190808051906020019092919050505090506000612147306116fe565b905060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121c857600080fd5b505afa1580156121dc573d6000803e3d6000fd5b505050506040513d60208110156121f257600080fd5b810190808051906020019092919050505090506000612235600380015461222760036002015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000612241613b1b565b61224b578161224d565b835b905060008311801561225f5750600081115b6122d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8181101580156122e15750818510155b612353576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b61235b613b1b565b1561236b5761236a3082613c45565b5b8573ffffffffffffffffffffffffffffffffffffffff16639dc29fac30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156123f257600080fd5b505af1158015612406573d6000803e3d6000fd5b505050506124358b838973ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156124b257600080fd5b505afa1580156124c6573d6000803e3d6000fd5b505050506040513d60208110156124dc57600080fd5b810190808051906020019092919050505094506124fb8560095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f684222b0069d4a2e5e0d986611cc5182d543904c4e4264bf770d4e51faefc822836040518082815260200191505060405180910390a2828183995099509950505050505050506001600b60146101000a81548160ff0219169083151502179055509193909250565b6000806000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925092509250909192565b6040518060400160405280600381526020017f50524d000000000000000000000000000000000000000000000000000000000081525081565b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600061272361266d61345b565b8461271e856040518060600160405280602581526020016144f7602591396001600061269761345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b6001905092915050565b60038060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154905085565b6000806000806000806127a2614331565b60036040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820154815260200160048201548152505090508060000151965080602001519550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945080604001519350806060015192508060800151915050909192939495565b60006128e06128d961345b565b848461365a565b6001905092915050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146129ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f52454445454d5f494e495449414c495a45440000000000000000000081525060200191505060405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d82022efb79096928f354aadac8912185187b551963720c3cf4db45f2b3fea60405160405180910390a350565b6000600360020154905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612c06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612ca8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b60008311612d1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008211612d94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b42811015612e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b33600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815250600360008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030155608082015181600401559050506001600b60146101000a81548160ff0219169083151502179055505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080600b60149054906101000a900460ff1661307d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506130a0613b1b565b613112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156131b657600080fd5b505afa1580156131ca573d6000803e3d6000fd5b505050506040513d60208110156131e057600080fd5b81019080805190602001909291905050509050600061320a60085483613b2b90919063ffffffff16565b9050600061323c60036002015461322e600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b9050600081116132b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1987836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561335d57600080fd5b505af1158015613371573d6000803e3d6000fd5b5050505061337f8683613e09565b61338b8360095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8383604051808381526020018281526020019250505060405180910390a28181945094505050506001600b60146101000a81548160ff021916908315150217905550915091565b81600881905550806009819055507f5a1c3e4cdfd0698a8d6ff240a75a16c8b2f07d2b7579bb89c8065077eda06d5f8282604051808381526020018281526020019250505060405180910390a15050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156134e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806144a96024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561356f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806143d26022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806144846025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061438d6023913960400191505060405180910390fd5b613771838383613fd0565b6137dc816040518060600160405280602681526020016143f4602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061386f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906139c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561398d578082015181840152602081019050613972565b50505050905090810190601f1680156139ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015613a59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b613b168363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613fd5565b505050565b6000426003600401541015905090565b6000613b6d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061391b565b905092915050565b600080831415613b885760009050613bf5565b6000828402905082848281613b9957fe5b0414613bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061441a6021913960400191505060405180910390fd5b809150505b92915050565b6000613c3d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614220565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806144636021913960400191505060405180910390fd5b613cd782600083613fd0565b613d42816040518060600160405280602281526020016143b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613d9981600254613b2b90919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613eac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b613eb860008383613fd0565b613ecd816002546139db90919063ffffffff16565b600281905550613f24816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b613ff48273ffffffffffffffffffffffffffffffffffffffff166142e6565b614066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106140b55780518252602082019150602081019050602083039250614092565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614117576040519150601f19603f3d011682016040523d82523d6000602084013e61411c565b606091505b509150915081614194576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561421a578080602001905160208110156141b357600080fd5b8101908080519060200190929190505050614219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806144cd602a913960400191505060405180910390fd5b5b50505050565b600080831182906142cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614291578082015181840152602081019050614276565b50505050905090810190601f1680156142be5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816142d857fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561432857506000801b8214155b92505050919050565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212200ddee87d0e0d8cdf46c88c878b0350291189424c3a5caca5e3f6ecb64003c56864736f6c63430006020033a26469706673582212206dbead405b0f5ae8aa6ce05b134c2557b7c9ef09655f3f97b6f8ec572fd7f08964736f6c63430006020033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b614571806102a88339019056fe608060405234801561001057600080fd5b50614551806100206000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c8063787eae301161010f578063a5ea11da116100a2578063c45a015511610071578063c45a015514610b11578063d13f90b414610b5b578063dd62ed3e14610bdd578063fa9ad7c414610c55576101e4565b8063a5ea11da14610984578063a9059cbb14610a49578063b43bb13514610aaf578063b592a13814610af3576101e4565b806395d89b41116100de57806395d89b41146107bf578063a1a4076114610842578063a457c2d71461088c578063a49b41d4146108f2576101e4565b8063787eae30146105cd5780637a4fe3871461068b57806383499805146106a957806387685fb91461070f576101e4565b806325cb5bc011610187578063440f5fd211610156578063440f5fd2146104ae5780634a9d1036146104f85780635e86929d1461051d57806370a0823114610575576101e4565b806325cb5bc0146103bc5780632f310bad146103da578063313ce567146104245780633950935114610448576101e4565b8063095ea7b3116101c3578063095ea7b31461029457806318160ddd146102fa5780631f12b3f81461031857806323b872dd14610336576101e4565b8062fe19fa146101e957806302a5fea21461020757806306fdde0314610211575b600080fd5b6101f1610cb4565b6040518082815260200191505060405180910390f35b61020f610cc0565b005b610219610f3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561025957808201518184015260208101905061023e565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e0600480360360408110156102aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f75565b604051808215151515815260200191505060405180910390f35b610302610f93565b6040518082815260200191505060405180910390f35b610320610f9d565b6040518082815260200191505060405180910390f35b6103a26004803603606081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fa3565b604051808215151515815260200191505060405180910390f35b6103c461107c565b6040518082815260200191505060405180910390f35b6103e2611089565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61042c6110af565b604051808260ff1660ff16815260200191505060405180910390f35b6104946004803603604081101561045e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110b4565b604051808215151515815260200191505060405180910390f35b6104b6611167565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610500611194565b604051808381526020018281526020019250505060405180910390f35b61055f6004803603602081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111a5565b6040518082815260200191505060405180910390f35b6105b76004803603602081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116fe565b6040518082815260200191505060405180910390f35b61066e600480360360608110156105e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561062a57600080fd5b82018360208201111561063c57600080fd5b8035906020019184600183028401116401000000008311171561065e57600080fd5b9091929391929390505050611746565b604051808381526020018281526020019250505060405180910390f35b610693611f87565b6040518082815260200191505060405180910390f35b6106eb600480360360208110156106bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f8d565b60405180848152602001838152602001828152602001935050505060405180910390f35b61071761257b565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b6107c76125fa565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108075780820151818401526020810190506107ec565b50505050905090810190601f1680156108345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61084a612633565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108d8600480360360408110156108a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612660565b604051808215151515815260200191505060405180910390f35b6108fa61272d565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060405180910390f35b61098c612791565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838152602001828152602001965050505050505060405180910390f35b610a9560048036036040811015610a5f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128cc565b604051808215151515815260200191505060405180910390f35b610af160048036036020811015610ac557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128ea565b005b610afb612b0f565b6040518082815260200191505060405180910390f35b610b19612b1c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bdb600480360360a0811015610b7157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612b42565b005b610c3f60048036036040811015610bf357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f71565b6040518082815260200191505060405180910390f35b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ff8565b604051808381526020018281526020019250505060405180910390f35b60006003800154905090565b600b60149054906101000a900460ff16610d42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff021916908315150217905550610f1f600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610e0257600080fd5b505afa158015610e16573d6000803e3d6000fd5b505050506040513d6020811015610e2c57600080fd5b8101908080519060200190929190505050600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610edf57600080fd5b505afa158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b810190808051906020019092919050505061340a565b6001600b60146101000a81548160ff021916908315150217905550565b6040518060400160405280601381526020017f5072696d6974697665205631204f7074696f6e0000000000000000000000000081525081565b6000610f89610f8261345b565b8484613463565b6001905092915050565b6000600254905090565b60095481565b6000610fb084848461365a565b61107184610fbc61345b565b61106c8560405180606001604052806028815260200161443b60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061102261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b600190509392505050565b6000600360040154905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b600061115d6110c161345b565b8461115885600160006110d261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b613463565b6001905092915050565b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600854600954915091509091565b6000600b60149054906101000a900460ff16611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d602081101561133e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156113d057600080fd5b505afa1580156113e4573d6000803e3d6000fd5b505050506040513d60208110156113fa57600080fd5b8101908080519060200190929190505050905060008111611483576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b808210156114f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16639dc29fac30836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561158057600080fd5b505af1158015611594573d6000803e3d6000fd5b505050506115c386828673ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561164057600080fd5b505afa158015611654573d6000803e3d6000fd5b505050506040513d602081101561166a57600080fd5b810190808051906020019092919050505091506116896008548361340a565b3373ffffffffffffffffffffffffffffffffffffffff167f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6826040518082815260200191505060405180910390a2809450505050506001600b60146101000a81548160ff021916908315150217905550919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080600b60149054906101000a900460ff166117cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506117ee613b1b565b611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008611611900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b858173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561197e57600080fd5b505afa158015611992573d6000803e3d6000fd5b505050506040513d60208110156119a857600080fd5b81019080805190602001909291905050501015611a2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b611a5887878373ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b6000858590501115611b38578673ffffffffffffffffffffffffffffffffffffffff16636511d275338888886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611b1f57600080fd5b505af1158015611b33573d6000803e3d6000fd5b505050505b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611bdc57600080fd5b505afa158015611bf0573d6000803e3d6000fd5b505050506040513d6020811015611c0657600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c9857600080fd5b505afa158015611cac573d6000803e3d6000fd5b505050506040513d6020811015611cc257600080fd5b810190808051906020019092919050505090506000611cec60095484613b2b90919063ffffffff16565b90506000611d17611d088b600854613b2b90919063ffffffff16565b84613b2b90919063ffffffff16565b90506000821180611d285750600081115b611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008a8211611dbb57611db6828c613b2b90919063ffffffff16565b611dbe565b60005b90506000611df0600360020154611de2600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000611dfd306116fe565b905081851015611e75576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f535452494b45535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b82811015611eeb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f4f5054494f4e535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b611ef53082613c45565b611eff868861340a565b3373ffffffffffffffffffffffffffffffffffffffff167f7fb8af33a94ca7bd709d59757a015eb48270f350724a5409fd77b579d0b7247d8e87604051808381526020018281526020019250505060405180910390a284819950995050505050505050506001600b60146101000a81548160ff02191690831515021790555094509492505050565b60085481565b6000806000600b60149054906101000a900460ff16612014576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156120ff57600080fd5b505afa158015612113573d6000803e3d6000fd5b505050506040513d602081101561212957600080fd5b810190808051906020019092919050505090506000612147306116fe565b905060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121c857600080fd5b505afa1580156121dc573d6000803e3d6000fd5b505050506040513d60208110156121f257600080fd5b810190808051906020019092919050505090506000612235600380015461222760036002015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000612241613b1b565b61224b578161224d565b835b905060008311801561225f5750600081115b6122d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8181101580156122e15750818510155b612353576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b61235b613b1b565b1561236b5761236a3082613c45565b5b8573ffffffffffffffffffffffffffffffffffffffff16639dc29fac30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156123f257600080fd5b505af1158015612406573d6000803e3d6000fd5b505050506124358b838973ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156124b257600080fd5b505afa1580156124c6573d6000803e3d6000fd5b505050506040513d60208110156124dc57600080fd5b810190808051906020019092919050505094506124fb8560095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f684222b0069d4a2e5e0d986611cc5182d543904c4e4264bf770d4e51faefc822836040518082815260200191505060405180910390a2828183995099509950505050505050506001600b60146101000a81548160ff0219169083151502179055509193909250565b6000806000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925092509250909192565b6040518060400160405280600381526020017f50524d000000000000000000000000000000000000000000000000000000000081525081565b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600061272361266d61345b565b8461271e856040518060600160405280602581526020016144f7602591396001600061269761345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b6001905092915050565b60038060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154905085565b6000806000806000806127a2614331565b60036040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820154815260200160048201548152505090508060000151965080602001519550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945080604001519350806060015192508060800151915050909192939495565b60006128e06128d961345b565b848461365a565b6001905092915050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146129ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f52454445454d5f494e495449414c495a45440000000000000000000081525060200191505060405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d82022efb79096928f354aadac8912185187b551963720c3cf4db45f2b3fea60405160405180910390a350565b6000600360020154905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612c06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612ca8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b60008311612d1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008211612d94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b42811015612e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b33600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815250600360008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030155608082015181600401559050506001600b60146101000a81548160ff0219169083151502179055505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080600b60149054906101000a900460ff1661307d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506130a0613b1b565b613112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156131b657600080fd5b505afa1580156131ca573d6000803e3d6000fd5b505050506040513d60208110156131e057600080fd5b81019080805190602001909291905050509050600061320a60085483613b2b90919063ffffffff16565b9050600061323c60036002015461322e600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b9050600081116132b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1987836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561335d57600080fd5b505af1158015613371573d6000803e3d6000fd5b5050505061337f8683613e09565b61338b8360095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8383604051808381526020018281526020019250505060405180910390a28181945094505050506001600b60146101000a81548160ff021916908315150217905550915091565b81600881905550806009819055507f5a1c3e4cdfd0698a8d6ff240a75a16c8b2f07d2b7579bb89c8065077eda06d5f8282604051808381526020018281526020019250505060405180910390a15050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156134e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806144a96024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561356f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806143d26022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806144846025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061438d6023913960400191505060405180910390fd5b613771838383613fd0565b6137dc816040518060600160405280602681526020016143f4602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061386f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906139c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561398d578082015181840152602081019050613972565b50505050905090810190601f1680156139ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015613a59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b613b168363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613fd5565b505050565b6000426003600401541015905090565b6000613b6d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061391b565b905092915050565b600080831415613b885760009050613bf5565b6000828402905082848281613b9957fe5b0414613bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061441a6021913960400191505060405180910390fd5b809150505b92915050565b6000613c3d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614220565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806144636021913960400191505060405180910390fd5b613cd782600083613fd0565b613d42816040518060600160405280602281526020016143b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613d9981600254613b2b90919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613eac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b613eb860008383613fd0565b613ecd816002546139db90919063ffffffff16565b600281905550613f24816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b613ff48273ffffffffffffffffffffffffffffffffffffffff166142e6565b614066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106140b55780518252602082019150602081019050602083039250614092565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614117576040519150601f19603f3d011682016040523d82523d6000602084013e61411c565b606091505b509150915081614194576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561421a578080602001905160208110156141b357600080fd5b8101908080519060200190929190505050614219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806144cd602a913960400191505060405180910390fd5b5b50505050565b600080831182906142cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614291578082015181840152602081019050614276565b50505050905090810190601f1680156142be5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816142d857fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561432857506000801b8214155b92505050919050565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212200ddee87d0e0d8cdf46c88c878b0350291189424c3a5caca5e3f6ecb64003c56864736f6c63430006020033a26469706673582212206dbead405b0f5ae8aa6ce05b134c2557b7c9ef09655f3f97b6f8ec572fd7f08964736f6c63430006020033", diff --git a/deployments/localhost_31337/RedeemFactory.json b/deployments/localhost_31337/RedeemFactory.json index e3a8ee08..2b6f32f0 100644 --- a/deployments/localhost_31337/RedeemFactory.json +++ b/deployments/localhost_31337/RedeemFactory.json @@ -123,7 +123,7 @@ "transactionIndex": 0, "gasUsed": "852141", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000001000000000400000000000000000000000000022000000000000000000800000000001000000000000000080000400000000000000000000000008000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9d2aff7f14ab10ae5a974527716eec66487faad6585c6036080a490ef7e30988", + "blockHash": "0x48bbaf5fb4dd9122d3371790ad0fa5bbcaf3c8af8cfb7d177a5bee8cb63621ff", "transactionHash": "0xdf07c4ef6bed622d905a3c285bf9f59c85cd8f1c22d23249f629239bc1acbaa8", "logs": [ { @@ -138,7 +138,7 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x9d2aff7f14ab10ae5a974527716eec66487faad6585c6036080a490ef7e30988" + "blockHash": "0x48bbaf5fb4dd9122d3371790ad0fa5bbcaf3c8af8cfb7d177a5bee8cb63621ff" }, { "transactionIndex": 0, @@ -152,7 +152,7 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0x9d2aff7f14ab10ae5a974527716eec66487faad6585c6036080a490ef7e30988" + "blockHash": "0x48bbaf5fb4dd9122d3371790ad0fa5bbcaf3c8af8cfb7d177a5bee8cb63621ff" } ], "blockNumber": 5, @@ -164,7 +164,7 @@ "args": [ "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7" ], - "solcInputHash": "0x6790736ad89befcaa7be92ed1ac7f7481d75836c60f47e71202b55e2673ecb84", + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"consData\",\"type\":\"bytes\"}],\"name\":\"cloneConstructor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionToken\",\"type\":\"address\"}],\"name\":\"deployClone\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deployRedeemTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemTemplate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"deployClone(address)\":{\"details\":\"Deploys a cloned instance of the template Redeem contract.\",\"params\":{\"optionToken\":\"The address of the option token which this redeem clone will be paired with.\"},\"returns\":{\"_0\":\"redeemAddress The address of the deployed Redeem token clone.\"}},\"deployRedeemTemplate()\":{\"details\":\"Deploys the full bytecode of the Redeem contract to be used as a template for clones.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/applications/factories/RedeemFactory.sol\":\"RedeemFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/applications/NullCloneConstructor.sol\":{\"keccak256\":\"0x986f08b84ba86c6fc0f98ece380f7c48d231c95bcaab0ea1cd346dc93397def7\",\"urls\":[\"bzz-raw://4c0d8018a1bb734d2d1c047b8d3109ce802875572206c6fcff7fd418233f989d\",\"dweb:/ipfs/QmSJrgfHPjCyQu8MRJUirvepa92ZrEkoy4RPBmTPXargtZ\"]},\"contracts/option/applications/factories/RedeemFactory.sol\":{\"keccak256\":\"0xf98b63c21122483ede3f062b9561be991f61b32f36b721b462d3ac3a0c550e95\",\"urls\":[\"bzz-raw://8543c89e929ea4eb33a40c4d4cea3d1b7c27ec0bfc903d8e5fced98a438e0226\",\"dweb:/ipfs/QmNaKchRQJCqnA2oyZvbt9JJyY6wRR5oRexgTusYKxAyqc\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/interfaces/IRedeemFactory.sol\":{\"keccak256\":\"0xe08632c1198fa61a3848da09b11fd427f3fedfc1c1e3b8176e3ce2055e7ae208\",\"urls\":[\"bzz-raw://563f70356a74c1e98a4b90c96848082914292d758271cb529e10abd53cd88960\",\"dweb:/ipfs/QmRD4esxBckRUmERKuamJBPLTz7ukGcQj1PRzyQZNm5uo5\"]},\"contracts/option/libraries/CloneLib.sol\":{\"keccak256\":\"0x982f3d93fc17c4bc21a8bc122482b6e4aae93819bc5bdf6545d9a2a43cc86381\",\"urls\":[\"bzz-raw://559f62da36cca4457d8e2e63493a425f26c8aa4edad053bdfcbc188bd6f36d22\",\"dweb:/ipfs/QmRE1yu1te4hK6eooGie9oinWVyoa9SccNtPN9ma2WyYFR\"]},\"contracts/option/libraries/RedeemTemplateLib.sol\":{\"keccak256\":\"0x32d84298d723ba5276fab8128c26fe0855c62e5145ca2575a56e236e10c94398\",\"urls\":[\"bzz-raw://7c72dafc9e05d048224c1041ed2b424e5843e6d7412a0e82f734d38129b00457\",\"dweb:/ipfs/QmXkGKwoyhGCvtNZW2sCpWFn7uCTLnq1j6xqYUcNzTU3bU\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Redeem.sol\":{\"keccak256\":\"0x1057014625bc86d3b02faa35824d283d5baa6ae14b59a4561b0b27d342173090\",\"urls\":[\"bzz-raw://b51f63b92eb53fd5ed6cb48f66609a259f34d95af2c7796049951f667e405a4d\",\"dweb:/ipfs/QmWdT3TbmVrvPkLJw2DYLWecnoNabZ2CAQLnDLpHDPPn1o\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161111c38038061111c8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600061005461010760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506101018161010f60201b60201c565b50610322565b600033905090565b61011d61010760201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146101de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610264576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806110f66026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610dc5806103316000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146101515780639951c8af1461019b578063f2fde38b146101e5578063fe8d6396146102295761007d565b80631458ab4a1461008257806352e831dd1461008c578063715018a614610147575b600080fd5b61008a6102ad565b005b610145600480360360208110156100a257600080fd5b81019080803590602001906401000000008111156100bf57600080fd5b8201836020820111156100d157600080fd5b803590602001918460018302840111640100000000831117156100f357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061036e565b005b61014f610371565b005b6101596104f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a3610522565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610227600480360360208110156101fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610548565b005b61026b6004803603602081101561023f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610755565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b73__$9d5e8c0708ade2d55359313f562ebf5c4c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f157600080fd5b505af4158015610305573d6000803e3d6000fd5b505050506040513d602081101561031b57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b50565b6103796109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461043a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6105506109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610611576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610697576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061075f6109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600061082a6109de565b6108326104f9565b84604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401935050505060405160208183030381529060405280519060200120905060006108f8600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610a09565b90508073ffffffffffffffffffffffffffffffffffffffff1663485cc95561091e6104f9565b866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b505050508092505050919050565b600033905090565b60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b905090565b60006060610a1684610adb565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ad3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610ae73083610aee565b9050919050565b60608060006040519080825280601f01601f191660200182016040528015610b255781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015610b69578082015181840152602081019050610b4e565b50505050905090810190601f168015610b965780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f191660200182016040528015610c515781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b8151811015610d6157818181518110610d0b57fe5b602001015160f81c60f81b836063830181518110610d2557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610cf6565b50509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122056de3fe6d076c1320c7cff7d8ae33f9b2dbd3b3e6bd70282bf7aea822759c45e64736f6c634300060200334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146101515780639951c8af1461019b578063f2fde38b146101e5578063fe8d6396146102295761007d565b80631458ab4a1461008257806352e831dd1461008c578063715018a614610147575b600080fd5b61008a6102ad565b005b610145600480360360208110156100a257600080fd5b81019080803590602001906401000000008111156100bf57600080fd5b8201836020820111156100d157600080fd5b803590602001918460018302840111640100000000831117156100f357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061036e565b005b61014f610371565b005b6101596104f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a3610522565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610227600480360360208110156101fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610548565b005b61026b6004803603602081101561023f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610755565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b73__$9d5e8c0708ade2d55359313f562ebf5c4c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f157600080fd5b505af4158015610305573d6000803e3d6000fd5b505050506040513d602081101561031b57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b50565b6103796109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461043a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6105506109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610611576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610697576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061075f6109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600061082a6109de565b6108326104f9565b84604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401935050505060405160208183030381529060405280519060200120905060006108f8600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610a09565b90508073ffffffffffffffffffffffffffffffffffffffff1663485cc95561091e6104f9565b866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b505050508092505050919050565b600033905090565b60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b905090565b60006060610a1684610adb565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ad3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610ae73083610aee565b9050919050565b60608060006040519080825280601f01601f191660200182016040528015610b255781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015610b69578082015181840152602081019050610b4e565b50505050905090810190601f168015610b965780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f191660200182016040528015610c515781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b8151811015610d6157818181518110610d0b57fe5b602001015160f81c60f81b836063830181518110610d2557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610cf6565b50509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122056de3fe6d076c1320c7cff7d8ae33f9b2dbd3b3e6bd70282bf7aea822759c45e64736f6c63430006020033", @@ -210,7 +210,7 @@ "type": "t_address" }, { - "astId": 4536, + "astId": 5086, "contract": "contracts/option/applications/factories/RedeemFactory.sol:RedeemFactory", "label": "redeemTemplate", "offset": 0, diff --git a/deployments/localhost_31337/RedeemTemplateLib.json b/deployments/localhost_31337/RedeemTemplateLib.json index 4f72434a..ae51a923 100644 --- a/deployments/localhost_31337/RedeemTemplateLib.json +++ b/deployments/localhost_31337/RedeemTemplateLib.json @@ -7,7 +7,7 @@ "transactionIndex": 0, "gasUsed": "1610382", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xefa5cb9b61e79004f0111ab34d26343eb9d40f15d0015ffb0a714137bb59b673", + "blockHash": "0xe7428b107dda6e33ffb2053aa6c0ba52da0050e2919f6aa0088d56633d0d92c4", "transactionHash": "0xd62feceac146592f2ea4dd3e2e02936386b62e4c960a41c70252da64e8561dd4", "logs": [], "blockNumber": 2, @@ -17,7 +17,7 @@ }, "address": "0x8858eeB3DfffA017D4BCE9801D340D36Cf895CCf", "args": [], - "solcInputHash": "0x6790736ad89befcaa7be92ed1ac7f7481d75836c60f47e71202b55e2673ecb84", + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{\"deployTemplate()\":{\"details\":\"Deploys a clone of the deployed Redeem.sol contract.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/libraries/RedeemTemplateLib.sol\":\"RedeemTemplateLib\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/libraries/RedeemTemplateLib.sol\":{\"keccak256\":\"0x32d84298d723ba5276fab8128c26fe0855c62e5145ca2575a56e236e10c94398\",\"urls\":[\"bzz-raw://7c72dafc9e05d048224c1041ed2b424e5843e6d7412a0e82f734d38129b00457\",\"dweb:/ipfs/QmXkGKwoyhGCvtNZW2sCpWFn7uCTLnq1j6xqYUcNzTU3bU\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Redeem.sol\":{\"keccak256\":\"0x1057014625bc86d3b02faa35824d283d5baa6ae14b59a4561b0b27d342173090\",\"urls\":[\"bzz-raw://b51f63b92eb53fd5ed6cb48f66609a259f34d95af2c7796049951f667e405a4d\",\"dweb:/ipfs/QmWdT3TbmVrvPkLJw2DYLWecnoNabZ2CAQLnDLpHDPPn1o\"]}},\"version\":1}", "bytecode": "0x611c45610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b611968806102a88339019056fe608060405234801561001057600080fd5b50611948806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063485cc95511610097578063a457c2d711610066578063a457c2d714610541578063a9059cbb146105a7578063c45a01551461060d578063dd62ed3e1461065757610100565b8063485cc955146103b457806370a082311461041857806395d89b41146104705780639dc29fac146104f357610100565b80632bab754b116100d35780632bab754b14610292578063313ce567146102dc578063395093511461030057806340c10f191461036657610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ee57806323b872dd1461020c575b600080fd5b61010d6106cf565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610708565b604051808215151515815260200191505060405180910390f35b6101f6610726565b6040518082815260200191505060405180910390f35b6102786004803603606081101561022257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610730565b604051808215151515815260200191505060405180910390f35b61029a610809565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102e461082f565b604051808260ff1660ff16815260200191505060405180910390f35b61034c6004803603604081101561031657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610834565b604051808215151515815260200191505060405180910390f35b6103b26004803603604081101561037c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108e7565b005b610416600480360360408110156103ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109b8565b005b61045a6004803603602081101561042e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b02565b6040518082815260200191505060405180910390f35b610478610b4a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b857808201518184015260208101905061049d565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61053f6004803603604081101561050957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b83565b005b61058d6004803603604081101561055757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c54565b604051808215151515815260200191505060405180910390f35b6105f3600480360360408110156105bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d21565b604051808215151515815260200191505060405180910390f35b610615610d3f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106b96004803603604081101561066d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d65565b6040518082815260200191505060405180910390f35b6040518060400160405280601381526020017f5072696d69746976652056312052656465656d0000000000000000000000000081525081565b600061071c610715610dec565b8484610df4565b6001905092915050565b6000600254905090565b600061073d848484610feb565b6107fe84610749610dec565b6107f98560405180606001604052806028815260200161185c60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107af610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b600190509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b60006108dd610841610dec565b846108d88560016000610852610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b610df4565b6001905092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b6109b482826113f4565b5050565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040518060400160405280600381526020017f52444d000000000000000000000000000000000000000000000000000000000081525081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b610c5082826115bb565b5050565b6000610d17610c61610dec565b84610d12856040518060600160405280602581526020016118ee6025913960016000610c8b610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b6001905092915050565b6000610d35610d2e610dec565b8484610feb565b6001905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806118ca6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806118146022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611071576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806118a56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806117cf6023913960400191505060405180910390fd5b61110283838361177f565b61116d81604051806060016040528060268152602001611836602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611200816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611359576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561131e578082015181840152602081019050611303565b50505050905090810190601f16801561134b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156113ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6114a36000838361177f565b6114b88160025461136c90919063ffffffff16565b60028190555061150f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118846021913960400191505060405180910390fd5b61164d8260008361177f565b6116b8816040518060600160405280602281526020016117f2602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061170f8160025461178490919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60006117c683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112ac565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fac7fa7b952186f8a18d776694bf28c0fedda6e4747c77cc4a8c2122833e598b64736f6c63430006020033a264697066735822122093b28d57b7ab1cda534fa8ed47da5ba7b6ac18c770e41052d0813b903b7a654e64736f6c63430006020033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b611968806102a88339019056fe608060405234801561001057600080fd5b50611948806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063485cc95511610097578063a457c2d711610066578063a457c2d714610541578063a9059cbb146105a7578063c45a01551461060d578063dd62ed3e1461065757610100565b8063485cc955146103b457806370a082311461041857806395d89b41146104705780639dc29fac146104f357610100565b80632bab754b116100d35780632bab754b14610292578063313ce567146102dc578063395093511461030057806340c10f191461036657610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ee57806323b872dd1461020c575b600080fd5b61010d6106cf565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610708565b604051808215151515815260200191505060405180910390f35b6101f6610726565b6040518082815260200191505060405180910390f35b6102786004803603606081101561022257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610730565b604051808215151515815260200191505060405180910390f35b61029a610809565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102e461082f565b604051808260ff1660ff16815260200191505060405180910390f35b61034c6004803603604081101561031657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610834565b604051808215151515815260200191505060405180910390f35b6103b26004803603604081101561037c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108e7565b005b610416600480360360408110156103ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109b8565b005b61045a6004803603602081101561042e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b02565b6040518082815260200191505060405180910390f35b610478610b4a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b857808201518184015260208101905061049d565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61053f6004803603604081101561050957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b83565b005b61058d6004803603604081101561055757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c54565b604051808215151515815260200191505060405180910390f35b6105f3600480360360408110156105bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d21565b604051808215151515815260200191505060405180910390f35b610615610d3f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106b96004803603604081101561066d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d65565b6040518082815260200191505060405180910390f35b6040518060400160405280601381526020017f5072696d69746976652056312052656465656d0000000000000000000000000081525081565b600061071c610715610dec565b8484610df4565b6001905092915050565b6000600254905090565b600061073d848484610feb565b6107fe84610749610dec565b6107f98560405180606001604052806028815260200161185c60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107af610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b600190509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b60006108dd610841610dec565b846108d88560016000610852610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b610df4565b6001905092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b6109b482826113f4565b5050565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040518060400160405280600381526020017f52444d000000000000000000000000000000000000000000000000000000000081525081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b610c5082826115bb565b5050565b6000610d17610c61610dec565b84610d12856040518060600160405280602581526020016118ee6025913960016000610c8b610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b6001905092915050565b6000610d35610d2e610dec565b8484610feb565b6001905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806118ca6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806118146022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611071576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806118a56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806117cf6023913960400191505060405180910390fd5b61110283838361177f565b61116d81604051806060016040528060268152602001611836602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611200816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611359576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561131e578082015181840152602081019050611303565b50505050905090810190601f16801561134b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156113ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6114a36000838361177f565b6114b88160025461136c90919063ffffffff16565b60028190555061150f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118846021913960400191505060405180910390fd5b61164d8260008361177f565b6116b8816040518060600160405280602281526020016117f2602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061170f8160025461178490919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60006117c683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112ac565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fac7fa7b952186f8a18d776694bf28c0fedda6e4747c77cc4a8c2122833e598b64736f6c63430006020033a264697066735822122093b28d57b7ab1cda534fa8ed47da5ba7b6ac18c770e41052d0813b903b7a654e64736f6c63430006020033", diff --git a/deployments/localhost_31337/Registry.json b/deployments/localhost_31337/Registry.json index 5d695e46..98e587f7 100644 --- a/deployments/localhost_31337/Registry.json +++ b/deployments/localhost_31337/Registry.json @@ -531,7 +531,7 @@ "transactionIndex": 0, "gasUsed": "2143856", "logsBloom": "0x00000000000000000000000000000008000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000080000400400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb9b53f052654c084999b06c24451217432d9f1ecc31f49f1c726a4277989cd20", + "blockHash": "0x0cd01fda7bb0e0f0b760f27c5f21135d1bf0eed3b6e53d4e53563bd39df17bfc", "transactionHash": "0xae6c4ee82196f6c674b63d14686b1f4dd596f4c4ba52cfa00c39e28405acac9d", "logs": [ { @@ -546,7 +546,7 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0xb9b53f052654c084999b06c24451217432d9f1ecc31f49f1c726a4277989cd20" + "blockHash": "0x0cd01fda7bb0e0f0b760f27c5f21135d1bf0eed3b6e53d4e53563bd39df17bfc" }, { "transactionIndex": 0, @@ -560,7 +560,7 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0xb9b53f052654c084999b06c24451217432d9f1ecc31f49f1c726a4277989cd20" + "blockHash": "0x0cd01fda7bb0e0f0b760f27c5f21135d1bf0eed3b6e53d4e53563bd39df17bfc" } ], "blockNumber": 3, @@ -570,7 +570,7 @@ }, "address": "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7", "args": [], - "solcInputHash": "0x6790736ad89befcaa7be92ed1ac7f7481d75836c60f47e71202b55e2673ecb84", + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"redeemAddress\",\"type\":\"address\"}],\"name\":\"DeployedOptionClone\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"UnverifiedExpiry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"UnverifiedToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionFactory_\",\"type\":\"address\"}],\"name\":\"UpdatedOptionFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"redeemFactory_\",\"type\":\"address\"}],\"name\":\"UpdatedRedeemFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"VerifiedExpiry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"VerifiedToken\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allOptionClones\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"calculateOptionAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"deployOption\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllOptionClonesLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"getOptionAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"isVerifiedExpiry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"isVerifiedOption\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"isVerifiedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseDeployments\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionFactory_\",\"type\":\"address\"}],\"name\":\"setOptionFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemFactory_\",\"type\":\"address\"}],\"name\":\"setRedeemFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseDeployments\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"unverifyExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"unverifyToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"verifyExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"verifyToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"calculateOptionAddress(address,address,uint256,uint256,uint256)\":{\"details\":\"Calculates the option address deployed with create2 using the parameter arguments.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp of the option's expiration date.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the ERC-20 strike token.\",\"underlyingToken\":\"The address of the ERC-20 underlying token.\"},\"returns\":{\"_0\":\"The address of the option with the parameter arguments.\"}},\"deployOption(address,address,uint256,uint256,uint256)\":{\"details\":\"Deploys an option contract clone with create2.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp of the option's expiration date.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the ERC-20 strike token.\",\"underlyingToken\":\"The address of the ERC-20 underlying token.\"},\"returns\":{\"_0\":\"The address of the deployed option clone.\"}},\"getAllOptionClonesLength()\":{\"details\":\"Returns the length of the allOptionClones address array.\"},\"getOptionAddress(address,address,uint256,uint256,uint256)\":{\"details\":\"Gets the option address and returns address zero if not yet deployed.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp of the option's expiration date.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the ERC-20 strike token.\",\"underlyingToken\":\"The address of the ERC-20 underlying token.\"},\"returns\":{\"_0\":\"The address of the option with the parameter arguments.\"}},\"isVerifiedExpiry(uint256)\":{\"details\":\"Checks the verifiedExpiries private mapping and returns verification status of token.\",\"returns\":{\"_0\":\"bool Verified or not verified.\"}},\"isVerifiedOption(address)\":{\"details\":\"Checks an option address to see if it has verified assets and expiry time.\",\"params\":{\"optionAddress\":\"The address of the option token.\"},\"returns\":{\"_0\":\"bool If the option has verified underlying and strike tokens, and expiry time.\"}},\"isVerifiedToken(address)\":{\"details\":\"Checks the verifiedTokens private mapping and returns verification status of token.\",\"returns\":{\"_0\":\"bool Verified or not verified.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pauseDeployments()\":{\"details\":\"Pauses the deployOption function.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setOptionFactory(address)\":{\"details\":\"Sets the option factory contract to use for deploying clones.\",\"params\":{\"optionFactory_\":\"The address of the option factory.\"}},\"setRedeemFactory(address)\":{\"details\":\"Sets the redeem factory contract to use for deploying clones.\",\"params\":{\"redeemFactory_\":\"The address of the redeem factory.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpauseDeployments()\":{\"details\":\"Unpauses the deployOption function.\"},\"unverifyExpiry(uint256)\":{\"details\":\"Sets an expiry timestamp's verification status to false.\"},\"unverifyToken(address)\":{\"details\":\"Sets a verified token's verification status to false.\"},\"verifyExpiry(uint256)\":{\"details\":\"Sets an expiry timestamp's verification status to true.\"},\"verifyToken(address)\":{\"details\":\"Sets an ERC-20 token verification status to true.\"}}},\"userdoc\":{\"methods\":{\"getOptionAddress(address,address,uint256,uint256,uint256)\":{\"notice\":\"Will calculate the option address using the parameter arguments. Checks the code size of the address to see if the contract has been deployed yet. If contract has not been deployed, returns address zero.\"},\"unverifyExpiry(uint256)\":{\"notice\":\"A mapping of standardized, \\\"verified\\\", timestamps for the options.\"},\"verifyExpiry(uint256)\":{\"notice\":\"A mapping of standardized, \\\"verified\\\", timestamps for the options.\"},\"verifyToken(address)\":{\"notice\":\"A \\\"verified\\\" token is a standard ERC-20 token that we have tested with the option contract. An example of an \\\"unverified\\\" token is a non-standard ERC-20 token which has not been tested.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/option/applications/Registry.sol\":\"Registry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x0336d64bd695c5d8bb962fd3dacb3d26f52879b19e75472d7dea9f91f7add79a\",\"urls\":[\"bzz-raw://d709c1de86475b74fa4f614458e868213f8e5b13eed8b29b465793cd97e5c0f5\",\"dweb:/ipfs/QmYVgazum1VVeDoJYYmKhAJ1mcuTy8vidb2iFEMWcVdSeY\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/option/applications/Registry.sol\":{\"keccak256\":\"0x027242dd1913c0695475b055ed09b2ed557f7a76c4030d6df46b07ed4f8d67f3\",\"urls\":[\"bzz-raw://f11ace92d4cd469f7163cb43c52449367d4cf2f1c0e597730713fae96bf06eef\",\"dweb:/ipfs/QmawRj3FvvqmpZ2SognNin6spiJUK5fcioYDkJouxrMz9z\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IOptionFactory.sol\":{\"keccak256\":\"0x523335d4aa7b9895d0afd9dbc14e3f3356a1d64827a6f90571c08aef54fe5a3c\",\"urls\":[\"bzz-raw://6e59a331ddd34d836f0fd2a25800cf29ccf0a5d8a074ff2aefa4072106f1388d\",\"dweb:/ipfs/QmXMEvdgdhUgprAG2fAX95imL2vdPAfsoi6NemzvbqMQvK\"]},\"contracts/option/interfaces/IRedeemFactory.sol\":{\"keccak256\":\"0xe08632c1198fa61a3848da09b11fd427f3fedfc1c1e3b8176e3ce2055e7ae208\",\"urls\":[\"bzz-raw://563f70356a74c1e98a4b90c96848082914292d758271cb529e10abd53cd88960\",\"dweb:/ipfs/QmRD4esxBckRUmERKuamJBPLTz7ukGcQj1PRzyQZNm5uo5\"]},\"contracts/option/interfaces/IRegistry.sol\":{\"keccak256\":\"0x02aeb84e8b748674bc31707899158885066923f203e7a3a58cee3c68a49ec96f\",\"urls\":[\"bzz-raw://78dd4aa316f8b50ed595437e8a1ec1e519384c89bd605b9aa9194f3b98543a43\",\"dweb:/ipfs/QmXvrc8JwQCkFHBTwoGjV7xCUcNN8Ed15QES9tKWsjuUAz\"]}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506000620000246200010e60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35060008060146101000a81548160ff0219169083151502179055506001600060156101000a81548160ff02191690831515021790555062000108336200011660201b60201c565b6200032e565b600033905090565b620001266200010e60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620001e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000270576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180620028706026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b612532806200033e6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638da5cb5b116100b8578063b000e9ec1161007c578063b000e9ec146105d7578063b3461c8714610699578063c7a988ac146106e3578063e4ec108c14610701578063f2fde38b14610745578063fce4ae3a1461078957610142565b80638da5cb5b146103f95780639180928f1461044357806392160076146105055780639788973414610549578063aaf15bb51461059357610142565b80635c975abb1161010a5780635c975abb146102e15780636189a4d31461030357806366f1976d14610371578063715018a61461037b5780637f53abde146103855780638229d851146103b357610142565b80631027b219146101475780632e53926d146101a357806339c00f41146102655780633d11c796146102935780634130276b1461029d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107e5565b604051808215151515815260200191505060405180910390f35b610223600480360360a08110156101b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061083b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102916004803603602081101561027b57600080fd5b8101908080359060200190929190505050610973565b005b61029b610aa2565b005b6102df600480360360208110156102b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b75565b005b6102e9610d7f565b604051808215151515815260200191505060405180910390f35b61032f6004803603602081101561031957600080fd5b8101908080359060200190929190505050610d95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610379610dd1565b005b610383610ea4565b005b6103b16004803603602081101561039b57600080fd5b810190808035906020019092919050505061102c565b005b6103df600480360360208110156103c957600080fd5b81019080803590602001909291905050506111d1565b604051808215151515815260200191505060405180910390f35b6104016111fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c3600480360360a081101561045957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611224565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105476004803603602081101561051b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a1a565b005b610551611b6a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105d5600480360360208110156105a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b90565b005b610657600480360360a08110156105ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611ce0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106a1611d28565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb611d4e565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d5b565b005b6107876004803603602081101561075b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ec2565b005b6107cb6004803603602081101561079f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120cf565b604051808215151515815260200191505060405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e53926d88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561092957600080fd5b505afa15801561093d573d6000803e3d6000fd5b505050506040513d602081101561095357600080fd5b810190808051906020019092919050505090508091505095945050505050565b61097b6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f928f06bc62edcabae2855ccfad4a2f103f1516665607048ed17a208d755713f9816040518082815260200191505060405180910390a150565b610aaa6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610b736122b4565b565b610b7d6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ce1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fb48a62163a7d747c16a177c1eb529841e700a0bb4a1e787d7d293eaaf7716d4d60405160405180910390a250565b60008060149054906101000a900460ff16905090565b60058181548110610da257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610dd96122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610ea26123bc565b565b610eac6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6110346122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b4281101561116b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f455850495245445f54494d455354414d50000000000000000000000081525060200191505060405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f01a8c23c3824519cd8b455f3e637b99e97249d2e06ab99d93f43d60d163fb5bf816040518082815260200191505060405180910390a150565b60006004600083815260200190815260200160002060009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060159054906101000a900460ff166112a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060156101000a81548160ff021916908315150217905550600060149054906101000a900460ff1615611344576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600084116113ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008311611430576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b428210156114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156115b25750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b611624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d604a1ef88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561171357600080fd5b505af1158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe8d6396836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156117f357600080fd5b505af1158015611807573d6000803e3d6000fd5b505050506040513d602081101561181d57600080fd5b810190808051906020019092919050505090506005829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166335638b6b83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fdb19f143ae8e015bc96c062e81a1c69f2e1568dfba82c18947239515a0b8725b60405160405180910390a481925050506001600060156101000a81548160ff02191690831515021790555095945050505050565b611a226122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ae3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f4f32895401ed84629e6727059ffe5f8d2f637bc6c325630ba6054007ceb95c2c60405160405180910390a250565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611b986122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167feec46c83ee301290575f8c7bb5428480c127f0c54263c00f30465050f4495a8e60405160405180910390a250565b600080611cf0878787878761083b565b90506000611cfd826124c6565b905060008163ffffffff161115611d18578192505050611d1f565b6000925050505b95945050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600580549050905090565b611d636122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611e24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fe9769d9a414671453740fdb9cc92922655391134bd1beec930a2203bd45a67c060405160405180910390a250565b611eca6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612011576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806124d76026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082905060008173ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561211d57600080fd5b505afa158015612131573d6000803e3d6000fd5b505050506040513d602081101561214757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d60208110156121cc57600080fd5b8101908080519060200190929190505050905060008373ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561222757600080fd5b505afa15801561223b573d6000803e3d6000fd5b505050506040513d602081101561225157600080fd5b81019080805190602001909291905050509050600061226f846107e5565b9050600061227c846107e5565b90506000612289846111d1565b90508280156122955750815b801561229e5750805b975050505050505050919050565b600033905090565b600060149054906101000a900460ff16612336576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6123796122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff161561243f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124836122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600080823b90508091505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122018888278084f33bcfed0ffea843d71474802d7d3a7183dda4dd402fd74264a0e64736f6c634300060200334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c80638da5cb5b116100b8578063b000e9ec1161007c578063b000e9ec146105d7578063b3461c8714610699578063c7a988ac146106e3578063e4ec108c14610701578063f2fde38b14610745578063fce4ae3a1461078957610142565b80638da5cb5b146103f95780639180928f1461044357806392160076146105055780639788973414610549578063aaf15bb51461059357610142565b80635c975abb1161010a5780635c975abb146102e15780636189a4d31461030357806366f1976d14610371578063715018a61461037b5780637f53abde146103855780638229d851146103b357610142565b80631027b219146101475780632e53926d146101a357806339c00f41146102655780633d11c796146102935780634130276b1461029d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107e5565b604051808215151515815260200191505060405180910390f35b610223600480360360a08110156101b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061083b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102916004803603602081101561027b57600080fd5b8101908080359060200190929190505050610973565b005b61029b610aa2565b005b6102df600480360360208110156102b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b75565b005b6102e9610d7f565b604051808215151515815260200191505060405180910390f35b61032f6004803603602081101561031957600080fd5b8101908080359060200190929190505050610d95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610379610dd1565b005b610383610ea4565b005b6103b16004803603602081101561039b57600080fd5b810190808035906020019092919050505061102c565b005b6103df600480360360208110156103c957600080fd5b81019080803590602001909291905050506111d1565b604051808215151515815260200191505060405180910390f35b6104016111fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c3600480360360a081101561045957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611224565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105476004803603602081101561051b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a1a565b005b610551611b6a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105d5600480360360208110156105a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b90565b005b610657600480360360a08110156105ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611ce0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106a1611d28565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb611d4e565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d5b565b005b6107876004803603602081101561075b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ec2565b005b6107cb6004803603602081101561079f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120cf565b604051808215151515815260200191505060405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e53926d88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561092957600080fd5b505afa15801561093d573d6000803e3d6000fd5b505050506040513d602081101561095357600080fd5b810190808051906020019092919050505090508091505095945050505050565b61097b6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f928f06bc62edcabae2855ccfad4a2f103f1516665607048ed17a208d755713f9816040518082815260200191505060405180910390a150565b610aaa6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610b736122b4565b565b610b7d6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ce1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fb48a62163a7d747c16a177c1eb529841e700a0bb4a1e787d7d293eaaf7716d4d60405160405180910390a250565b60008060149054906101000a900460ff16905090565b60058181548110610da257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610dd96122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610ea26123bc565b565b610eac6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6110346122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b4281101561116b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f455850495245445f54494d455354414d50000000000000000000000081525060200191505060405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f01a8c23c3824519cd8b455f3e637b99e97249d2e06ab99d93f43d60d163fb5bf816040518082815260200191505060405180910390a150565b60006004600083815260200190815260200160002060009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060159054906101000a900460ff166112a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060156101000a81548160ff021916908315150217905550600060149054906101000a900460ff1615611344576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600084116113ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008311611430576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b428210156114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156115b25750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b611624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d604a1ef88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561171357600080fd5b505af1158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe8d6396836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156117f357600080fd5b505af1158015611807573d6000803e3d6000fd5b505050506040513d602081101561181d57600080fd5b810190808051906020019092919050505090506005829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166335638b6b83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fdb19f143ae8e015bc96c062e81a1c69f2e1568dfba82c18947239515a0b8725b60405160405180910390a481925050506001600060156101000a81548160ff02191690831515021790555095945050505050565b611a226122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ae3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f4f32895401ed84629e6727059ffe5f8d2f637bc6c325630ba6054007ceb95c2c60405160405180910390a250565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611b986122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167feec46c83ee301290575f8c7bb5428480c127f0c54263c00f30465050f4495a8e60405160405180910390a250565b600080611cf0878787878761083b565b90506000611cfd826124c6565b905060008163ffffffff161115611d18578192505050611d1f565b6000925050505b95945050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600580549050905090565b611d636122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611e24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fe9769d9a414671453740fdb9cc92922655391134bd1beec930a2203bd45a67c060405160405180910390a250565b611eca6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612011576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806124d76026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082905060008173ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561211d57600080fd5b505afa158015612131573d6000803e3d6000fd5b505050506040513d602081101561214757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d60208110156121cc57600080fd5b8101908080519060200190929190505050905060008373ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561222757600080fd5b505afa15801561223b573d6000803e3d6000fd5b505050506040513d602081101561225157600080fd5b81019080805190602001909291905050509050600061226f846107e5565b9050600061227c846107e5565b90506000612289846111d1565b90508280156122955750815b801561229e5750805b975050505050505050919050565b600033905090565b600060149054906101000a900460ff16612336576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6123796122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff161561243f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124836122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600080823b90508091505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122018888278084f33bcfed0ffea843d71474802d7d3a7183dda4dd402fd74264a0e64736f6c63430006020033", @@ -726,7 +726,7 @@ "type": "t_bool" }, { - "astId": 3834, + "astId": 4384, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "optionFactory", "offset": 0, @@ -734,7 +734,7 @@ "type": "t_address" }, { - "astId": 3837, + "astId": 4387, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "redeemFactory", "offset": 0, @@ -742,7 +742,7 @@ "type": "t_address" }, { - "astId": 3841, + "astId": 4391, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "verifiedTokens", "offset": 0, @@ -750,7 +750,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 3845, + "astId": 4395, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "verifiedExpiries", "offset": 0, @@ -758,7 +758,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 3848, + "astId": 4398, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "allOptionClones", "offset": 0, diff --git a/deployments/localhost_31337/TestERC20.json b/deployments/localhost_31337/TestERC20.json index a264f1c3..9f72b571 100644 --- a/deployments/localhost_31337/TestERC20.json +++ b/deployments/localhost_31337/TestERC20.json @@ -319,18 +319,18 @@ "receipt": { "to": null, "from": "0xc783df8a850f42e7F7e57013759C285caa701eB6", - "contractAddress": "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e", + "contractAddress": "0x1A1FEe7EeD918BD762173e4dc5EfDB8a78C924A8", "transactionIndex": 0, - "gasUsed": "1244260", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010080000000000000000000000000000000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xad84907e7ee4a09399abc699c101d6bccef73b9c1c5f4b3227855f5ece497dcb", - "transactionHash": "0x5129d9b0a9944bb75f1958a86bb3d78b2c1dc52cfeb5f08083e27c1015cf5722", + "gasUsed": "1244188", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000010000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000020000000800000000000000000000000010080000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0ddf099d4e3ec1d4996cd9dd44e0d739fedd031cd73f110cb720d4a28acf2d97", + "transactionHash": "0x9a323140f1bace890e55c6d658d8d87748486eba4b06f62786cb9b78db58309a", "logs": [ { "transactionIndex": 0, - "blockNumber": 9, - "transactionHash": "0x5129d9b0a9944bb75f1958a86bb3d78b2c1dc52cfeb5f08083e27c1015cf5722", - "address": "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e", + "blockNumber": 8, + "transactionHash": "0x9a323140f1bace890e55c6d658d8d87748486eba4b06f62786cb9b78db58309a", + "address": "0x1A1FEe7EeD918BD762173e4dc5EfDB8a78C924A8", "topics": [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -338,21 +338,21 @@ ], "data": "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000", "logIndex": 0, - "blockHash": "0xad84907e7ee4a09399abc699c101d6bccef73b9c1c5f4b3227855f5ece497dcb" + "blockHash": "0x0ddf099d4e3ec1d4996cd9dd44e0d739fedd031cd73f110cb720d4a28acf2d97" } ], - "blockNumber": 9, - "cumulativeGasUsed": "1244260", + "blockNumber": 8, + "cumulativeGasUsed": "1244188", "status": 1, "byzantium": true }, - "address": "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e", + "address": "0x1A1FEe7EeD918BD762173e4dc5EfDB8a78C924A8", "args": [ - "USDC", - "Stablecoin", + "ETH", + "Ether", "10000000000000000000000" ], - "solcInputHash": "0x6790736ad89befcaa7be92ed1ac7f7481d75836c60f47e71202b55e2673ecb84", + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"details\":\"Function to mint tokens\",\"params\":{\"to\":\"The address that will receive the minted tokens.\",\"value\":\"The amount of tokens to mint.\"},\"returns\":{\"_0\":\"A boolean that indicates if the operation was successful.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/test/tokens/TestERC20.sol\":\"TestERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"contracts/test/tokens/TestERC20.sol\":{\"keccak256\":\"0x9741e48a659e66a7615f2e8c8a93d7c8324866f178b926a53c396367c7c9f799\",\"urls\":[\"bzz-raw://7254e0de762562621113c1951978e291e9a5832565da9ab8df7857bbd0b0f657\",\"dweb:/ipfs/QmdA1Y2hRW21QTGdhWDZ2pdMfrhrjADTZhexqgK9HpCJPZ\"]}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200189938038062001899833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919050505082828160039080519060200190620001dc9291906200049b565b508060049080519060200190620001f59291906200049b565b506012600560006101000a81548160ff021916908360ff16021790555050506200022633826200022f60201b60201c565b5050506200054a565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620002d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b620002e7600083836200040d60201b60201c565b62000303816002546200041260201b62000fb41790919060201c565b60028190555062000361816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546200041260201b62000fb41790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60008082840190508381101562000491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004de57805160ff19168380011785556200050f565b828001600101855582156200050f579182015b828111156200050e578251825591602001919060010190620004f1565b5b5090506200051e919062000522565b5090565b6200054791905b808211156200054357600081600090555060010162000529565b5090565b90565b61133f806200055a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220aae222bc33195deeb2b44af7f5d04f03ff98f96bfefb7d6b2624f159b9f175c564736f6c63430006020033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220aae222bc33195deeb2b44af7f5d04f03ff98f96bfefb7d6b2624f159b9f175c564736f6c63430006020033", diff --git a/deployments/localhost_31337/Trader.json b/deployments/localhost_31337/Trader.json index 6dc7d2a9..47727c91 100644 --- a/deployments/localhost_31337/Trader.json +++ b/deployments/localhost_31337/Trader.json @@ -344,7 +344,7 @@ "transactionIndex": 0, "gasUsed": "2285903", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xbdc8b36d4f4ffddb2f3e80b3201428bd48ce7a9135e8d7e723d3d7c6a2490962", + "blockHash": "0x43254a9eecac99b9f0e86217ed2ea8ca74f732f74f0c6e3144de10be7dbb7461", "transactionHash": "0x5144fd4404c382fe2531c628feefc55b9e642dc60b7a65f447d573a2e6ec435f", "logs": [], "blockNumber": 11, @@ -356,7 +356,7 @@ "args": [ "0xc4905364b78a742ccce7B890A89514061E47068D" ], - "solcInputHash": "0x6790736ad89befcaa7be92ed1ac7f7481d75836c60f47e71202b55e2673ecb84", + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"TraderClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outUnderlyings\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inStrikes\",\"type\":\"uint256\"}],\"name\":\"TraderExercise\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputOptions\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputRedeems\",\"type\":\"uint256\"}],\"name\":\"TraderMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inRedeems\",\"type\":\"uint256\"}],\"name\":\"TraderRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"TraderUnwind\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"closeQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeClose\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"exerciseQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExercise\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"unwindQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeUnwind\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"safeClose(address,uint256,address)\":{\"details\":\"Burn optionTokens and redeemTokens to withdraw underlyingTokens.\",\"params\":{\"closeQuantity\":\"Quantity of optionTokens to burn. (Implictly will burn the strike ratio quantity of redeemTokens).\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address.\"}},\"safeExercise(address,uint256,address)\":{\"details\":\"Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\",\"params\":{\"exerciseQuantity\":\"Quantity of optionTokens to exercise.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address.\"}},\"safeMint(address,uint256,address)\":{\"details\":\"Mint options at a 1:1 ratio with deposited underlying tokens.\",\"params\":{\"mintQuantity\":\"Quantity of options to mint and underlyingToken to deposit.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The newly minted options and redeems are sent to the receiver address.\"}},\"safeRedeem(address,uint256,address)\":{\"details\":\"Burns redeemTokens to withdraw available strikeTokens.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The strikeTokens are sent to the receiver address.\",\"redeemQuantity\":\"redeemQuantity of redeemTokens to burn.\"}},\"safeUnwind(address,uint256,address)\":{\"details\":\"Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens and redeemTokens are sent to the receiver address.\",\"unwindQuantity\":\"Quantity of option tokens used to calculate the amount of redeem tokens to burn.\"}}}},\"userdoc\":{\"methods\":{\"safeClose(address,uint256,address)\":{\"notice\":\"The redeemTokens to burn is equal to the optionTokens * strike ratio. inOptions = inRedeems / strike ratio = outUnderlyings\"},\"safeExercise(address,uint256,address)\":{\"notice\":\"Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\"},\"safeMint(address,uint256,address)\":{\"notice\":\"Also mints redeems at a strike ratio to the deposited underlyings. Warning: Calls msg.sender with safeTransferFrom.\"},\"safeRedeem(address,uint256,address)\":{\"notice\":\"inRedeems = outStrikes.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/option/extensions/Trader.sol\":\"Trader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/option/extensions/Trader.sol\":{\"keccak256\":\"0xcd6d24d50e76af7ace0d1b82e042fc0ada30c743f055988ca4e907a97a249b22\",\"urls\":[\"bzz-raw://cd7338a7a86d27b182f75cc8b5fcd88d8ea0b711581b0b9b9ec3eb9b5127de82\",\"dweb:/ipfs/QmeTux1AZ2Bqvk5frWotp28HLmnBpVqHkXyydYNNxeMFEv\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/ITrader.sol\":{\"keccak256\":\"0xb8f9e6d923e556e137a606c76e9adf8fd07375c7ff0650f4a7932adc950df44f\",\"urls\":[\"bzz-raw://ef82aa3d081c12e307f45334cffd8916a27c5c7db62c2b44ce9663633a8c385b\",\"dweb:/ipfs/QmQLsKZomP19HAAXKpLshhXiZhrusbf9yoZhy8tJDffVvS\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506040516128cc3803806128cc8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061281d806100af6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063087b063214610067578063154fa089146100f057806320e469d6146101805780633fc8cef314610209578063a1d8778f14610253578063b8a6bb3b146102d5575b600080fd5b6100d36004803603606081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610365565b604051808381526020018281526020019250505060405180910390f35b61015c6004803603606081101561010657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ac565b60405180848152602001838152602001828152602001935050505060405180910390f35b6101ec6004803603606081101561019657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105f6565b604051808381526020018281526020019250505060405180910390f35b61021161073d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102bf6004803603606081101561026957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610763565b6040518082815260200191505060405180910390f35b610341600480360360608110156102eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610899565b60405180848152602001838152602001828152602001935050505060405180910390f35b6000806000809054906101000a900460ff166103e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806104118787876109e3565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f453315713d2b83893ec1df8cf529328bf25e4fe72b6c4d880edb03243e80119b8885604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b60008060008060009054906101000a900460ff16610532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080600061055c8989896110be565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd0c7e26bb5b37129e4f53759eb48fc9e0c4bafd336a94f6b87c5ce9f139183e5846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff1661067a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806106a28787876116a1565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f58fb17601901d5509bf49bedd00d55850ef2ebff3adb67a5f517b86eed08a0c88484604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff166107e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061080d8585856118a1565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd75e50ef6162896bf5efc868c48b0c44d04ab08196d3e2b4c3aba5062c5ce94d836040518082815260200191505060405180910390a38091505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008060009054906101000a900460ff1661091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806000610949898989611c3b565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f602dc153bc8f9d064b879f6bc973338b7c009689b9cacc58a250c3fb3da51808846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008411610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ada57600080fd5b505afa158015610aee573d6000803e3d6000fd5b505050506040513d6020811015610b0457600080fd5b81019080805190602001909291905050501015610b89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000610caf8673ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015610bd457600080fd5b505afa158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b8101908080519060200190929190505050610ca18873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5757600080fd5b505afa158015610c6b573d6000803e3d6000fd5b505050506040513d6020811015610c8157600080fd5b81019080805190602001909291905050508861228390919063ffffffff16565b61230990919063ffffffff16565b9050808673ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf857600080fd5b505afa158015610d0c573d6000803e3d6000fd5b505050506040513d6020811015610d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610daf57600080fd5b505afa158015610dc3573d6000803e3d6000fd5b505050506040513d6020811015610dd957600080fd5b81019080805190602001909291905050501015610e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b610f0b3387838973ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610eaa57600080fd5b505afa158015610ebe573d6000803e3d6000fd5b505050506040513d6020811015610ed457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b610f383387878973ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008673ffffffffffffffffffffffffffffffffffffffff1663787eae30868860006040519080825280601f01601f191660200182016040528015610f8c5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611014578082015181840152602081019050610ff9565b50505050905090810190601f1680156110415780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b15801561106157600080fd5b505af1158015611075573d6000803e3d6000fd5b505050506040513d604081101561108b57600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508181935093505050935093915050565b6000806000808511611138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b428673ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561117f57600080fd5b505afa158015611193573d6000803e3d6000fd5b505050506040513d60208110156111a957600080fd5b81019080805190602001909291905050501061122d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006113538773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561127857600080fd5b505afa15801561128c573d6000803e3d6000fd5b505050506040513d60208110156112a257600080fd5b81019080805190602001909291905050506113458973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112fb57600080fd5b505afa15801561130f573d6000803e3d6000fd5b505050506040513d602081101561132557600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139c57600080fd5b505afa1580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561145357600080fd5b505afa158015611467573d6000803e3d6000fd5b505050506040513d602081101561147d57600080fd5b81019080805190602001909291905050501015611502576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6115af3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154e57600080fd5b505afa158015611562573d6000803e3d6000fd5b505050506040513d602081101561157857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561163157600080fd5b505af1158015611645573d6000803e3d6000fd5b505050506040513d606081101561165b57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000806000841161171a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6117c73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561176657600080fd5b505afa15801561177a573d6000803e3d6000fd5b505050506040513d602081101561179057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561184857600080fd5b505af115801561185c573d6000803e3d6000fd5b505050506040513d604081101561187257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6000808311611918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b828473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195f57600080fd5b505afa158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b81019080805190602001909291905050501015611ac5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611b723385858773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b1157600080fd5b505afa158015611b25573d6000803e3d6000fd5b505050506040513d6020811015611b3b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008473ffffffffffffffffffffffffffffffffffffffff16635e86929d846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611bf357600080fd5b505af1158015611c07573d6000803e3d6000fd5b505050506040513d6020811015611c1d57600080fd5b81019080805190602001909291905050509050809150509392505050565b6000806000808511611cb5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d3357600080fd5b505afa158015611d47573d6000803e3d6000fd5b505050506040513d6020811015611d5d57600080fd5b81019080805190602001909291905050501015611de2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611f088773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b8101908080519060200190929190505050611efa8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d6020811015611eda57600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d6020811015611f7b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561200857600080fd5b505afa15801561201c573d6000803e3d6000fd5b505050506040513d602081101561203257600080fd5b810190808051906020019092919050505010156120b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6121643388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561210357600080fd5b505afa158015612117573d6000803e3d6000fd5b505050506040513d602081101561212d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6121913388888a73ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561221357600080fd5b505af1158015612227573d6000803e3d6000fd5b505050506040513d606081101561223d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000808314156122965760009050612303565b60008284029050828482816122a757fe5b04146122fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061279d6021913960400191505060405180910390fd5b809150505b92915050565b600061234b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612440565b905092915050565b61243a846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612506565b50505050565b600080831182906124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156124b1578082015181840152602081019050612496565b50505050905090810190601f1680156124de5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816124f857fe5b049050809150509392505050565b6125258273ffffffffffffffffffffffffffffffffffffffff16612751565b612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106125e657805182526020820191506020810190506020830392506125c3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612648576040519150601f19603f3d011682016040523d82523d6000602084013e61264d565b606091505b5091509150816126c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561274b578080602001905160208110156126e457600080fd5b810190808051906020019092919050505061274a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806127be602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561279357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122053b598daeae8cb5287a7abf09921a29be70407f0204e7a824c66416f86ff7a1664736f6c63430006020033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063087b063214610067578063154fa089146100f057806320e469d6146101805780633fc8cef314610209578063a1d8778f14610253578063b8a6bb3b146102d5575b600080fd5b6100d36004803603606081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610365565b604051808381526020018281526020019250505060405180910390f35b61015c6004803603606081101561010657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ac565b60405180848152602001838152602001828152602001935050505060405180910390f35b6101ec6004803603606081101561019657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105f6565b604051808381526020018281526020019250505060405180910390f35b61021161073d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102bf6004803603606081101561026957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610763565b6040518082815260200191505060405180910390f35b610341600480360360608110156102eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610899565b60405180848152602001838152602001828152602001935050505060405180910390f35b6000806000809054906101000a900460ff166103e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806104118787876109e3565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f453315713d2b83893ec1df8cf529328bf25e4fe72b6c4d880edb03243e80119b8885604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b60008060008060009054906101000a900460ff16610532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080600061055c8989896110be565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd0c7e26bb5b37129e4f53759eb48fc9e0c4bafd336a94f6b87c5ce9f139183e5846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff1661067a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806106a28787876116a1565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f58fb17601901d5509bf49bedd00d55850ef2ebff3adb67a5f517b86eed08a0c88484604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff166107e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061080d8585856118a1565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd75e50ef6162896bf5efc868c48b0c44d04ab08196d3e2b4c3aba5062c5ce94d836040518082815260200191505060405180910390a38091505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008060009054906101000a900460ff1661091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806000610949898989611c3b565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f602dc153bc8f9d064b879f6bc973338b7c009689b9cacc58a250c3fb3da51808846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008411610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ada57600080fd5b505afa158015610aee573d6000803e3d6000fd5b505050506040513d6020811015610b0457600080fd5b81019080805190602001909291905050501015610b89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000610caf8673ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015610bd457600080fd5b505afa158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b8101908080519060200190929190505050610ca18873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5757600080fd5b505afa158015610c6b573d6000803e3d6000fd5b505050506040513d6020811015610c8157600080fd5b81019080805190602001909291905050508861228390919063ffffffff16565b61230990919063ffffffff16565b9050808673ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf857600080fd5b505afa158015610d0c573d6000803e3d6000fd5b505050506040513d6020811015610d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610daf57600080fd5b505afa158015610dc3573d6000803e3d6000fd5b505050506040513d6020811015610dd957600080fd5b81019080805190602001909291905050501015610e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b610f0b3387838973ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610eaa57600080fd5b505afa158015610ebe573d6000803e3d6000fd5b505050506040513d6020811015610ed457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b610f383387878973ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008673ffffffffffffffffffffffffffffffffffffffff1663787eae30868860006040519080825280601f01601f191660200182016040528015610f8c5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611014578082015181840152602081019050610ff9565b50505050905090810190601f1680156110415780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b15801561106157600080fd5b505af1158015611075573d6000803e3d6000fd5b505050506040513d604081101561108b57600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508181935093505050935093915050565b6000806000808511611138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b428673ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561117f57600080fd5b505afa158015611193573d6000803e3d6000fd5b505050506040513d60208110156111a957600080fd5b81019080805190602001909291905050501061122d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006113538773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561127857600080fd5b505afa15801561128c573d6000803e3d6000fd5b505050506040513d60208110156112a257600080fd5b81019080805190602001909291905050506113458973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112fb57600080fd5b505afa15801561130f573d6000803e3d6000fd5b505050506040513d602081101561132557600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139c57600080fd5b505afa1580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561145357600080fd5b505afa158015611467573d6000803e3d6000fd5b505050506040513d602081101561147d57600080fd5b81019080805190602001909291905050501015611502576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6115af3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154e57600080fd5b505afa158015611562573d6000803e3d6000fd5b505050506040513d602081101561157857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561163157600080fd5b505af1158015611645573d6000803e3d6000fd5b505050506040513d606081101561165b57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000806000841161171a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6117c73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561176657600080fd5b505afa15801561177a573d6000803e3d6000fd5b505050506040513d602081101561179057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561184857600080fd5b505af115801561185c573d6000803e3d6000fd5b505050506040513d604081101561187257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6000808311611918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b828473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195f57600080fd5b505afa158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b81019080805190602001909291905050501015611ac5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611b723385858773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b1157600080fd5b505afa158015611b25573d6000803e3d6000fd5b505050506040513d6020811015611b3b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008473ffffffffffffffffffffffffffffffffffffffff16635e86929d846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611bf357600080fd5b505af1158015611c07573d6000803e3d6000fd5b505050506040513d6020811015611c1d57600080fd5b81019080805190602001909291905050509050809150509392505050565b6000806000808511611cb5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d3357600080fd5b505afa158015611d47573d6000803e3d6000fd5b505050506040513d6020811015611d5d57600080fd5b81019080805190602001909291905050501015611de2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611f088773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b8101908080519060200190929190505050611efa8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d6020811015611eda57600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d6020811015611f7b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561200857600080fd5b505afa15801561201c573d6000803e3d6000fd5b505050506040513d602081101561203257600080fd5b810190808051906020019092919050505010156120b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6121643388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561210357600080fd5b505afa158015612117573d6000803e3d6000fd5b505050506040513d602081101561212d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6121913388888a73ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561221357600080fd5b505af1158015612227573d6000803e3d6000fd5b505050506040513d606081101561223d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000808314156122965760009050612303565b60008284029050828482816122a757fe5b04146122fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061279d6021913960400191505060405180910390fd5b809150505b92915050565b600061234b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612440565b905092915050565b61243a846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612506565b50505050565b600080831182906124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156124b1578082015181840152602081019050612496565b50505050905090810190601f1680156124de5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816124f857fe5b049050809150509392505050565b6125258273ffffffffffffffffffffffffffffffffffffffff16612751565b612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106125e657805182526020820191506020810190506020830392506125c3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612648576040519150601f19603f3d011682016040523d82523d6000602084013e61264d565b606091505b5091509150816126c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561274b578080602001905160208110156126e457600080fd5b810190808051906020019092919050505061274a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806127be602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561279357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122053b598daeae8cb5287a7abf09921a29be70407f0204e7a824c66416f86ff7a1664736f6c63430006020033", @@ -431,7 +431,7 @@ "type": "t_bool" }, { - "astId": 4626, + "astId": 5176, "contract": "contracts/option/extensions/Trader.sol:Trader", "label": "weth", "offset": 1, diff --git a/deployments/localhost_31337/USDC.json b/deployments/localhost_31337/USDC.json new file mode 100644 index 00000000..de676271 --- /dev/null +++ b/deployments/localhost_31337/USDC.json @@ -0,0 +1,518 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "receipt": { + "to": null, + "from": "0xc783df8a850f42e7F7e57013759C285caa701eB6", + "contractAddress": "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e", + "transactionIndex": 0, + "gasUsed": "1244260", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010080000000000000000000000000000000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1775d4b61821147902abd6f61f18c91c2d80185ab5cbc25277a4bcb5029505d3", + "transactionHash": "0xa9ab77e52076fa39f827a76d711e6f45e8e8d2640af6d24b7d1ded23930a05a9", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 9, + "transactionHash": "0xa9ab77e52076fa39f827a76d711e6f45e8e8d2640af6d24b7d1ded23930a05a9", + "address": "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000c783df8a850f42e7f7e57013759c285caa701eb6" + ], + "data": "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000", + "logIndex": 0, + "blockHash": "0x1775d4b61821147902abd6f61f18c91c2d80185ab5cbc25277a4bcb5029505d3" + } + ], + "blockNumber": 9, + "cumulativeGasUsed": "1244260", + "status": 1, + "byzantium": true + }, + "address": "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e", + "args": [ + "USDC", + "Stablecoin", + "10000000000000000000000" + ], + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"details\":\"Function to mint tokens\",\"params\":{\"to\":\"The address that will receive the minted tokens.\",\"value\":\"The amount of tokens to mint.\"},\"returns\":{\"_0\":\"A boolean that indicates if the operation was successful.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/test/tokens/USDC.sol\":\"USDC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"contracts/test/tokens/USDC.sol\":{\"keccak256\":\"0xf0de4f0b4604da9288a488ee768e19b523c52cd66186313a5274b67a6057c29b\",\"urls\":[\"bzz-raw://f690c6fd1e0680e4785832eacc7a0dc0245d042d9b8a50873feb7e1c7c92360d\",\"dweb:/ipfs/QmZpzzk5iVwBHR8wKZA5Hqk1TNKFp4m5Wx2qC2wgNDT3yt\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200189938038062001899833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919050505082828160039080519060200190620001dc9291906200049b565b508060049080519060200190620001f59291906200049b565b506012600560006101000a81548160ff021916908360ff16021790555050506200022633826200022f60201b60201c565b5050506200054a565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620002d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b620002e7600083836200040d60201b60201c565b62000303816002546200041260201b62000fb41790919060201c565b60028190555062000361816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546200041260201b62000fb41790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60008082840190508381101562000491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004de57805160ff19168380011785556200050f565b828001600101855582156200050f579182015b828111156200050e578251825591602001919060010190620004f1565b5b5090506200051e919062000522565b5090565b6200054791905b808211156200054357600081600090555060010162000529565b5090565b90565b61133f806200055a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ead707f49c84c141b066b6af793c81a83b66f209561a87d30dffae0c79952f9364736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ead707f49c84c141b066b6af793c81a83b66f209561a87d30dffae0c79952f9364736f6c63430006020033", + "devdoc": { + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address." + }, + "mint(address,uint256)": { + "details": "Function to mint tokens", + "params": { + "to": "The address that will receive the minted tokens.", + "value": "The amount of tokens to mint." + }, + "returns": { + "_0": "A boolean that indicates if the operation was successful." + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." + } + } + }, + "userdoc": { + "methods": {} + }, + "storageLayout": { + "storage": [ + { + "astId": 336, + "contract": "contracts/test/tokens/USDC.sol:USDC", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 342, + "contract": "contracts/test/tokens/USDC.sol:USDC", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 344, + "contract": "contracts/test/tokens/USDC.sol:USDC", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 346, + "contract": "contracts/test/tokens/USDC.sol:USDC", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 348, + "contract": "contracts/test/tokens/USDC.sol:USDC", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 350, + "contract": "contracts/test/tokens/USDC.sol:USDC", + "label": "_decimals", + "offset": 0, + "slot": "5", + "type": "t_uint8" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "985400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "allowance(address,address)": "1431", + "approve(address,uint256)": "infinite", + "balanceOf(address)": "1218", + "decimals()": "1150", + "decreaseAllowance(address,uint256)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "mint(address,uint256)": "infinite", + "name()": "infinite", + "symbol()": "infinite", + "totalSupply()": "1058", + "transfer(address,uint256)": "infinite", + "transferFrom(address,address,uint256)": "infinite" + } + } +} \ No newline at end of file diff --git a/deployments/localhost_31337/UniswapConnector.json b/deployments/localhost_31337/UniswapConnector.json index 7226fd14..f670532b 100644 --- a/deployments/localhost_31337/UniswapConnector.json +++ b/deployments/localhost_31337/UniswapConnector.json @@ -200,6 +200,19 @@ "name": "UpdatedTrader", "type": "event" }, + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -281,6 +294,50 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "flashLoanQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "flashloanMintShortOptionsThenSwap", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "getMaxDeadline", @@ -429,6 +486,73 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintShortOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + } + ], + "name": "openFlashShort", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "owner", @@ -710,6 +834,34 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "uniswapV2Call", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ], "receipt": { @@ -717,15 +869,15 @@ "from": "0xc783df8a850f42e7F7e57013759C285caa701eB6", "contractAddress": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0", "transactionIndex": 0, - "gasUsed": "4081532", + "gasUsed": "4934071", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000080000400000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000010000000020000000000000000000080000000000000000000000000000000000000000000000", - "blockHash": "0x283d85deaf98638e69cf839d403f699e79befffbd5873f8cda7f056f249ccb9a", - "transactionHash": "0x717f16851fd4380d4775524d19936bc711c65a2999896334294b463dbff452d1", + "blockHash": "0xfd2c4c34a72c0378617649cfa9461bc8c5d78022951bf5c51304059c9f3548f8", + "transactionHash": "0xcdf1439708ccc3d4a2fc8e9a0a499d1a36286935186bd6f3f0ce2d67b196e442", "logs": [ { "transactionIndex": 0, "blockNumber": 13, - "transactionHash": "0x717f16851fd4380d4775524d19936bc711c65a2999896334294b463dbff452d1", + "transactionHash": "0xcdf1439708ccc3d4a2fc8e9a0a499d1a36286935186bd6f3f0ce2d67b196e442", "address": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", @@ -734,20 +886,20 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x283d85deaf98638e69cf839d403f699e79befffbd5873f8cda7f056f249ccb9a" + "blockHash": "0xfd2c4c34a72c0378617649cfa9461bc8c5d78022951bf5c51304059c9f3548f8" } ], "blockNumber": 13, - "cumulativeGasUsed": "4081532", + "cumulativeGasUsed": "4934071", "status": 1, "byzantium": true }, "address": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0", "args": [], - "solcInputHash": "0x6790736ad89befcaa7be92ed1ac7f7481d75836c60f47e71202b55e2673ecb84", - "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"quoteToken\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionMarketFrom\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionMarketTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"name\":\"RolledOptionLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionFrom\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"RolledOptions\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newFactory\",\"type\":\"address\"}],\"name\":\"UpdatedFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newQuote\",\"type\":\"address\"}],\"name\":\"UpdatedQuoteToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRegistry\",\"type\":\"address\"}],\"name\":\"UpdatedRegistry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"UpdatedRouter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTrader\",\"type\":\"address\"}],\"name\":\"UpdatedTrader\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityQuoteTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuantityQuoteTokens\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityWithUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"deployUniswapMarket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxDeadline\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"getUniswapMarketForOption\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"getUniswapMarketForSeries\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"quoteToken_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quoteToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityThenCloseOptions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rollFromOption\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rollToOption\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rollQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"rollOption\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rollFromOption\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rollToOption\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"rollOptionLiquidity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router02\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"}],\"name\":\"setFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"quoteToken_\",\"type\":\"address\"}],\"name\":\"setQuoteToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"}],\"name\":\"setTrader\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trader\",\"outputs\":[{\"internalType\":\"contract ITrader\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Adds liquidity to an option<>quote token pair by minting optionTokens with underlyingTokens.\",\"params\":{\"deadline\":\"The timestamp to expire a pending transaction.\",\"minQuantityOptions\":\"The minimum quantity of optionTokens expected to provide liquidity with.\",\"minQuantityQuoteTokens\":\"The minimum quantity of quoteTokens expected to provide liquidity with.\",\"optionAddress\":\"The address of the optionToken to mint then provide liquidity for.\",\"quantityOptions\":\"The quantity of underlyingTokens to use to mint optionTokens.\",\"quantityQuoteTokens\":\"The quantity of quoteTokens to add with optionTokens to the Uniswap V2 Pair.\",\"to\":\"The address that receives UNI-V2 shares.\"}},\"deployUniswapMarket(address)\":{\"details\":\"Creats a Uniswap pair for option<>quote tokens.\",\"params\":{\"optionAddress\":\"The address of the option to deploy a Uniswap V2 Pair for with the quoteToken.\"}},\"getMaxDeadline()\":{\"details\":\"The maxmium deadline available for each trade.\"},\"getUniswapMarketForOption(address)\":{\"details\":\"Gets a Uniswap Pair address for an option token and quote token.\",\"params\":{\"optionAddress\":\"The address of the option to get a Uniswap V2 Pair address for (with quoteToken).\"}},\"getUniswapMarketForSeries(address,address,uint256,uint256,uint256)\":{\"details\":\"Gets a Uniswap Pair address for the corresponding option parameters.\"},\"mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints options using underlyingTokens provided by user, then swaps on Uniswap V2. Combines Primitive \\\"mintOptions\\\" function with Uniswap V2 Router \\\"swapExactTokensForTokens\\\" function.\",\"params\":{\"amountIn\":\"The quantity of options to mint and then sell.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the optionTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Oracle-less Primitive option.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\",\"to\":\"The address to send the optionToken proceeds and redeem tokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines Uniswap V2 Router \\\"removeLiquidity\\\" function with Primitive \\\"closeOptions\\\" function.\",\"params\":{\"amountAMin\":\"The minimum quantity of optionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction.\",\"liquidity\":\"The quantity of liquidity tokens to pull from msg.sender and burn.\",\"optionAddress\":\"The address of the option that will be closed from burned UNI-V2 liquidity shares.\",\"to\":\"The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"rollOption(address,address,uint256,address)\":{\"details\":\"Closes an option position and opens a new one using the freed underlyingTokens.\",\"params\":{\"receiver\":\"The address that receives newly minted option and redeem tokens.\",\"rollFromOption\":\"The optionToken to close.\",\"rollQuantity\":\"The quantity of underlyingTokens to receive from closed options then use to mint new options.\",\"rollToOption\":\"The optionToken to mint.\"}},\"rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines \\\"removeLiquidityThenCloseOptions\\\" function with \\\"addLiquidityWithUnderlying\\\" fuction.\",\"params\":{\"amountAMin\":\"The minimum quantity of optionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction.\",\"liquidity\":\"The quantity of UNI-V2 shares to roll from the first Uniswap pool.\",\"rollFromOption\":\"The optionToken address to close a UNI-V2 position.\",\"rollToOption\":\"The optionToken address to open a UNI-V2 position.\",\"to\":\"The address that receives the UNI-V2 shares that have been rolled.\"}},\"setFactory(address)\":{\"details\":\"Sets the Uniswap V2 Factory address to use.\"},\"setQuoteToken(address)\":{\"details\":\"Sets the designated stablecoin to use (paired token in Uniswap pools).\"},\"setRegistry(address)\":{\"details\":\"Sets the Primitive V1 Registry address to use.\"},\"setRouter(address)\":{\"details\":\"Sets the Uniswap V2 Router address to use.\"},\"setTrader(address)\":{\"details\":\"Sets the Primitive V1 Trader address to use.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{\"addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \\\"to\\\" address. underlyingToken -> optionToken -> UNI-V2.\"},\"mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken.\"},\"removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender. Then closes the optionTokens and withdraws underlyingTokens to the \\\"to\\\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \\\"to\\\" address. UNI-V2 -> optionToken -> underlyingToken.\"},\"rollOption(address,address,uint256,address)\":{\"notice\":\"Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver. rollFromOption -> underlyingToken -> rollToOption.\"},\"rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair. UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/Uniswap/UniswapConnector.sol\":\"UniswapConnector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\":{\"keccak256\":\"0xe5905c0989cf5a865ed9bb7b9252536ca011c5b744017a82a7d4443b9c00a891\",\"urls\":[\"bzz-raw://5d2a90a0a796491507462a3da18c3f8819721d571572d765a2207c35bf0a0389\",\"dweb:/ipfs/Qmf9ACYiT3qzjgsYuhm866FBdiBpRMXAPpQhSFbgqcyhHt\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\":{\"keccak256\":\"0x8a3c5c449d4b7cd76513ed6995f4b86e4a86f222c770f8442f5fc128ce29b4d2\",\"urls\":[\"bzz-raw://1df63ca373dafae3bd0ee7fe70f890a1dc7c45ed869c01de68413e0e97ff9deb\",\"dweb:/ipfs/QmefJgEYGUL8KX7kQKYTrDweF8GB7yjy3nw5Bmqzryg7PG\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\":{\"keccak256\":\"0x744e30c133bd0f7ca9e7163433cf6d72f45c6bb1508c2c9c02f1a6db796ae59d\",\"urls\":[\"bzz-raw://9bf2f4454ad63d4cff03a0630e787d9e8a9deed80aec89682cd8ad6379d9ef8c\",\"dweb:/ipfs/Qme51hQNR2wpax7ooUadhtqLtXm8ffeVVYyubLkTT4wMCG\"]},\"contracts/connectors/Uniswap/UniswapConnector.sol\":{\"keccak256\":\"0x0a2956fd9268d7f22f645c8228c518eb27004d1a2d377793ce7a8dd9d3ce3a1a\",\"urls\":[\"bzz-raw://0cf6742ac6cd99893485445b50b3e75c79976ab2b1668dd9c615e478fb269d71\",\"dweb:/ipfs/QmYt19h8sEw62exd6ggmKkrbHVJPqHoSUUpUsL29odYigY\"]},\"contracts/connectors/WETH/IWethConnector.sol\":{\"keccak256\":\"0x59b34612bacc0cbaf89c320bd3bd3fd7111c4c173a3001a2d16ce194639dead2\",\"urls\":[\"bzz-raw://454a27a471fb727b18fdb5485baa8909ac6b7ed2f761241661f14a782779e79e\",\"dweb:/ipfs/QmRtmmum24bxuCSEs7dEtjUipEyiwpF59aiQX1hZRzdZm7\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IRegistry.sol\":{\"keccak256\":\"0x02aeb84e8b748674bc31707899158885066923f203e7a3a58cee3c68a49ec96f\",\"urls\":[\"bzz-raw://78dd4aa316f8b50ed595437e8a1ec1e519384c89bd605b9aa9194f3b98543a43\",\"dweb:/ipfs/QmXvrc8JwQCkFHBTwoGjV7xCUcNN8Ed15QES9tKWsjuUAz\"]},\"contracts/option/interfaces/ITrader.sol\":{\"keccak256\":\"0xb8f9e6d923e556e137a606c76e9adf8fd07375c7ff0650f4a7932adc950df44f\",\"urls\":[\"bzz-raw://ef82aa3d081c12e307f45334cffd8916a27c5c7db62c2b44ce9663633a8c385b\",\"dweb:/ipfs/QmQLsKZomP19HAAXKpLshhXiZhrusbf9yoZhy8tJDffVvS\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b61489680620000fb6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80637b103999116100c3578063acc794381161007c578063acc79438146108a1578063c0d7865514610948578063c45a01551461098c578063f2fde38b146109d6578063f441e35014610a1a578063f887ea4014610ac05761014d565b80637b103999146106135780638ac323291461065d5780638d2a1cf1146107215780638da5cb5b146107cf578063a6bc18f914610819578063a91ee0dc1461085d5761014d565b806351b8498f1161011557806351b8498f146103dd5780635bb478081461049f5780636af255d7146104e35780636bd64c3a146105675780636d4542bd14610585578063715018a6146106095761014d565b80631459457a146101525780631758078b146102165780631cfb886d14610260578063217a4b70146102a45780632ea4fbb4146102ee575b600080fd5b610214600480360360a081101561016857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b0a565b005b61021e61114d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102a26004803603602081101561027657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611173565b005b6102ac6112da565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c3600480360360c081101561030457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561035557600080fd5b82018360208201111561036757600080fd5b8035906020019184602083028401116401000000008311171561038957600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611300565b604051808215151515815260200191505060405180910390f35b61045d600480360360a08110156103f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611497565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e1600480360360208110156104b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061167a565b005b610525600480360360208110156104f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117e1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61056f611921565b6040518082815260200191505060405180910390f35b6105c76004803603602081101561059b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611932565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610611611b13565b005b61061b611c9b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610707600480360360e081101561067357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611cc1565b604051808215151515815260200191505060405180910390f35b6107b5600480360360e081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611deb565b604051808215151515815260200191505060405180910390f35b6107d7612337565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61085b6004803603602081101561082f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612360565b005b61089f6004803603602081101561087357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124c7565b005b61092b600480360360c08110156108b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061262e565b604051808381526020018281526020019250505060405180910390f35b61098a6004803603602081101561095e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f59565b005b6109946130c0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a18600480360360208110156109ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506130e6565b005b610aa660048036036080811015610a3057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506132f3565b604051808215151515815260200191505060405180910390f35b610ac861361e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b12613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ee3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61117b613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461123c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006113108a8a3061364c565b9150915060006113658b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a61384c565b915050806113db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61148686838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142657600080fd5b505afa15801561143a573d6000803e3d6000fd5b505050506040513d602081101561145057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b809350505050979650505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561158557600080fd5b505afa158015611599573d6000803e3d6000fd5b505050506040513d60208110156115af57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611665576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61166e81611932565b91505095945050505050565b611682613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611743576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156118db57600080fd5b505af11580156118ef573d6000803e3d6000fd5b505050506040513d602081101561190557600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611a2a57600080fd5b505afa158015611a3e573d6000803e3d6000fd5b505050506040513d6020811015611a5457600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b0a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b611b1b613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bdc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000611cd48a898989898961262e565b915091506000611ce98a84848b8b8b8b611deb565b905080611d5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16611e6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611f0333308a8473ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b600080611f118c8c3061364c565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611fbc57600080fd5b505af1158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561209f57600080fd5b505af11580156120b3573d6000803e3d6000fd5b505050506040513d60208110156120c957600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561220c57600080fd5b505af1158015612220573d6000803e3d6000fd5b505050506040513d606081101561223657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061230933828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a957600080fd5b505afa1580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612368613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612429576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b6124cf613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612590576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166126b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006127048b611932565b905061273333308c8473ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156127fc57600080fd5b505af1158015612810573d6000803e3d6000fd5b505050506040513d602081101561282657600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561296457600080fd5b505af1158015612978573d6000803e3d6000fd5b505050506040513d604081101561298e57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612a7b57600080fd5b505af1158015612a8f573d6000803e3d6000fd5b505050506040513d6020811015612aa557600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612afd57600080fd5b505afa158015612b11573d6000803e3d6000fd5b505050506040513d6020811015612b2757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612bde57600080fd5b505af1158015612bf2573d6000803e3d6000fd5b505050506040513d6020811015612c0857600080fd5b8101908080519060200190929190505050506000612d408573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015612c6557600080fd5b505afa158015612c79573d6000803e3d6000fd5b505050506040513d6020811015612c8f57600080fd5b8101908080519060200190929190505050612d328773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015612ce857600080fd5b505afa158015612cfc573d6000803e3d6000fd5b505050506040513d6020811015612d1257600080fd5b810190808051906020019092919050505087613d7b90919063ffffffff16565b613e0190919063ffffffff16565b9050612def3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d8e57600080fd5b505afa158015612da2573d6000803e3d6000fd5b505050506040513d6020811015612db857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015612eab57600080fd5b505af1158015612ebf573d6000803e3d6000fd5b505050506040513d6060811015612ed557600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612f2889838773ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b612f61613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613022576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6130ee613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146131af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806147f06026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080613301868530613e4b565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561337257600080fd5b505afa158015613386573d6000803e3d6000fd5b505050506040513d602081101561339c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561345357600080fd5b505af1158015613467573d6000803e3d6000fd5b505050506040513d602081101561347d57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561354b57600080fd5b505af115801561355f573d6000803e3d6000fd5b505050506040513d604081101561357557600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600080600084116136c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6137723386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561371157600080fd5b505afa158015613725573d6000803e3d6000fd5b505050506040513d602081101561373b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156137f357600080fd5b505af1158015613807573d6000803e3d6000fd5b505050506040513d604081101561381d57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061387457fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139d357600080fd5b505af11580156139e7573d6000803e3d6000fd5b505050506040513d60208110156139fd57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015613ac6578082015181840152602081019050613aab565b505050509050019650505050505050600060405180830381600087803b158015613aef57600080fd5b505af1158015613b03573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015613b2d57600080fd5b8101908080516040519392919084640100000000821115613b4d57600080fd5b83820191506020820185811115613b6357600080fd5b8251866020820283011164010000000082111715613b8057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613bb7578082015181840152602081019050613b9c565b5050505090500160405250505092506001915050965096945050505050565b613c898363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614493565b505050565b613d75846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614493565b50505050565b600080831415613d8e5760009050613dfb565b6000828402905082848281613d9f57fe5b0414613df6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806148166021913960400191505060405180910390fd5b809150505b92915050565b6000613e4383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506146de565b905092915050565b6000806000808511613ec5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613f4357600080fd5b505afa158015613f57573d6000803e3d6000fd5b505050506040513d6020811015613f6d57600080fd5b81019080805190602001909291905050501015613ff2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006141188773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561403d57600080fd5b505afa158015614051573d6000803e3d6000fd5b505050506040513d602081101561406757600080fd5b810190808051906020019092919050505061410a8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140c057600080fd5b505afa1580156140d4573d6000803e3d6000fd5b505050506040513d60208110156140ea57600080fd5b810190808051906020019092919050505089613d7b90919063ffffffff16565b613e0190919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561416157600080fd5b505afa158015614175573d6000803e3d6000fd5b505050506040513d602081101561418b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561421857600080fd5b505afa15801561422c573d6000803e3d6000fd5b505050506040513d602081101561424257600080fd5b810190808051906020019092919050505010156142c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6143743388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561431357600080fd5b505afa158015614327573d6000803e3d6000fd5b505050506040513d602081101561433d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6143a13388888a73ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561442357600080fd5b505af1158015614437573d6000803e3d6000fd5b505050506040513d606081101561444d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6144b28273ffffffffffffffffffffffffffffffffffffffff166147a4565b614524576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106145735780518252602082019150602081019050602083039250614550565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146145d5576040519150601f19603f3d011682016040523d82523d6000602084013e6145da565b606091505b509150915081614652576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156146d85780806020019051602081101561467157600080fd5b81019080805190602001909291905050506146d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614837602a913960400191505060405180910390fd5b5b50505050565b6000808311829061478a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561474f578082015181840152602081019050614734565b50505050905090810190601f16801561477c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161479657fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156147e657506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206a02d8925e0d15fbbdc88e403bfbf23469009b1d75d38009b0fb6b108535ae4f64736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80637b103999116100c3578063acc794381161007c578063acc79438146108a1578063c0d7865514610948578063c45a01551461098c578063f2fde38b146109d6578063f441e35014610a1a578063f887ea4014610ac05761014d565b80637b103999146106135780638ac323291461065d5780638d2a1cf1146107215780638da5cb5b146107cf578063a6bc18f914610819578063a91ee0dc1461085d5761014d565b806351b8498f1161011557806351b8498f146103dd5780635bb478081461049f5780636af255d7146104e35780636bd64c3a146105675780636d4542bd14610585578063715018a6146106095761014d565b80631459457a146101525780631758078b146102165780631cfb886d14610260578063217a4b70146102a45780632ea4fbb4146102ee575b600080fd5b610214600480360360a081101561016857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b0a565b005b61021e61114d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102a26004803603602081101561027657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611173565b005b6102ac6112da565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c3600480360360c081101561030457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561035557600080fd5b82018360208201111561036757600080fd5b8035906020019184602083028401116401000000008311171561038957600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611300565b604051808215151515815260200191505060405180910390f35b61045d600480360360a08110156103f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611497565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e1600480360360208110156104b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061167a565b005b610525600480360360208110156104f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117e1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61056f611921565b6040518082815260200191505060405180910390f35b6105c76004803603602081101561059b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611932565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610611611b13565b005b61061b611c9b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610707600480360360e081101561067357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611cc1565b604051808215151515815260200191505060405180910390f35b6107b5600480360360e081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611deb565b604051808215151515815260200191505060405180910390f35b6107d7612337565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61085b6004803603602081101561082f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612360565b005b61089f6004803603602081101561087357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124c7565b005b61092b600480360360c08110156108b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061262e565b604051808381526020018281526020019250505060405180910390f35b61098a6004803603602081101561095e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f59565b005b6109946130c0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610a18600480360360208110156109ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506130e6565b005b610aa660048036036080811015610a3057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506132f3565b604051808215151515815260200191505060405180910390f35b610ac861361e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b12613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ee3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61117b613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461123c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006113108a8a3061364c565b9150915060006113658b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a61384c565b915050806113db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61148686838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142657600080fd5b505afa15801561143a573d6000803e3d6000fd5b505050506040513d602081101561145057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b809350505050979650505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561158557600080fd5b505afa158015611599573d6000803e3d6000fd5b505050506040513d60208110156115af57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611665576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61166e81611932565b91505095945050505050565b611682613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611743576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156118db57600080fd5b505af11580156118ef573d6000803e3d6000fd5b505050506040513d602081101561190557600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611a2a57600080fd5b505afa158015611a3e573d6000803e3d6000fd5b505050506040513d6020811015611a5457600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b0a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b611b1b613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bdc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000611cd48a898989898961262e565b915091506000611ce98a84848b8b8b8b611deb565b905080611d5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16611e6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611f0333308a8473ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b600080611f118c8c3061364c565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611fbc57600080fd5b505af1158015611fd0573d6000803e3d6000fd5b505050506040513d6020811015611fe657600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561209f57600080fd5b505af11580156120b3573d6000803e3d6000fd5b505050506040513d60208110156120c957600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561220c57600080fd5b505af1158015612220573d6000803e3d6000fd5b505050506040513d606081101561223657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061230933828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a957600080fd5b505afa1580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612368613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612429576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b6124cf613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612590576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166126b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006127048b611932565b905061273333308c8473ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156127fc57600080fd5b505af1158015612810573d6000803e3d6000fd5b505050506040513d602081101561282657600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561296457600080fd5b505af1158015612978573d6000803e3d6000fd5b505050506040513d604081101561298e57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612a7b57600080fd5b505af1158015612a8f573d6000803e3d6000fd5b505050506040513d6020811015612aa557600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612afd57600080fd5b505afa158015612b11573d6000803e3d6000fd5b505050506040513d6020811015612b2757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612bde57600080fd5b505af1158015612bf2573d6000803e3d6000fd5b505050506040513d6020811015612c0857600080fd5b8101908080519060200190929190505050506000612d408573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015612c6557600080fd5b505afa158015612c79573d6000803e3d6000fd5b505050506040513d6020811015612c8f57600080fd5b8101908080519060200190929190505050612d328773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015612ce857600080fd5b505afa158015612cfc573d6000803e3d6000fd5b505050506040513d6020811015612d1257600080fd5b810190808051906020019092919050505087613d7b90919063ffffffff16565b613e0190919063ffffffff16565b9050612def3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d8e57600080fd5b505afa158015612da2573d6000803e3d6000fd5b505050506040513d6020811015612db857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015612eab57600080fd5b505af1158015612ebf573d6000803e3d6000fd5b505050506040513d6060811015612ed557600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612f2889838773ffffffffffffffffffffffffffffffffffffffff16613bd69092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b612f61613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613022576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6130ee613644565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146131af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806147f06026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080613301868530613e4b565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561337257600080fd5b505afa158015613386573d6000803e3d6000fd5b505050506040513d602081101561339c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561345357600080fd5b505af1158015613467573d6000803e3d6000fd5b505050506040513d602081101561347d57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561354b57600080fd5b505af115801561355f573d6000803e3d6000fd5b505050506040513d604081101561357557600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600080600084116136c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6137723386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561371157600080fd5b505afa158015613725573d6000803e3d6000fd5b505050506040513d602081101561373b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156137f357600080fd5b505af1158015613807573d6000803e3d6000fd5b505050506040513d604081101561381d57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061387457fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139d357600080fd5b505af11580156139e7573d6000803e3d6000fd5b505050506040513d60208110156139fd57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015613ac6578082015181840152602081019050613aab565b505050509050019650505050505050600060405180830381600087803b158015613aef57600080fd5b505af1158015613b03573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015613b2d57600080fd5b8101908080516040519392919084640100000000821115613b4d57600080fd5b83820191506020820185811115613b6357600080fd5b8251866020820283011164010000000082111715613b8057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015613bb7578082015181840152602081019050613b9c565b5050505090500160405250505092506001915050965096945050505050565b613c898363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614493565b505050565b613d75846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614493565b50505050565b600080831415613d8e5760009050613dfb565b6000828402905082848281613d9f57fe5b0414613df6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806148166021913960400191505060405180910390fd5b809150505b92915050565b6000613e4383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506146de565b905092915050565b6000806000808511613ec5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613f4357600080fd5b505afa158015613f57573d6000803e3d6000fd5b505050506040513d6020811015613f6d57600080fd5b81019080805190602001909291905050501015613ff2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006141188773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561403d57600080fd5b505afa158015614051573d6000803e3d6000fd5b505050506040513d602081101561406757600080fd5b810190808051906020019092919050505061410a8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140c057600080fd5b505afa1580156140d4573d6000803e3d6000fd5b505050506040513d60208110156140ea57600080fd5b810190808051906020019092919050505089613d7b90919063ffffffff16565b613e0190919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561416157600080fd5b505afa158015614175573d6000803e3d6000fd5b505050506040513d602081101561418b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561421857600080fd5b505afa15801561422c573d6000803e3d6000fd5b505050506040513d602081101561424257600080fd5b810190808051906020019092919050505010156142c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6143743388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561431357600080fd5b505afa158015614327573d6000803e3d6000fd5b505050506040513d602081101561433d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6143a13388888a73ffffffffffffffffffffffffffffffffffffffff16613c8e909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561442357600080fd5b505af1158015614437573d6000803e3d6000fd5b505050506040513d606081101561444d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6144b28273ffffffffffffffffffffffffffffffffffffffff166147a4565b614524576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106145735780518252602082019150602081019050602083039250614550565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146145d5576040519150601f19603f3d011682016040523d82523d6000602084013e6145da565b606091505b509150915081614652576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156146d85780806020019051602081101561467157600080fd5b81019080805190602001909291905050506146d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614837602a913960400191505060405180910390fd5b5b50505050565b6000808311829061478a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561474f578082015181840152602081019050614734565b50505050905090810190601f16801561477c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161479657fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156147e657506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206a02d8925e0d15fbbdc88e403bfbf23469009b1d75d38009b0fb6b108535ae4f64736f6c63430006020033", + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"quoteToken\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionMarketFrom\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionMarketTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"name\":\"RolledOptionLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionFrom\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"RolledOptions\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newFactory\",\"type\":\"address\"}],\"name\":\"UpdatedFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newQuote\",\"type\":\"address\"}],\"name\":\"UpdatedQuoteToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRegistry\",\"type\":\"address\"}],\"name\":\"UpdatedRegistry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"UpdatedRouter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTrader\",\"type\":\"address\"}],\"name\":\"UpdatedTrader\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityQuoteTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuantityQuoteTokens\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityWithUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"deployUniswapMarket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"flashLoanQuantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"flashloanMintShortOptionsThenSwap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxDeadline\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"getUniswapMarketForOption\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"getUniswapMarketForSeries\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"quoteToken_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintShortOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"}],\"name\":\"openFlashShort\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quoteToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityThenCloseOptions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rollFromOption\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rollToOption\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rollQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"rollOption\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rollFromOption\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rollToOption\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"rollOptionLiquidity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router02\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"}],\"name\":\"setFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"quoteToken_\",\"type\":\"address\"}],\"name\":\"setQuoteToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"}],\"name\":\"setTrader\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trader\",\"outputs\":[{\"internalType\":\"contract ITrader\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV2Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Adds liquidity to an option<>quote token pair by minting optionTokens with underlyingTokens.\",\"params\":{\"deadline\":\"The timestamp to expire a pending transaction.\",\"minQuantityOptions\":\"The minimum quantity of optionTokens expected to provide liquidity with.\",\"minQuantityQuoteTokens\":\"The minimum quantity of quoteTokens expected to provide liquidity with.\",\"optionAddress\":\"The address of the optionToken to mint then provide liquidity for.\",\"quantityOptions\":\"The quantity of underlyingTokens to use to mint optionTokens.\",\"quantityQuoteTokens\":\"The quantity of quoteTokens to add with optionTokens to the Uniswap V2 Pair.\",\"to\":\"The address that receives UNI-V2 shares.\"}},\"deployUniswapMarket(address)\":{\"details\":\"Creats a Uniswap pair for option<>quote tokens.\",\"params\":{\"optionAddress\":\"The address of the option to deploy a Uniswap V2 Pair for with the quoteToken.\"}},\"flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference.\",\"params\":{\"amountOutMin\":\"The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"flashLoanQuantity\":\"The quantity of options to mint.\",\"optionToken\":\"The address of the Option contract.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\",\"to\":\"The address to send the redeemToken proceeds and optionTokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not.\"}},\"getMaxDeadline()\":{\"details\":\"The maxmium deadline available for each trade.\"},\"getUniswapMarketForOption(address)\":{\"details\":\"Gets a Uniswap Pair address for an option token and quote token.\",\"params\":{\"optionAddress\":\"The address of the option to get a Uniswap V2 Pair address for (with quoteToken).\"}},\"getUniswapMarketForSeries(address,address,uint256,uint256,uint256)\":{\"details\":\"Gets a Uniswap Pair address for the corresponding option parameters.\"},\"mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints options using underlyingTokens provided by user, then swaps on Uniswap V2. Combines Primitive \\\"mintOptions\\\" function with Uniswap V2 Router \\\"swapExactTokensForTokens\\\" function.\",\"params\":{\"amountIn\":\"The quantity of options to mint and then sell.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the optionTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Oracle-less Primitive option.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\",\"to\":\"The address to send the optionToken proceeds and redeem tokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not.\"}},\"mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens.\",\"params\":{\"amountIn\":\"The quantity of options to mint.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the redeemTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Option contract.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\",\"to\":\"The address to send the redeemToken proceeds and optionTokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines Uniswap V2 Router \\\"removeLiquidity\\\" function with Primitive \\\"closeOptions\\\" function.\",\"params\":{\"amountAMin\":\"The minimum quantity of optionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction.\",\"liquidity\":\"The quantity of liquidity tokens to pull from msg.sender and burn.\",\"optionAddress\":\"The address of the option that will be closed from burned UNI-V2 liquidity shares.\",\"to\":\"The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"rollOption(address,address,uint256,address)\":{\"details\":\"Closes an option position and opens a new one using the freed underlyingTokens.\",\"params\":{\"receiver\":\"The address that receives newly minted option and redeem tokens.\",\"rollFromOption\":\"The optionToken to close.\",\"rollQuantity\":\"The quantity of underlyingTokens to receive from closed options then use to mint new options.\",\"rollToOption\":\"The optionToken to mint.\"}},\"rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines \\\"removeLiquidityThenCloseOptions\\\" function with \\\"addLiquidityWithUnderlying\\\" fuction.\",\"params\":{\"amountAMin\":\"The minimum quantity of optionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction.\",\"liquidity\":\"The quantity of UNI-V2 shares to roll from the first Uniswap pool.\",\"rollFromOption\":\"The optionToken address to close a UNI-V2 position.\",\"rollToOption\":\"The optionToken address to open a UNI-V2 position.\",\"to\":\"The address that receives the UNI-V2 shares that have been rolled.\"}},\"setFactory(address)\":{\"details\":\"Sets the Uniswap V2 Factory address to use.\"},\"setQuoteToken(address)\":{\"details\":\"Sets the designated stablecoin to use (paired token in Uniswap pools).\"},\"setRegistry(address)\":{\"details\":\"Sets the Primitive V1 Registry address to use.\"},\"setRouter(address)\":{\"details\":\"Sets the Uniswap V2 Router address to use.\"},\"setTrader(address)\":{\"details\":\"Sets the Primitive V1 Trader address to use.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{\"addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \\\"to\\\" address. underlyingToken -> optionToken -> UNI-V2.\"},\"flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the redeemToken address, the tx will fail. underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\"},\"mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken.\"},\"mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the redeemToken address, the tx will fail. underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\"},\"removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender. Then closes the optionTokens and withdraws underlyingTokens to the \\\"to\\\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \\\"to\\\" address. UNI-V2 -> optionToken -> underlyingToken.\"},\"rollOption(address,address,uint256,address)\":{\"notice\":\"Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver. rollFromOption -> underlyingToken -> rollToOption.\"},\"rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair. UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/Uniswap/UniswapConnector.sol\":\"UniswapConnector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\":{\"keccak256\":\"0xdb17a1fb73e261e736ae8862be2d9a32964fc4b3741f48980f5cdc9d92b99a96\",\"urls\":[\"bzz-raw://468dab23a95d9d9b7d6ce74008d45eef3de2f137ede604e6be6c5e7d0121c5e9\",\"dweb:/ipfs/QmcXwjTfp6tCRgf1KsNQyUAtrqKhiaN6fbaHVGr22eficP\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\":{\"keccak256\":\"0xe5905c0989cf5a865ed9bb7b9252536ca011c5b744017a82a7d4443b9c00a891\",\"urls\":[\"bzz-raw://5d2a90a0a796491507462a3da18c3f8819721d571572d765a2207c35bf0a0389\",\"dweb:/ipfs/Qmf9ACYiT3qzjgsYuhm866FBdiBpRMXAPpQhSFbgqcyhHt\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\",\"urls\":[\"bzz-raw://85d5ad2dd23ee127f40907a12865a1e8cb5828814f6f2480285e1827dd72dedf\",\"dweb:/ipfs/QmayKQWJgWmr46DqWseADyUanmqxh662hPNdAkdHRjiQQH\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\":{\"keccak256\":\"0x8a3c5c449d4b7cd76513ed6995f4b86e4a86f222c770f8442f5fc128ce29b4d2\",\"urls\":[\"bzz-raw://1df63ca373dafae3bd0ee7fe70f890a1dc7c45ed869c01de68413e0e97ff9deb\",\"dweb:/ipfs/QmefJgEYGUL8KX7kQKYTrDweF8GB7yjy3nw5Bmqzryg7PG\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\":{\"keccak256\":\"0x744e30c133bd0f7ca9e7163433cf6d72f45c6bb1508c2c9c02f1a6db796ae59d\",\"urls\":[\"bzz-raw://9bf2f4454ad63d4cff03a0630e787d9e8a9deed80aec89682cd8ad6379d9ef8c\",\"dweb:/ipfs/Qme51hQNR2wpax7ooUadhtqLtXm8ffeVVYyubLkTT4wMCG\"]},\"contracts/connectors/Uniswap/UniswapConnector.sol\":{\"keccak256\":\"0x2b39d70b82cc6ea285d1cde55cc1ec3c810e3007569c292311ddb8d2e5e1d558\",\"urls\":[\"bzz-raw://f2db8f18b3ba7df3c33a4bd9c63af64e5f90a5bef8f2c37c28926d1870aec0f1\",\"dweb:/ipfs/QmWFtH33ZMqybrrgkmDoRGDAaU7x9by28nQSTpme8c6q8c\"]},\"contracts/connectors/WETH/IWethConnector.sol\":{\"keccak256\":\"0x59b34612bacc0cbaf89c320bd3bd3fd7111c4c173a3001a2d16ce194639dead2\",\"urls\":[\"bzz-raw://454a27a471fb727b18fdb5485baa8909ac6b7ed2f761241661f14a782779e79e\",\"dweb:/ipfs/QmRtmmum24bxuCSEs7dEtjUipEyiwpF59aiQX1hZRzdZm7\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IRegistry.sol\":{\"keccak256\":\"0x02aeb84e8b748674bc31707899158885066923f203e7a3a58cee3c68a49ec96f\",\"urls\":[\"bzz-raw://78dd4aa316f8b50ed595437e8a1ec1e519384c89bd605b9aa9194f3b98543a43\",\"dweb:/ipfs/QmXvrc8JwQCkFHBTwoGjV7xCUcNN8Ed15QES9tKWsjuUAz\"]},\"contracts/option/interfaces/ITrader.sol\":{\"keccak256\":\"0xb8f9e6d923e556e137a606c76e9adf8fd07375c7ff0650f4a7932adc950df44f\",\"urls\":[\"bzz-raw://ef82aa3d081c12e307f45334cffd8916a27c5c7db62c2b44ce9663633a8c385b\",\"dweb:/ipfs/QmQLsKZomP19HAAXKpLshhXiZhrusbf9yoZhy8tJDffVvS\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b61580f80620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638ac32329116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610dae578063f2fde38b14610df8578063f441e35014610e3c578063f887ea4014610ee2576101c4565b8063acc7943814610c79578063ad5c464814610d20578063c0d7865514610d6a576101c4565b806395f0ae76116100d357806395f0ae7614610995578063a6bc18f914610ac3578063a91ee0dc14610b07578063aa08e4b614610b4b576101c4565b80638ac32329146107d95780638d2a1cf11461089d5780638da5cb5b1461094b576101c4565b806351b8498f116101665780636bd64c3a116101405780636bd64c3a146106e35780636d4542bd14610701578063715018a6146107855780637b1039991461078f576101c4565b806351b8498f146105595780635bb478081461061b5780636af255d71461065f576101c4565b80631cfb886d116101a25780631cfb886d14610384578063217a4b70146103c85780632ea4fbb41461041257806338bd2aaa14610501576101c4565b806310d1e85c146101c95780631459457a146102765780631758078b1461033a575b600080fd5b610274600480360360808110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184600183028401116401000000008311171561026457600080fd5b9091929391929390505050610f2c565b005b610338600480360360a081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611021565b005b610342611664565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c66004803603602081101561039a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168a565b005b6103d06117f1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e7600480360360c081101561042857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611817565b604051808215151515815260200191505060405180910390f35b6105576004803603606081101561051757600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ae565b005b6105d9600480360360a081101561056f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611d2a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61065d6004803603602081101561063157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f0d565b005b6106a16004803603602081101561067557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612074565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb6121b4565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121c5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078d6123a6565b005b61079761252e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610883600480360360e08110156107ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612554565b604051808215151515815260200191505060405180910390f35b610931600480360360e08110156108b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061267e565b604051808215151515815260200191505060405180910390f35b610953612bca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aa9600480360360c08110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109fc57600080fd5b820183602082011115610a0e57600080fd5b80359060200191846020830284011164010000000083111715610a3057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612bf3565b604051808215151515815260200191505060405180910390f35b610b0560048036036020811015610ad957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d4e565b005b610b4960048036036020811015610b1d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612eb5565b005b610c5f600480360360c0811015610b6157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610bb257600080fd5b820183602082011115610bc457600080fd5b80359060200191846020830284011164010000000083111715610be657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061301c565b604051808215151515815260200191505060405180910390f35b610d03600480360360c0811015610c8f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613485565b604051808381526020018281526020019250505060405180910390f35b610d28613db0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dac60048036036020811015610d8057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613dc8565b005b610db6613f2f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e3a60048036036020811015610e0e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613f55565b005b610ec860048036036080811015610e5257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614162565b604051808215151515815260200191505060405180910390f35b610eea61448d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610f9b576040519150601f19603f3d011682016040523d82523d6000602084013e610fa0565b606091505b509150915081611018576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f5345435552455f4c4f414e5f43414c4c5f4641494c0000000000000081525060200191505060405180910390fd5b50505050505050565b6110296144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611272576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611336576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116926144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611753576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006118278a8a306144bb565b91509150600061187c8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6146bb565b915050806118f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61199d86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561193d57600080fd5b505afa158015611951573d6000803e3d6000fd5b505050506040513d602081101561196757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f657600080fd5b505afa158015611a0a573d6000803e3d6000fd5b505050506040513d6020811015611a2057600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7b57600080fd5b505afa158015611a8f573d6000803e3d6000fd5b505050506040513d6020811015611aa557600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611baf57600080fd5b505afa158015611bc3573d6000803e3d6000fd5b505050506040513d6020811015611bd957600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611c1e5781602001602082028038833980820191505090505b5090508381600081518110611c2f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611c9957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611ce157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611e1857600080fd5b505afa158015611e2c573d6000803e3d6000fd5b505050506040513d6020811015611e4257600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ef8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b611f01816121c5565b91505095945050505050565b611f156144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561216e57600080fd5b505af1158015612182573d6000803e3d6000fd5b505050506040513d602081101561219857600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156122bd57600080fd5b505afa1580156122d1573d6000803e3d6000fd5b505050506040513d60208110156122e757600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561239d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6123ae6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461246f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006125678a8989898989613485565b91509150600061257c8a84848b8b8b8b61267e565b9050806125f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612701576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061279633308a8473ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000806127a48c8c306144bb565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561284f57600080fd5b505af1158015612863573d6000803e3d6000fd5b505050506040513d602081101561287957600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561293257600080fd5b505af1158015612946573d6000803e3d6000fd5b505050506040513d602081101561295c57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612a9f57600080fd5b505af1158015612ab3573d6000803e3d6000fd5b505050506040513d6060811015612ac957600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612b9c33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3c57600080fd5b505afa158015612b50573d6000803e3d6000fd5b505050506040513d6020811015612b6657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612c038989306144bb565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c4f57600080fd5b505afa158015612c63573d6000803e3d6000fd5b505050506040513d6020811015612c7957600080fd5b810190808051906020019092919050505090506000612c9c82848b8b8b8b6146bb565b91505080612d12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612d3d87858d73ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b809450505050509695505050505050565b612d566144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612e17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b612ebd6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612f7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b6000808611613093576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156130db57600080fd5b505afa1580156130ef573d6000803e3d6000fd5b505050506040513d602081101561310557600080fd5b8101908080519060200190929190505050905061314388888373ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156131c457600080fd5b505af11580156131d8573d6000803e3d6000fd5b505050506040513d60408110156131ee57600080fd5b810190808051906020019092919080519060200190929190505050915091508273ffffffffffffffffffffffffffffffffffffffff168760028151811061323157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146132c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b606060006133548c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330f57600080fd5b505afa158015613323573d6000803e3d6000fd5b505050506040513d602081101561333957600080fd5b8101908080519060200190929190505050848c8c338c6146bb565b91509150806133cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000826001815181106133da57fe5b60200260200101518c116133ef576000613417565b613416836001815181106133ff57fe5b60200260200101518d614bea90919063ffffffff16565b5b90506134468933838973ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b61347189868f73ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b505050600193505050509695505050505050565b600080600060149054906101000a900460ff1661350a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000899050600061355b8b6121c5565b905061358a33308c8473ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561365357600080fd5b505af1158015613667573d6000803e3d6000fd5b505050506040513d602081101561367d57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156137bb57600080fd5b505af11580156137cf573d6000803e3d6000fd5b505050506040513d60408110156137e557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138d257600080fd5b505af11580156138e6573d6000803e3d6000fd5b505050506040513d60208110156138fc57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561395457600080fd5b505afa158015613968573d6000803e3d6000fd5b505050506040513d602081101561397e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a3557600080fd5b505af1158015613a49573d6000803e3d6000fd5b505050506040513d6020811015613a5f57600080fd5b8101908080519060200190929190505050506000613b978573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613abc57600080fd5b505afa158015613ad0573d6000803e3d6000fd5b505050506040513d6020811015613ae657600080fd5b8101908080519060200190929190505050613b898773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b3f57600080fd5b505afa158015613b53573d6000803e3d6000fd5b505050506040513d6020811015613b6957600080fd5b810190808051906020019092919050505087614c3490919063ffffffff16565b614cba90919063ffffffff16565b9050613c463330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613be557600080fd5b505afa158015613bf9573d6000803e3d6000fd5b505050506040513d6020811015613c0f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613d0257600080fd5b505af1158015613d16573d6000803e3d6000fd5b505050506040513d6060811015613d2c57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050613d7f89838773ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b613dd06144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613e91576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b613f5d6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461401e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156140a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806157696026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614170868530614d04565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156141e157600080fd5b505afa1580156141f5573d6000803e3d6000fd5b505050506040513d602081101561420b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156142c257600080fd5b505af11580156142d6573d6000803e3d6000fd5b505050506040513d60208110156142ec57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156143ba57600080fd5b505af11580156143ce573d6000803e3d6000fd5b505050506040513d60408110156143e457600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b60008060008411614534576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6145e13386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561458057600080fd5b505afa158015614594573d6000803e3d6000fd5b505050506040513d60208110156145aa57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561466257600080fd5b505af1158015614676573d6000803e3d6000fd5b505050506040513d604081101561468c57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106146e357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614774576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561484257600080fd5b505af1158015614856573d6000803e3d6000fd5b505050506040513d602081101561486c57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561493557808201518184015260208101905061491a565b505050509050019650505050505050600060405180830381600087803b15801561495e57600080fd5b505af1158015614972573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561499c57600080fd5b81019080805160405193929190846401000000008211156149bc57600080fd5b838201915060208201858111156149d257600080fd5b82518660208202830111640100000000821117156149ef57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614a26578082015181840152602081019050614a0b565b5050505090500160405250505092506001915050965096945050505050565b614af88363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061534c565b505050565b614be4846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061534c565b50505050565b6000614c2c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615597565b905092915050565b600080831415614c475760009050614cb4565b6000828402905082848281614c5857fe5b0414614caf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061578f6021913960400191505060405180910390fd5b809150505b92915050565b6000614cfc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615657565b905092915050565b6000806000808511614d7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614dfc57600080fd5b505afa158015614e10573d6000803e3d6000fd5b505050506040513d6020811015614e2657600080fd5b81019080805190602001909291905050501015614eab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000614fd18773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015614ef657600080fd5b505afa158015614f0a573d6000803e3d6000fd5b505050506040513d6020811015614f2057600080fd5b8101908080519060200190929190505050614fc38973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f7957600080fd5b505afa158015614f8d573d6000803e3d6000fd5b505050506040513d6020811015614fa357600080fd5b810190808051906020019092919050505089614c3490919063ffffffff16565b614cba90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561501a57600080fd5b505afa15801561502e573d6000803e3d6000fd5b505050506040513d602081101561504457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156150d157600080fd5b505afa1580156150e5573d6000803e3d6000fd5b505050506040513d60208110156150fb57600080fd5b81019080805190602001909291905050501015615180576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61522d3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156151cc57600080fd5b505afa1580156151e0573d6000803e3d6000fd5b505050506040513d60208110156151f657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b61525a3388888a73ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156152dc57600080fd5b505af11580156152f0573d6000803e3d6000fd5b505050506040513d606081101561530657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b61536b8273ffffffffffffffffffffffffffffffffffffffff1661571d565b6153dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061542c5780518252602082019150602081019050602083039250615409565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461548e576040519150601f19603f3d011682016040523d82523d6000602084013e615493565b606091505b50915091508161550b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156155915780806020019051602081101561552a57600080fd5b8101908080519060200190929190505050615590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806157b0602a913960400191505060405180910390fd5b5b50505050565b6000838311158290615644576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156156095780820151818401526020810190506155ee565b50505050905090810190601f1680156156365780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290615703576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156156c85780820151818401526020810190506156ad565b50505050905090810190601f1680156156f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161570f57fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561575f57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220c281387a18b9cadbfb4c7dc289d6c36d99e4e0cad4e5a565e630d1362bd1beda64736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638ac32329116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610dae578063f2fde38b14610df8578063f441e35014610e3c578063f887ea4014610ee2576101c4565b8063acc7943814610c79578063ad5c464814610d20578063c0d7865514610d6a576101c4565b806395f0ae76116100d357806395f0ae7614610995578063a6bc18f914610ac3578063a91ee0dc14610b07578063aa08e4b614610b4b576101c4565b80638ac32329146107d95780638d2a1cf11461089d5780638da5cb5b1461094b576101c4565b806351b8498f116101665780636bd64c3a116101405780636bd64c3a146106e35780636d4542bd14610701578063715018a6146107855780637b1039991461078f576101c4565b806351b8498f146105595780635bb478081461061b5780636af255d71461065f576101c4565b80631cfb886d116101a25780631cfb886d14610384578063217a4b70146103c85780632ea4fbb41461041257806338bd2aaa14610501576101c4565b806310d1e85c146101c95780631459457a146102765780631758078b1461033a575b600080fd5b610274600480360360808110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184600183028401116401000000008311171561026457600080fd5b9091929391929390505050610f2c565b005b610338600480360360a081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611021565b005b610342611664565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c66004803603602081101561039a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168a565b005b6103d06117f1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e7600480360360c081101561042857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611817565b604051808215151515815260200191505060405180910390f35b6105576004803603606081101561051757600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ae565b005b6105d9600480360360a081101561056f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611d2a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61065d6004803603602081101561063157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f0d565b005b6106a16004803603602081101561067557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612074565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb6121b4565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121c5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078d6123a6565b005b61079761252e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610883600480360360e08110156107ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612554565b604051808215151515815260200191505060405180910390f35b610931600480360360e08110156108b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061267e565b604051808215151515815260200191505060405180910390f35b610953612bca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aa9600480360360c08110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109fc57600080fd5b820183602082011115610a0e57600080fd5b80359060200191846020830284011164010000000083111715610a3057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612bf3565b604051808215151515815260200191505060405180910390f35b610b0560048036036020811015610ad957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d4e565b005b610b4960048036036020811015610b1d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612eb5565b005b610c5f600480360360c0811015610b6157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610bb257600080fd5b820183602082011115610bc457600080fd5b80359060200191846020830284011164010000000083111715610be657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061301c565b604051808215151515815260200191505060405180910390f35b610d03600480360360c0811015610c8f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613485565b604051808381526020018281526020019250505060405180910390f35b610d28613db0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dac60048036036020811015610d8057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613dc8565b005b610db6613f2f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e3a60048036036020811015610e0e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613f55565b005b610ec860048036036080811015610e5257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614162565b604051808215151515815260200191505060405180910390f35b610eea61448d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610f9b576040519150601f19603f3d011682016040523d82523d6000602084013e610fa0565b606091505b509150915081611018576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f5345435552455f4c4f414e5f43414c4c5f4641494c0000000000000081525060200191505060405180910390fd5b50505050505050565b6110296144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611272576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611336576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116926144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611753576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006118278a8a306144bb565b91509150600061187c8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6146bb565b915050806118f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61199d86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561193d57600080fd5b505afa158015611951573d6000803e3d6000fd5b505050506040513d602081101561196757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f657600080fd5b505afa158015611a0a573d6000803e3d6000fd5b505050506040513d6020811015611a2057600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7b57600080fd5b505afa158015611a8f573d6000803e3d6000fd5b505050506040513d6020811015611aa557600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611baf57600080fd5b505afa158015611bc3573d6000803e3d6000fd5b505050506040513d6020811015611bd957600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611c1e5781602001602082028038833980820191505090505b5090508381600081518110611c2f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611c9957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611ce157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611e1857600080fd5b505afa158015611e2c573d6000803e3d6000fd5b505050506040513d6020811015611e4257600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ef8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b611f01816121c5565b91505095945050505050565b611f156144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561216e57600080fd5b505af1158015612182573d6000803e3d6000fd5b505050506040513d602081101561219857600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156122bd57600080fd5b505afa1580156122d1573d6000803e3d6000fd5b505050506040513d60208110156122e757600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561239d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6123ae6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461246f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006125678a8989898989613485565b91509150600061257c8a84848b8b8b8b61267e565b9050806125f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612701576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061279633308a8473ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000806127a48c8c306144bb565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561284f57600080fd5b505af1158015612863573d6000803e3d6000fd5b505050506040513d602081101561287957600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561293257600080fd5b505af1158015612946573d6000803e3d6000fd5b505050506040513d602081101561295c57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612a9f57600080fd5b505af1158015612ab3573d6000803e3d6000fd5b505050506040513d6060811015612ac957600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612b9c33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3c57600080fd5b505afa158015612b50573d6000803e3d6000fd5b505050506040513d6020811015612b6657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612c038989306144bb565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c4f57600080fd5b505afa158015612c63573d6000803e3d6000fd5b505050506040513d6020811015612c7957600080fd5b810190808051906020019092919050505090506000612c9c82848b8b8b8b6146bb565b91505080612d12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612d3d87858d73ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b809450505050509695505050505050565b612d566144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612e17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b612ebd6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612f7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b6000808611613093576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156130db57600080fd5b505afa1580156130ef573d6000803e3d6000fd5b505050506040513d602081101561310557600080fd5b8101908080519060200190929190505050905061314388888373ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156131c457600080fd5b505af11580156131d8573d6000803e3d6000fd5b505050506040513d60408110156131ee57600080fd5b810190808051906020019092919080519060200190929190505050915091508273ffffffffffffffffffffffffffffffffffffffff168760028151811061323157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146132c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b606060006133548c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330f57600080fd5b505afa158015613323573d6000803e3d6000fd5b505050506040513d602081101561333957600080fd5b8101908080519060200190929190505050848c8c338c6146bb565b91509150806133cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000826001815181106133da57fe5b60200260200101518c116133ef576000613417565b613416836001815181106133ff57fe5b60200260200101518d614bea90919063ffffffff16565b5b90506134468933838973ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b61347189868f73ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b505050600193505050509695505050505050565b600080600060149054906101000a900460ff1661350a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000899050600061355b8b6121c5565b905061358a33308c8473ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561365357600080fd5b505af1158015613667573d6000803e3d6000fd5b505050506040513d602081101561367d57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156137bb57600080fd5b505af11580156137cf573d6000803e3d6000fd5b505050506040513d60408110156137e557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138d257600080fd5b505af11580156138e6573d6000803e3d6000fd5b505050506040513d60208110156138fc57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561395457600080fd5b505afa158015613968573d6000803e3d6000fd5b505050506040513d602081101561397e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a3557600080fd5b505af1158015613a49573d6000803e3d6000fd5b505050506040513d6020811015613a5f57600080fd5b8101908080519060200190929190505050506000613b978573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613abc57600080fd5b505afa158015613ad0573d6000803e3d6000fd5b505050506040513d6020811015613ae657600080fd5b8101908080519060200190929190505050613b898773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b3f57600080fd5b505afa158015613b53573d6000803e3d6000fd5b505050506040513d6020811015613b6957600080fd5b810190808051906020019092919050505087614c3490919063ffffffff16565b614cba90919063ffffffff16565b9050613c463330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613be557600080fd5b505afa158015613bf9573d6000803e3d6000fd5b505050506040513d6020811015613c0f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613d0257600080fd5b505af1158015613d16573d6000803e3d6000fd5b505050506040513d6060811015613d2c57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050613d7f89838773ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b613dd06144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613e91576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b613f5d6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461401e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156140a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806157696026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614170868530614d04565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156141e157600080fd5b505afa1580156141f5573d6000803e3d6000fd5b505050506040513d602081101561420b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156142c257600080fd5b505af11580156142d6573d6000803e3d6000fd5b505050506040513d60208110156142ec57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156143ba57600080fd5b505af11580156143ce573d6000803e3d6000fd5b505050506040513d60408110156143e457600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b60008060008411614534576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6145e13386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561458057600080fd5b505afa158015614594573d6000803e3d6000fd5b505050506040513d60208110156145aa57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561466257600080fd5b505af1158015614676573d6000803e3d6000fd5b505050506040513d604081101561468c57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106146e357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614774576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561484257600080fd5b505af1158015614856573d6000803e3d6000fd5b505050506040513d602081101561486c57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561493557808201518184015260208101905061491a565b505050509050019650505050505050600060405180830381600087803b15801561495e57600080fd5b505af1158015614972573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561499c57600080fd5b81019080805160405193929190846401000000008211156149bc57600080fd5b838201915060208201858111156149d257600080fd5b82518660208202830111640100000000821117156149ef57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614a26578082015181840152602081019050614a0b565b5050505090500160405250505092506001915050965096945050505050565b614af88363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061534c565b505050565b614be4846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061534c565b50505050565b6000614c2c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615597565b905092915050565b600080831415614c475760009050614cb4565b6000828402905082848281614c5857fe5b0414614caf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061578f6021913960400191505060405180910390fd5b809150505b92915050565b6000614cfc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615657565b905092915050565b6000806000808511614d7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614dfc57600080fd5b505afa158015614e10573d6000803e3d6000fd5b505050506040513d6020811015614e2657600080fd5b81019080805190602001909291905050501015614eab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000614fd18773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015614ef657600080fd5b505afa158015614f0a573d6000803e3d6000fd5b505050506040513d6020811015614f2057600080fd5b8101908080519060200190929190505050614fc38973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f7957600080fd5b505afa158015614f8d573d6000803e3d6000fd5b505050506040513d6020811015614fa357600080fd5b810190808051906020019092919050505089614c3490919063ffffffff16565b614cba90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561501a57600080fd5b505afa15801561502e573d6000803e3d6000fd5b505050506040513d602081101561504457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156150d157600080fd5b505afa1580156150e5573d6000803e3d6000fd5b505050506040513d60208110156150fb57600080fd5b81019080805190602001909291905050501015615180576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61522d3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156151cc57600080fd5b505afa1580156151e0573d6000803e3d6000fd5b505050506040513d60208110156151f657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b61525a3388888a73ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156152dc57600080fd5b505af11580156152f0573d6000803e3d6000fd5b505050506040513d606081101561530657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b61536b8273ffffffffffffffffffffffffffffffffffffffff1661571d565b6153dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061542c5780518252602082019150602081019050602083039250615409565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461548e576040519150601f19603f3d011682016040523d82523d6000602084013e615493565b606091505b50915091508161550b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156155915780806020019051602081101561552a57600080fd5b8101908080519060200190929190505050615590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806157b0602a913960400191505060405180910390fd5b5b50505050565b6000838311158290615644576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156156095780820151818401526020810190506155ee565b50505050905090810190601f1680156156365780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290615703576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156156c85780820151818401526020810190506156ad565b50505050905090810190601f1680156156f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161570f57fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561575f57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220c281387a18b9cadbfb4c7dc289d6c36d99e4e0cad4e5a565e630d1362bd1beda64736f6c63430006020033", "devdoc": { "methods": { "addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)": { @@ -768,6 +920,20 @@ "optionAddress": "The address of the option to deploy a Uniswap V2 Pair for with the quoteToken." } }, + "flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)": { + "details": "Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference.", + "params": { + "amountOutMin": "The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens.", + "deadline": "The timestamp for a trade to fail at if not successful.", + "flashLoanQuantity": "The quantity of options to mint.", + "optionToken": "The address of the Option contract.", + "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.", + "to": "The address to send the redeemToken proceeds and optionTokens to." + }, + "returns": { + "_0": "bool Whether the transaction was successful or not." + } + }, "getMaxDeadline()": { "details": "The maxmium deadline available for each trade." }, @@ -794,6 +960,20 @@ "_0": "bool Whether the transaction was successful or not." } }, + "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "details": "Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens.", + "params": { + "amountIn": "The quantity of options to mint.", + "amountOutMin": "The minimum quantity of tokens to receive in exchange for the redeemTokens.", + "deadline": "The timestamp for a trade to fail at if not successful.", + "optionToken": "The address of the Option contract.", + "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.", + "to": "The address to send the redeemToken proceeds and optionTokens to." + }, + "returns": { + "_0": "bool Whether the transaction was successful or not." + } + }, "owner()": { "details": "Returns the address of the current owner." }, @@ -857,9 +1037,15 @@ "addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)": { "notice": "Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address. underlyingToken -> optionToken -> UNI-V2." }, + "flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)": { + "notice": "If the first address in the path is not the redeemToken address, the tx will fail. underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens" + }, "mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { "notice": "If the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken." }, + "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "notice": "If the first address in the path is not the redeemToken address, the tx will fail. underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens" + }, "removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)": { "notice": "Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender. Then closes the optionTokens and withdraws underlyingTokens to the \"to\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address. UNI-V2 -> optionToken -> underlyingToken." }, @@ -890,39 +1076,39 @@ "type": "t_bool" }, { - "astId": 1877, + "astId": 2139, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "router", "offset": 0, "slot": "1", - "type": "t_contract(IUniswapV2Router02)1836" + "type": "t_contract(IUniswapV2Router02)2092" }, { - "astId": 1879, + "astId": 2141, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "factory", "offset": 0, "slot": "2", - "type": "t_contract(IUniswapV2Factory)1440" + "type": "t_contract(IUniswapV2Factory)1454" }, { - "astId": 1881, + "astId": 2143, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "trader", "offset": 0, "slot": "3", - "type": "t_contract(ITrader)5317" + "type": "t_contract(ITrader)5867" }, { - "astId": 1883, + "astId": 2145, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "registry", "offset": 0, "slot": "4", - "type": "t_contract(IRegistry)5245" + "type": "t_contract(IRegistry)5795" }, { - "astId": 1885, + "astId": 2147, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "quoteToken", "offset": 0, @@ -941,22 +1127,22 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IRegistry)5245": { + "t_contract(IRegistry)5795": { "encoding": "inplace", "label": "contract IRegistry", "numberOfBytes": "20" }, - "t_contract(ITrader)5317": { + "t_contract(ITrader)5867": { "encoding": "inplace", "label": "contract ITrader", "numberOfBytes": "20" }, - "t_contract(IUniswapV2Factory)1440": { + "t_contract(IUniswapV2Factory)1454": { "encoding": "inplace", "label": "contract IUniswapV2Factory", "numberOfBytes": "20" }, - "t_contract(IUniswapV2Router02)1836": { + "t_contract(IUniswapV2Router02)2092": { "encoding": "inplace", "label": "contract IUniswapV2Router02", "numberOfBytes": "20" @@ -965,34 +1151,39 @@ }, "gasEstimates": { "creation": { - "codeDepositCost": "3716400", + "codeDepositCost": "4508600", "executionCost": "infinite", "totalCost": "infinite" }, "external": { + "WETH()": "284", "addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)": "infinite", "deployUniswapMarket(address)": "infinite", - "factory()": "1119", - "getMaxDeadline()": "320", + "factory()": "1097", + "flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)": "infinite", + "getMaxDeadline()": "276", "getUniswapMarketForOption(address)": "infinite", "getUniswapMarketForSeries(address,address,uint256,uint256,uint256)": "infinite", - "initialize(address,address,address,address,address)": "111537", + "initialize(address,address,address,address,address)": "111582", "mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": "infinite", - "owner()": "1150", - "quoteToken()": "1143", - "registry()": "1076", + "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": "infinite", + "openFlashShort(uint256,uint256,address)": "infinite", + "owner()": "1151", + "quoteToken()": "1121", + "registry()": "1164", "removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)": "infinite", - "renounceOwnership()": "24430", + "renounceOwnership()": "24386", "rollOption(address,address,uint256,address)": "infinite", "rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)": "infinite", - "router()": "1185", - "setFactory(address)": "23595", - "setQuoteToken(address)": "23618", - "setRegistry(address)": "23683", - "setRouter(address)": "23594", - "setTrader(address)": "23661", - "trader()": "1099", - "transferOwnership(address)": "infinite" + "router()": "1163", + "setFactory(address)": "23618", + "setQuoteToken(address)": "23596", + "setRegistry(address)": "23639", + "setRouter(address)": "23639", + "setTrader(address)": "23617", + "trader()": "1144", + "transferOwnership(address)": "infinite", + "uniswapV2Call(address,uint256,uint256,bytes)": "infinite" }, "internal": { "_swapExactOptionsForTokens(address,uint256,uint256,address[] memory,address,uint256)": "infinite" diff --git a/deployments/localhost_31337/WETH9.json b/deployments/localhost_31337/WETH9.json index 7ba36dc4..1f2c7bc1 100644 --- a/deployments/localhost_31337/WETH9.json +++ b/deployments/localhost_31337/WETH9.json @@ -288,7 +288,7 @@ "transactionIndex": 0, "gasUsed": "822038", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcea285dfb183936059f5bd0a8b19e18986b7f1a5837403c521650d94bad9f650", + "blockHash": "0x71a98b95eb2567e832229e338bf393391ca6c462a662b8e3cdc22bbf644fc251", "transactionHash": "0x5683b95314e826648df4758029a91920413fda9c4b7c5d2db6fb69000f16d4a8", "logs": [], "blockNumber": 10, @@ -298,7 +298,7 @@ }, "address": "0xc4905364b78a742ccce7B890A89514061E47068D", "args": [], - "solcInputHash": "0x6790736ad89befcaa7be92ed1ac7f7481d75836c60f47e71202b55e2673ecb84", + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/test/tokens/WETH9.sol\":\"WETH9\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/test/tokens/WETH9.sol\":{\"keccak256\":\"0xe836e93e3411a8154743c003d1b6db6206715da771396b0c33a721d9460282c5\",\"urls\":[\"bzz-raw://74f9355ec14ee91917d4f9e810d23b059143fa3663da1ef65fed6e32b76e542e\",\"dweb:/ipfs/QmcWsXm2NXj7fhvYbghf1UBTr9dMTYqxmeLmDa5WaJ2S4r\"]}},\"version\":1}", "bytecode": "0x60806040526040518060400160405280600d81526020017f57726170706564204574686572000000000000000000000000000000000000008152506000908051906020019061004f9291906100ca565b506040518060400160405280600481526020017f57455448000000000000000000000000000000000000000000000000000000008152506001908051906020019061009b9291906100ca565b506012600260006101000a81548160ff021916908360ff1602179055503480156100c457600080fd5b5061016f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010b57805160ff1916838001178555610139565b82800160010185558215610139579182015b8281111561013857825182559160200191906001019061011d565b5b509050610146919061014a565b5090565b61016c91905b80821115610168576000816000905550600101610150565b5090565b90565b610cad8061017e6000396000f3fe60806040526004361061009c5760003560e01c8063313ce56711610064578063313ce5671461029d57806370a08231146102ce57806395d89b4114610333578063a9059cbb146103c3578063d0e30db014610436578063dd62ed3e146104405761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd146101a457806323b872dd146101cf5780632e1a7d4d14610262575b600080fd5b3480156100ad57600080fd5b506100b66104c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013d57600080fd5b5061018a6004803603604081101561015457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610563565b604051808215151515815260200191505060405180910390f35b3480156101b057600080fd5b506101b9610655565b6040518082815260200191505060405180910390f35b3480156101db57600080fd5b50610248600480360360608110156101f257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061065d565b604051808215151515815260200191505060405180910390f35b34801561026e57600080fd5b5061029b6004803603602081101561028557600080fd5b81019080803590602001909291905050506109a6565b005b3480156102a957600080fd5b506102b2610ad7565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102da57600080fd5b5061031d600480360360208110156102f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aea565b6040518082815260200191505060405180910390f35b34801561033f57600080fd5b50610348610b02565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561038857808201518184015260208101905061036d565b50505050905090810190601f1680156103b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103cf57600080fd5b5061041c600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba0565b604051808215151515815260200191505060405180910390f35b61043e610bb5565b005b34801561044c57600080fd5b506104af6004803603604081101561046357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c52565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055b5780601f106105305761010080835404028352916020019161055b565b820191906000526020600020905b81548152906001019060200180831161053e57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600047905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156106ab57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561078357507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b1561089c5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561081157600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109f257600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a85573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b985780601f10610b6d57610100808354040283529160200191610b98565b820191906000526020600020905b815481529060010190602001808311610b7b57829003601f168201915b505050505081565b6000610bad33848461065d565b905092915050565b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b600460205281600052604060002060205280600052604060002060009150915050548156fea2646970667358221220b1531d4fa8175ba03f5c001ae8e1a56591401c91b92bbc0e6c69d7dbd19ce87f64736f6c63430006020033", "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063313ce56711610064578063313ce5671461029d57806370a08231146102ce57806395d89b4114610333578063a9059cbb146103c3578063d0e30db014610436578063dd62ed3e146104405761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd146101a457806323b872dd146101cf5780632e1a7d4d14610262575b600080fd5b3480156100ad57600080fd5b506100b66104c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013d57600080fd5b5061018a6004803603604081101561015457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610563565b604051808215151515815260200191505060405180910390f35b3480156101b057600080fd5b506101b9610655565b6040518082815260200191505060405180910390f35b3480156101db57600080fd5b50610248600480360360608110156101f257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061065d565b604051808215151515815260200191505060405180910390f35b34801561026e57600080fd5b5061029b6004803603602081101561028557600080fd5b81019080803590602001909291905050506109a6565b005b3480156102a957600080fd5b506102b2610ad7565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102da57600080fd5b5061031d600480360360208110156102f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aea565b6040518082815260200191505060405180910390f35b34801561033f57600080fd5b50610348610b02565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561038857808201518184015260208101905061036d565b50505050905090810190601f1680156103b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103cf57600080fd5b5061041c600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba0565b604051808215151515815260200191505060405180910390f35b61043e610bb5565b005b34801561044c57600080fd5b506104af6004803603604081101561046357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c52565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055b5780601f106105305761010080835404028352916020019161055b565b820191906000526020600020905b81548152906001019060200180831161053e57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600047905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156106ab57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561078357507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b1561089c5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561081157600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109f257600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a85573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b985780601f10610b6d57610100808354040283529160200191610b98565b820191906000526020600020905b815481529060010190602001808311610b7b57829003601f168201915b505050505081565b6000610bad33848461065d565b905092915050565b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b600460205281600052604060002060205280600052604060002060009150915050548156fea2646970667358221220b1531d4fa8175ba03f5c001ae8e1a56591401c91b92bbc0e6c69d7dbd19ce87f64736f6c63430006020033", @@ -311,7 +311,7 @@ "storageLayout": { "storage": [ { - "astId": 8282, + "astId": 8875, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "name", "offset": 0, @@ -319,7 +319,7 @@ "type": "t_string_storage" }, { - "astId": 8285, + "astId": 8878, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "symbol", "offset": 0, @@ -327,7 +327,7 @@ "type": "t_string_storage" }, { - "astId": 8288, + "astId": 8881, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "decimals", "offset": 0, @@ -335,7 +335,7 @@ "type": "t_uint8" }, { - "astId": 8320, + "astId": 8913, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "balanceOf", "offset": 0, @@ -343,7 +343,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 8326, + "astId": 8919, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "allowance", "offset": 0, diff --git a/deployments/localhost_31337/WethConnector.json b/deployments/localhost_31337/WethConnector.json new file mode 100644 index 00000000..7e02286f --- /dev/null +++ b/deployments/localhost_31337/WethConnector.json @@ -0,0 +1,515 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_weth", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inOptions", + "type": "uint256" + } + ], + "name": "WethConnectorClose", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "outUnderlyings", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inStrikes", + "type": "uint256" + } + ], + "name": "WethConnectorExercise", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "outputOptions", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "outputRedeems", + "type": "uint256" + } + ], + "name": "WethConnectorMint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inRedeems", + "type": "uint256" + } + ], + "name": "WethConnectorRedeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inOptions", + "type": "uint256" + } + ], + "name": "WethConnectorUnwind", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "closeQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeCloseForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "exerciseQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeExerciseForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeExerciseWithETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeMintWithETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeRedeemForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "unwindQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeUnwindForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "weth", + "outputs": [ + { + "internalType": "contract IWETH", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "receipt": { + "to": null, + "from": "0xc783df8a850f42e7F7e57013759C285caa701eB6", + "contractAddress": "0x8B5B7a6055E54a36fF574bbE40cf2eA68d5554b3", + "transactionIndex": 0, + "gasUsed": "3122425", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x83ac85d1fc5a4c4b69a2c08fcabdc245b7b8644f67ed72129c362379c5a1ef84", + "transactionHash": "0xde9fd61e65f00e00f6a08dd9d7aedcfc0d672bfab6f4a41d5e66d67f50fdcc45", + "logs": [], + "blockNumber": 12, + "cumulativeGasUsed": "3122425", + "status": 1, + "byzantium": true + }, + "address": "0x8B5B7a6055E54a36fF574bbE40cf2eA68d5554b3", + "args": [ + "0xc4905364b78a742ccce7B890A89514061E47068D" + ], + "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"WethConnectorClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outUnderlyings\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inStrikes\",\"type\":\"uint256\"}],\"name\":\"WethConnectorExercise\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputOptions\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputRedeems\",\"type\":\"uint256\"}],\"name\":\"WethConnectorMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inRedeems\",\"type\":\"uint256\"}],\"name\":\"WethConnectorRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"WethConnectorUnwind\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"closeQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeCloseForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"exerciseQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExerciseForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExerciseWithETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeMintWithETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeRedeemForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"unwindQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeUnwindForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"details\":\"Since the WethConnector contract is responsible for converting between ethers and WETH, the contract is initialized with the address for WETH.\"},\"safeCloseForETH(address,uint256,address)\":{\"details\":\"Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\",\"params\":{\"closeQuantity\":\"Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address.\"}},\"safeExerciseForETH(address,uint256,address)\":{\"details\":\"Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\",\"params\":{\"exerciseQuantity\":\"Quantity of optionTokens to exercise.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address.\"}},\"safeExerciseWithETH(address,address)\":{\"details\":\"Swaps msg.value of strikeTokens (ethers) to underlyingTokens. Uses the strike ratio as the exchange rate. Strike ratio = base / quote. Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address.\"}},\"safeMintWithETH(address,address)\":{\"details\":\"Mints msg.value quantity of options and \\\"quote\\\" (option parameter) quantity of redeem tokens.\",\"params\":{\"optionToken\":\"The address of the option token to mint.\",\"receiver\":\"The address which receives the minted option and redeem tokens.\"}},\"safeRedeemForETH(address,uint256,address)\":{\"details\":\"Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The strikeTokens (ethers) are sent to the receiver address.\",\"redeemQuantity\":\"The quantity of redeemTokens to burn.\"}},\"safeUnwindForETH(address,uint256,address)\":{\"details\":\"Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. This function is for options with WETH as the underlying asset. The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address.\",\"unwindQuantity\":\"Quantity of underlyingTokens (ethers) to withdraw.\"}}}},\"userdoc\":{\"methods\":{\"safeCloseForETH(address,uint256,address)\":{\"notice\":\"This function is for options with WETH as the underlying asset. WETH underlyingTokens are converted to ethers before being sent to receiver. The redeemTokens to burn is equal to the optionTokens * strike ratio. inputOptions = inputRedeems / strike ratio = outUnderlyings\"},\"safeExerciseForETH(address,uint256,address)\":{\"notice\":\"This function is for options with WETH as the underlying asset. Burns option tokens, pulls strikeTokens, and pushes out ethers.\"},\"safeExerciseWithETH(address,address)\":{\"notice\":\"This function is for options with WETH as the strike asset. Burns option tokens, accepts ethers, and pushes out underlyingTokens.\"},\"safeMintWithETH(address,address)\":{\"notice\":\"This function is for options that have WETH as the underlying asset.\"},\"safeRedeemForETH(address,uint256,address)\":{\"notice\":\"This function is for options that have WETH as the strike asset. Converts WETH to ethers, and withdraws ethers to the receiver address.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/WETH/WethConnector.sol\":\"WethConnector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/connectors/WETH/IWETH.sol\":{\"keccak256\":\"0x63dce39ab69c513fb54459362900e4084a2ad2d164be2d46061afec61b956bfc\",\"urls\":[\"bzz-raw://43a214fb8eb4b26327dea29262c4e29e0f7269aec39ccb7e18bea20cfe7734da\",\"dweb:/ipfs/QmduwCTCBH4nQbXSBpJDhbLuATXLyS44yehfSvy6FTYyby\"]},\"contracts/connectors/WETH/IWethConnector.sol\":{\"keccak256\":\"0x59b34612bacc0cbaf89c320bd3bd3fd7111c4c173a3001a2d16ce194639dead2\",\"urls\":[\"bzz-raw://454a27a471fb727b18fdb5485baa8909ac6b7ed2f761241661f14a782779e79e\",\"dweb:/ipfs/QmRtmmum24bxuCSEs7dEtjUipEyiwpF59aiQX1hZRzdZm7\"]},\"contracts/connectors/WETH/WethConnector.sol\":{\"keccak256\":\"0x4a1d2b6c5a756a1b91725047ba54e96b1c89c1a146a84ba6f3a43840f0e084c9\",\"urls\":[\"bzz-raw://2f84bb6a6be9d61c6a4cb6c787ac39514c01b6b98e5fe058393e20a2c72fe6bf\",\"dweb:/ipfs/QmZa6BTNWTkM9jbTvt8ggsDdzqvNABFo6ZkESgifgSn7GF\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516138073803806138078339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613758806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061258d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612955565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a6130a2565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000349050600061221c8873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214057600080fd5b505afa158015612154573d6000803e3d6000fd5b505050506040513d602081101561216a57600080fd5b810190808051906020019092919050505061220e8a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c457600080fd5b505afa1580156121d8573d6000803e3d6000fd5b505050506040513d60208110156121ee57600080fd5b810190808051906020019092919050505085612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561229c57600080fd5b505afa1580156122b0573d6000803e3d6000fd5b505050506040513d60208110156122c657600080fd5b8101908080519060200190929190505050101561234b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b61235488613210565b6123813389838b73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f1916602001820160405280156123d35781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561245b578082015181840152602081019050612440565b50505050905090810190601f1680156124885780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b505050506040513d60408110156124d257600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555034600081116126a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d602081101561271457600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6127f386613210565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561287457600080fd5b505af1158015612888573d6000803e3d6000fd5b505050506040513d604081101561289e57600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff166129d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612a69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612ab157600080fd5b505afa158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bf957600080fd5b505afa158015612c0d573d6000803e3d6000fd5b505050506040513d6020811015612c2357600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612cb457600080fd5b505afa158015612cc8573d6000803e3d6000fd5b505050506040513d6020811015612cde57600080fd5b81019080805190602001909291905050501015612d63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612d903388888473ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e1157600080fd5b505af1158015612e25573d6000803e3d6000fd5b505050506040513d6020811015612e3b57600080fd5b81019080805190602001909291905050509050612e5886886130a2565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612ef85760009050612f65565b6000828402905082848281612f0957fe5b0414612f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136d86021913960400191505060405180910390fd5b809150505b92915050565b6000612fad83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061337b565b905092915050565b61309c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613441565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561311757600080fd5b505af115801561312b573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461318f576040519150601f19603f3d011682016040523d82523d6000602084013e613194565b606091505b505090508061320b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327a57600080fd5b505af115801561328e573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561333c57600080fd5b505af1158015613350573d6000803e3d6000fd5b505050506040513d602081101561336657600080fd5b81019080805190602001909291905050505050565b60008083118290613427576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156133ec5780820151818401526020810190506133d1565b50505050905090810190601f1680156134195780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161343357fe5b049050809150509392505050565b6134608273ffffffffffffffffffffffffffffffffffffffff1661368c565b6134d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061352157805182526020820191506020810190506020830392506134fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613583576040519150601f19603f3d011682016040523d82523d6000602084013e613588565b606091505b509150915081613600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156136865780806020019051602081101561361f57600080fd5b8101908080519060200190929190505050613685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806136f9602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156136ce57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208f18a6eb2c0fe7d22b220449e16d113334c7e5a71c03a53b229bdab03bf0416564736f6c63430006020033", + "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061258d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612955565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a6130a2565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000349050600061221c8873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214057600080fd5b505afa158015612154573d6000803e3d6000fd5b505050506040513d602081101561216a57600080fd5b810190808051906020019092919050505061220e8a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c457600080fd5b505afa1580156121d8573d6000803e3d6000fd5b505050506040513d60208110156121ee57600080fd5b810190808051906020019092919050505085612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561229c57600080fd5b505afa1580156122b0573d6000803e3d6000fd5b505050506040513d60208110156122c657600080fd5b8101908080519060200190929190505050101561234b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b61235488613210565b6123813389838b73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f1916602001820160405280156123d35781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561245b578082015181840152602081019050612440565b50505050905090810190601f1680156124885780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b505050506040513d60408110156124d257600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555034600081116126a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d602081101561271457600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6127f386613210565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561287457600080fd5b505af1158015612888573d6000803e3d6000fd5b505050506040513d604081101561289e57600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff166129d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612a69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612ab157600080fd5b505afa158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bf957600080fd5b505afa158015612c0d573d6000803e3d6000fd5b505050506040513d6020811015612c2357600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612cb457600080fd5b505afa158015612cc8573d6000803e3d6000fd5b505050506040513d6020811015612cde57600080fd5b81019080805190602001909291905050501015612d63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612d903388888473ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e1157600080fd5b505af1158015612e25573d6000803e3d6000fd5b505050506040513d6020811015612e3b57600080fd5b81019080805190602001909291905050509050612e5886886130a2565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612ef85760009050612f65565b6000828402905082848281612f0957fe5b0414612f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136d86021913960400191505060405180910390fd5b809150505b92915050565b6000612fad83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061337b565b905092915050565b61309c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613441565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561311757600080fd5b505af115801561312b573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461318f576040519150601f19603f3d011682016040523d82523d6000602084013e613194565b606091505b505090508061320b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327a57600080fd5b505af115801561328e573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561333c57600080fd5b505af1158015613350573d6000803e3d6000fd5b505050506040513d602081101561336657600080fd5b81019080805190602001909291905050505050565b60008083118290613427576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156133ec5780820151818401526020810190506133d1565b50505050905090810190601f1680156134195780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161343357fe5b049050809150509392505050565b6134608273ffffffffffffffffffffffffffffffffffffffff1661368c565b6134d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061352157805182526020820191506020810190506020830392506134fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613583576040519150601f19603f3d011682016040523d82523d6000602084013e613588565b606091505b509150915081613600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156136865780806020019051602081101561361f57600080fd5b8101908080519060200190929190505050613685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806136f9602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156136ce57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208f18a6eb2c0fe7d22b220449e16d113334c7e5a71c03a53b229bdab03bf0416564736f6c63430006020033", + "devdoc": { + "methods": { + "constructor": { + "details": "Since the WethConnector contract is responsible for converting between ethers and WETH, the contract is initialized with the address for WETH." + }, + "safeCloseForETH(address,uint256,address)": { + "details": "Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).", + "params": { + "closeQuantity": "Quantity of optionTokens to burn and an input to calculate how many redeems to burn.", + "optionToken": "The address of the option contract.", + "receiver": "The underlyingTokens (ethers) are sent to the receiver address." + } + }, + "safeExerciseForETH(address,uint256,address)": { + "details": "Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. Uses the strike ratio as the exchange rate. Strike ratio = base / quote.", + "params": { + "exerciseQuantity": "Quantity of optionTokens to exercise.", + "optionToken": "The address of the option contract.", + "receiver": "The underlyingTokens (ethers) are sent to the receiver address." + } + }, + "safeExerciseWithETH(address,address)": { + "details": "Swaps msg.value of strikeTokens (ethers) to underlyingTokens. Uses the strike ratio as the exchange rate. Strike ratio = base / quote. Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.", + "params": { + "optionToken": "The address of the option contract.", + "receiver": "The underlyingTokens are sent to the receiver address." + } + }, + "safeMintWithETH(address,address)": { + "details": "Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.", + "params": { + "optionToken": "The address of the option token to mint.", + "receiver": "The address which receives the minted option and redeem tokens." + } + }, + "safeRedeemForETH(address,uint256,address)": { + "details": "Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.", + "params": { + "optionToken": "The address of the option contract.", + "receiver": "The strikeTokens (ethers) are sent to the receiver address.", + "redeemQuantity": "The quantity of redeemTokens to burn." + } + }, + "safeUnwindForETH(address,uint256,address)": { + "details": "Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. This function is for options with WETH as the underlying asset. The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.", + "params": { + "optionToken": "The address of the option contract.", + "receiver": "The underlyingTokens (ethers) are sent to the receiver address.", + "unwindQuantity": "Quantity of underlyingTokens (ethers) to withdraw." + } + } + } + }, + "userdoc": { + "methods": { + "safeCloseForETH(address,uint256,address)": { + "notice": "This function is for options with WETH as the underlying asset. WETH underlyingTokens are converted to ethers before being sent to receiver. The redeemTokens to burn is equal to the optionTokens * strike ratio. inputOptions = inputRedeems / strike ratio = outUnderlyings" + }, + "safeExerciseForETH(address,uint256,address)": { + "notice": "This function is for options with WETH as the underlying asset. Burns option tokens, pulls strikeTokens, and pushes out ethers." + }, + "safeExerciseWithETH(address,address)": { + "notice": "This function is for options with WETH as the strike asset. Burns option tokens, accepts ethers, and pushes out underlyingTokens." + }, + "safeMintWithETH(address,address)": { + "notice": "This function is for options that have WETH as the underlying asset." + }, + "safeRedeemForETH(address,uint256,address)": { + "notice": "This function is for options that have WETH as the strike asset. Converts WETH to ethers, and withdraws ethers to the receiver address." + } + } + }, + "storageLayout": { + "storage": [ + { + "astId": 1351, + "contract": "contracts/connectors/WETH/WethConnector.sol:WethConnector", + "label": "_notEntered", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 3488, + "contract": "contracts/connectors/WETH/WethConnector.sol:WethConnector", + "label": "weth", + "offset": 1, + "slot": "0", + "type": "t_contract(IWETH)3377" + } + ], + "types": { + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IWETH)3377": { + "encoding": "inplace", + "label": "contract IWETH", + "numberOfBytes": "20" + } + } + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "2833600", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "safeCloseForETH(address,uint256,address)": "infinite", + "safeExerciseForETH(address,uint256,address)": "infinite", + "safeExerciseWithETH(address,address)": "infinite", + "safeMintWithETH(address,address)": "infinite", + "safeRedeemForETH(address,uint256,address)": "infinite", + "safeUnwindForETH(address,uint256,address)": "infinite", + "weth()": "1104" + }, + "internal": { + "_depositEthSendWeth(address)": "infinite", + "_withdrawEthAndSend(address,uint256)": "infinite" + } + } +} \ No newline at end of file diff --git a/deployments/localhost_31337/solcInputs/0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4.json b/deployments/localhost_31337/solcInputs/0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4.json new file mode 100644 index 00000000..7f69d968 --- /dev/null +++ b/deployments/localhost_31337/solcInputs/0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4.json @@ -0,0 +1,168 @@ +{ + "language": "Solidity", + "sources": { + "contracts/connectors/Uniswap/IUniswapConnector.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\ninterface IUniswapConnector {}\r\n" + }, + "contracts/connectors/Uniswap/UniswapConnector.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\n/**\r\n * @title Combines Uniswap V2 Protocol functions with Primitive V1.\r\n * @author Primitive\r\n */\r\n\r\n// Uniswap\r\nimport {\r\n IUniswapV2Callee\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\";\r\nimport {\r\n IUniswapV2Router02\r\n} from \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\r\nimport {\r\n IUniswapV2Factory\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\r\nimport {\r\n IUniswapV2Pair\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\";\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../../option/interfaces/IRegistry.sol\";\r\nimport { ITrader } from \"../../option/interfaces/ITrader.sol\";\r\nimport { TraderLib } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector } from \"../WETH/IWethConnector.sol\";\r\n// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n IUniswapV2Router02 public router;\r\n IUniswapV2Factory public factory;\r\n ITrader public trader;\r\n IRegistry public registry;\r\n\r\n address public quoteToken; // Designated stablecoin for Primitive.\r\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\r\n\r\n event Initialized(address indexed from, address indexed quoteToken);\r\n event UpdatedRouter(address indexed from, address indexed newRouter);\r\n event UpdatedFactory(address indexed from, address indexed newFactory);\r\n event UpdatedTrader(address indexed from, address indexed newTrader);\r\n event UpdatedRegistry(address indexed from, address indexed newRegistry);\r\n event UpdatedQuoteToken(address indexed from, address indexed newQuote);\r\n\r\n event RolledOptions(\r\n address indexed from,\r\n address indexed optionFrom,\r\n address indexed optionTo,\r\n uint256 quantity\r\n );\r\n event RolledOptionLiquidity(\r\n address indexed from,\r\n address indexed optionMarketFrom,\r\n address indexed optionMarketTo,\r\n uint256 liquidity\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n // ==== Setup Functions ====\r\n\r\n function initialize(\r\n address router_,\r\n address factory_,\r\n address trader_,\r\n address registry_,\r\n address quoteToken_\r\n ) external onlyOwner {\r\n require(address(router) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(factory) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(trader) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(registry) == address(0x0), \"ERR_INITIALIZED\");\r\n require(quoteToken == address(0x0), \"ERR_INITIALIZED\");\r\n router = IUniswapV2Router02(router_);\r\n factory = IUniswapV2Factory(factory_);\r\n trader = ITrader(trader_);\r\n registry = IRegistry(registry_);\r\n quoteToken = quoteToken_;\r\n emit Initialized(msg.sender, quoteToken_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Uniswap V2 Router address to use.\r\n */\r\n function setRouter(address router_) external onlyOwner {\r\n router = IUniswapV2Router02(router_);\r\n emit UpdatedRouter(msg.sender, router_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Uniswap V2 Factory address to use.\r\n */\r\n function setFactory(address factory_) external onlyOwner {\r\n factory = IUniswapV2Factory(factory_);\r\n emit UpdatedFactory(msg.sender, factory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Primitive V1 Trader address to use.\r\n */\r\n function setTrader(address trader_) external onlyOwner {\r\n trader = ITrader(trader_);\r\n emit UpdatedTrader(msg.sender, trader_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Primitive V1 Registry address to use.\r\n */\r\n function setRegistry(address registry_) external onlyOwner {\r\n registry = IRegistry(registry_);\r\n emit UpdatedRegistry(msg.sender, registry_);\r\n }\r\n\r\n /**\r\n * @dev Sets the designated stablecoin to use (paired token in Uniswap pools).\r\n */\r\n function setQuoteToken(address quoteToken_) external onlyOwner {\r\n quoteToken = quoteToken_;\r\n emit UpdatedQuoteToken(msg.sender, quoteToken_);\r\n }\r\n\r\n // ==== Trading Functions ====\r\n\r\n /**\r\n * @dev Mints options using underlyingTokens provided by user, then swaps on Uniswap V2.\r\n * Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.\r\n * @notice If the first address in the path is not the optionToken address, the tx will fail.\r\n * underlyingToken -> optionToken -> quoteToken.\r\n * @param optionToken The address of the Oracle-less Primitive option.\r\n * @param amountIn The quantity of options to mint and then sell.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n * @param to The address to send the optionToken proceeds and redeem tokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function mintOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints option and redeem tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the optionToken address.\r\n (, bool success) = _swapExactOptionsForTokens(\r\n address(optionToken),\r\n outputOptions,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send redeemTokens (short options) to the \"to\" address.\r\n IERC20(optionToken.redeemToken()).safeTransfer(to, outputRedeems);\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens.\r\n * @notice If the first address in the path is not the redeemToken address, the tx will fail.\r\n * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\r\n * @param optionToken The address of the Option contract.\r\n * @param amountIn The quantity of options to mint.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the redeemTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\r\n * @param to The address to send the redeemToken proceeds and optionTokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function mintShortOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) public returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints option and redeem tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the optionToken address.\r\n address redeemToken = optionToken.redeemToken();\r\n (, bool success) = _swapExactOptionsForTokens(\r\n redeemToken,\r\n outputRedeems, // shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send optionTokens (long options) to the \"to\" address.\r\n IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference.\r\n * @notice If the first address in the path is not the redeemToken address, the tx will fail.\r\n * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\r\n * @param optionToken The address of the Option contract.\r\n * @param flashLoanQuantity The quantity of options to mint.\r\n * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\r\n * @param to The address to send the redeemToken proceeds and optionTokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function flashloanMintShortOptionsThenSwap(\r\n IOption optionToken,\r\n uint256 flashLoanQuantity,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) public returns (bool) {\r\n require(flashLoanQuantity > 0, \"ERR_ZERO\");\r\n // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens.\r\n\r\n // Mints option and redeem tokens to this contract.\r\n address underlyingToken = optionToken.getUnderlyingTokenAddress();\r\n\r\n // Mint optionTokens using the underlyingTokens received from UniswapV2 flashloan.\r\n // Sends underlyingTokens from this contract and to the optionToken contract, then calls mintOptions.\r\n // This contract receives the newly minted option and redeem tokens.\r\n IERC20(underlyingToken).safeTransfer(\r\n address(optionToken),\r\n flashLoanQuantity\r\n );\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(address(this));\r\n\r\n // Need to pay back the UniswapV2 flash loan by selling the redeemToken, then paying the remainder.\r\n\r\n // Swaps redeemTokens to the token specified at the end of the path, then sends to UniswapV2Pair.\r\n // Reverts if the first address in the path is not the redeemToken address.\r\n // Reverts if the last address in the path is not the underlyingToken address.\r\n // path[0] = redeemToken, path[1] = dai, path[2] = underlyingToken\r\n {\r\n require(path[2] == underlyingToken, \"ERR_END_PATH_NOT_UNDERLYING\");\r\n (\r\n uint256[] memory amounts,\r\n bool success\r\n ) = _swapExactOptionsForTokens(\r\n optionToken.redeemToken(),\r\n outputRedeems, // shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n msg.sender,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // The remainder is the flash loan amount - amount from selling redeemTokens.\r\n uint256 remainder = flashLoanQuantity > amounts[1]\r\n ? flashLoanQuantity.sub(amounts[1])\r\n : 0;\r\n\r\n // Pull underlyingTokens from the original spender to pay the remainder of the flash loan.\r\n IERC20(underlyingToken).safeTransferFrom(to, msg.sender, remainder);\r\n\r\n // Send optionTokens (long options) to the \"spender\" address.\r\n IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens\r\n }\r\n return true;\r\n }\r\n\r\n function openFlashShort(\r\n uint256 amountOptions,\r\n uint256 amountOutMin,\r\n IOption optionToken\r\n ) public {\r\n address redeemToken = optionToken.redeemToken();\r\n address underlyingToken = optionToken.getUnderlyingTokenAddress();\r\n address pairAddress = factory.getPair(quoteToken, underlyingToken);\r\n address[] memory path = new address[](3);\r\n path[0] = redeemToken;\r\n path[1] = quoteToken;\r\n path[2] = underlyingToken;\r\n IUniswapV2Pair pair = IUniswapV2Pair(pairAddress);\r\n\r\n /* bytes4 selector = bytes4(\r\n keccak256(\r\n bytes(\r\n \"flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)\"\r\n )\r\n )\r\n );\r\n bytes memory params = abi.encodeWithSelector(\r\n selector, // function to call in this contract\r\n optionToken, // option token to mint with flash loaned tokens\r\n amountOptions, // quantity of tokens from flash loan\r\n amountOutMin, // total price paid for selling redeemTokens from the minted optionTokens\r\n path, // redeemToken -> stablecoin -> underlyingToken\r\n msg.sender, // address to pull the remainder loan amount to pay, and send optionTokens to.\r\n now + 15 minutes // deadline of this function call\r\n );\r\n\r\n // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address.\r\n // Then executes `flashLoanMintShortOptionsThenSwap`.\r\n uint256 amount0Out = pair.token0() == underlyingToken\r\n ? amountOptions\r\n : 0;\r\n uint256 amount1Out = pair.token0() == underlyingToken\r\n ? 0\r\n : amountOptions; */\r\n //pair.swap(amount0Out, amount1Out, address(this), params); // redeemToken <> stablecoin pair swap\r\n }\r\n\r\n // gets tokens/WETH via a V2 flash swap, mints options, swaps short tokens for tokens, pulls in difference, repays!\r\n function uniswapV2Call(\r\n address sender,\r\n uint256 amount0,\r\n uint256 amount1,\r\n bytes calldata data\r\n ) external override {\r\n (bool success, bytes memory returnData) = address(this).call(data);\r\n require(success, \"ERR_SECURE_LOAN_CALL_FAIL\");\r\n }\r\n\r\n /**\r\n * @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n * @notice Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender.\r\n * Then closes the optionTokens and withdraws underlyingTokens to the \"to\" address.\r\n * Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n * UNI-V2 -> optionToken -> underlyingToken.\r\n * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity.\r\n * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function removeLiquidityThenCloseOptions(\r\n address optionAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) public nonReentrant returns (uint256, uint256) {\r\n // Store in memory for gas savings.\r\n address quoteToken_ = quoteToken;\r\n IOption optionToken = IOption(optionAddress);\r\n //IUniswapV2Router02 router_ = router;\r\n\r\n {\r\n // Gets the Uniswap V2 Pair address for optionAddress and quoteToken.\r\n // Transfers the LP tokens for the pair to this contract.\r\n // Warning: external call to a non-trusted address `msg.sender`.\r\n address pair = getUniswapMarketForOption(optionAddress);\r\n IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);\r\n IERC20(pair).approve(address(router), uint256(-1));\r\n }\r\n\r\n // Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens).\r\n (uint256 amountOptions, uint256 amountQuote) = router.removeLiquidity(\r\n optionAddress,\r\n quoteToken_,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n address(this),\r\n deadline\r\n );\r\n\r\n // Approves trader to pull option and redeem tokens from this contract to close options.\r\n ITrader trader_ = trader;\r\n {\r\n //address redeemToken = optionToken.redeemToken();\r\n IERC20(optionAddress).approve(address(trader_), uint256(-1));\r\n IERC20(optionToken.redeemToken()).approve(\r\n address(trader_),\r\n uint256(-1)\r\n );\r\n\r\n // Calculate equivalent quantity of redeem (short option) tokens to close the option position.\r\n // Need to cancel base units and have quote units remaining.\r\n uint256 requiredRedeems = amountOptions\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Pull the required redeemTokens from msg.sender to this contract.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n requiredRedeems\r\n );\r\n }\r\n\r\n // Pushes option and redeem tokens to the option contract and calls \"closeOption\".\r\n // Receives underlyingTokens and sends them to the \"to\" address.\r\n trader_.safeClose(optionToken, amountOptions, to);\r\n\r\n // Send the quoteTokens received from burning liquidity shares to the \"to\" address.\r\n IERC20(quoteToken_).safeTransfer(to, amountQuote);\r\n\r\n return (amountOptions, amountQuote);\r\n }\r\n\r\n /**\r\n * @dev Combines \"removeLiquidityThenCloseOptions\" function with \"addLiquidityWithUnderlying\" fuction.\r\n * @notice Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair.\r\n * UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2.\r\n * @param rollFromOption The optionToken address to close a UNI-V2 position.\r\n * @param rollToOption The optionToken address to open a UNI-V2 position.\r\n * @param liquidity The quantity of UNI-V2 shares to roll from the first Uniswap pool.\r\n * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity.\r\n * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n * @param to The address that receives the UNI-V2 shares that have been rolled.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function rollOptionLiquidity(\r\n address rollFromOption,\r\n address rollToOption,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool) {\r\n (\r\n uint256 outUnderlyings,\r\n uint256 outQuote\r\n ) = removeLiquidityThenCloseOptions(\r\n rollFromOption,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n bool success = addLiquidityWithUnderlying(\r\n rollToOption,\r\n outUnderlyings,\r\n outQuote,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n require(success, \"ERR_ADD_LIQUIDITY_FAIL\");\r\n\r\n emit RolledOptionLiquidity(\r\n msg.sender,\r\n rollFromOption,\r\n rollToOption,\r\n liquidity\r\n );\r\n\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Closes an option position and opens a new one using the freed underlyingTokens.\r\n * @notice Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver.\r\n * rollFromOption -> underlyingToken -> rollToOption.\r\n * @param rollFromOption The optionToken to close.\r\n * @param rollToOption The optionToken to mint.\r\n * @param rollQuantity The quantity of underlyingTokens to receive from closed options then use to mint new options.\r\n * @param receiver The address that receives newly minted option and redeem tokens.\r\n */\r\n function rollOption(\r\n address rollFromOption,\r\n address rollToOption,\r\n uint256 rollQuantity,\r\n address receiver\r\n ) external returns (bool) {\r\n // Close the rollFromOption to receive underlyingTokens.\r\n // Sends the underlyingTokens to this contract.\r\n (, , uint256 outUnderlyings) = TraderLib.safeClose(\r\n IOption(rollFromOption),\r\n rollQuantity,\r\n address(this)\r\n );\r\n\r\n // Store in memory for gas savings.\r\n ITrader trader_ = trader;\r\n\r\n // Approve underlyingTokens to be sent to the Primitive Trader contract.\r\n IERC20(IOption(rollFromOption).getUnderlyingTokenAddress()).approve(\r\n address(trader_),\r\n uint256(-1)\r\n );\r\n\r\n // Mint rollToOptions using the underlyingTokens received from closing the rollFromOptions.\r\n // Pulls underlyingTokens from this contract and sends them to the rollToOption contract.\r\n // Sends minted option and redeem tokens to the \"receiver\" address.\r\n (uint256 outputOptions, ) = trader_.safeMint(\r\n IOption(rollToOption),\r\n outUnderlyings,\r\n receiver\r\n );\r\n\r\n // An event is emitted because a position was atomically rolled without additional capital.\r\n emit RolledOptions(\r\n msg.sender,\r\n rollFromOption,\r\n rollToOption,\r\n outputOptions\r\n );\r\n return true;\r\n }\r\n\r\n // ==== Liquidity Functions ====\r\n\r\n /**\r\n * @dev Adds liquidity to an option<>quote token pair by minting optionTokens with underlyingTokens.\r\n * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n * underlyingToken -> optionToken -> UNI-V2.\r\n * @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n * @param quantityOptions The quantity of underlyingTokens to use to mint optionTokens.\r\n * @param quantityQuoteTokens The quantity of quoteTokens to add with optionTokens to the Uniswap V2 Pair.\r\n * @param minQuantityOptions The minimum quantity of optionTokens expected to provide liquidity with.\r\n * @param minQuantityQuoteTokens The minimum quantity of quoteTokens expected to provide liquidity with.\r\n * @param to The address that receives UNI-V2 shares.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function addLiquidityWithUnderlying(\r\n address optionAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityQuoteTokens,\r\n uint256 minQuantityOptions,\r\n uint256 minQuantityQuoteTokens,\r\n address to,\r\n uint256 deadline\r\n ) public nonReentrant returns (bool) {\r\n // Store in memory for gas savings.\r\n IUniswapV2Router02 router_ = router;\r\n address quoteToken_ = quoteToken;\r\n\r\n // Pull quote tokens from msg.sender to add to Uniswap V2 Pair.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(quoteToken_).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityQuoteTokens\r\n );\r\n\r\n // Pulls underlyingTokens from msg.sender to this contract.\r\n // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n IOption(optionAddress),\r\n quantityOptions,\r\n address(this)\r\n );\r\n\r\n // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(optionAddress).approve(address(router_), uint256(-1));\r\n IERC20(quoteToken_).approve(address(router_), uint256(-1));\r\n\r\n // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router_.addLiquidity(\r\n optionAddress,\r\n quoteToken,\r\n outputOptions,\r\n quantityQuoteTokens,\r\n minQuantityOptions,\r\n minQuantityQuoteTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n // Send redeemTokens (short option tokens) from minting option operation to msg.sender.\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n msg.sender,\r\n outputRedeems\r\n );\r\n\r\n return true;\r\n }\r\n\r\n // ==== Internal Functions ====\r\n\r\n /**\r\n * @dev Calls the \"swapExactTokensForTokens\" function on the Uniswap V2 Router 02 Contract.\r\n * @notice Fails early if the address in the beginning of the path is not the optionToken address.\r\n * @param optionAddress The address of the optionToken to swap from.\r\n * @param amountIn The quantity of optionTokens to swap with.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens swapped.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n * @param to The address to send the optionToken proceeds and redeem tokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n */\r\n function _swapExactOptionsForTokens(\r\n address optionAddress,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256[] memory amounts, bool success) {\r\n // Fails early if the token being swapped from is not the optionToken.\r\n require(path[0] == optionAddress, \"ERR_PATH_OPTION_START\");\r\n\r\n // Store router in memory for gas savings.\r\n IUniswapV2Router02 router_ = router;\r\n\r\n // Approve the uniswap router to be able to transfer options from this contract.\r\n IERC20(optionAddress).approve(address(router_), uint256(-1));\r\n\r\n // Call the Uniswap V2 function to swap optionTokens to quoteTokens.\r\n (amounts) = router_.swapExactTokensForTokens(\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n success = true;\r\n }\r\n\r\n // ==== Management Functions ====\r\n\r\n /**\r\n * @dev Creats a Uniswap pair for option<>quote tokens.\r\n * @param optionAddress The address of the option to deploy a Uniswap V2 Pair for with the quoteToken.\r\n */\r\n function deployUniswapMarket(address optionAddress)\r\n external\r\n returns (address)\r\n {\r\n address uniswapPair = factory.createPair(optionAddress, quoteToken);\r\n return uniswapPair;\r\n }\r\n\r\n // ==== View ====\r\n\r\n /**\r\n * @dev The maxmium deadline available for each trade.\r\n */\r\n function getMaxDeadline() public view returns (uint256) {\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 deadline = now + 15 minutes;\r\n return deadline;\r\n }\r\n\r\n /**\r\n * @dev Gets a Uniswap Pair address for an option token and quote token.\r\n * @param optionAddress The address of the option to get a Uniswap V2 Pair address for (with quoteToken).\r\n */\r\n function getUniswapMarketForOption(address optionAddress)\r\n public\r\n view\r\n returns (address)\r\n {\r\n address uniswapPair = factory.getPair(optionAddress, quoteToken);\r\n require(uniswapPair != address(0x0), \"ERR_PAIR_DOES_NOT_EXIST\");\r\n return uniswapPair;\r\n }\r\n\r\n /**\r\n * @dev Gets a Uniswap Pair address for the corresponding option parameters.\r\n */\r\n function getUniswapMarketForSeries(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public view returns (address) {\r\n address optionAddress = registry.getOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n require(optionAddress != address(0x0), \"ERR_OPTION_DOES_NOT_EXIST\");\r\n return getUniswapMarketForOption(optionAddress);\r\n }\r\n}\r\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Callee {\n function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": { + "content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": { + "content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/option/interfaces/IOption.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IOption is IERC20 {\r\n function mintOptions(address receiver) external returns (uint256, uint256);\r\n\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external returns (uint256, uint256);\r\n\r\n function redeemStrikeTokens(address receiver) external returns (uint256);\r\n\r\n function closeOptions(address receiver)\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function redeemToken() external view returns (address);\r\n\r\n function getStrikeTokenAddress() external view returns (address);\r\n\r\n function getUnderlyingTokenAddress() external view returns (address);\r\n\r\n function getBaseValue() external view returns (uint256);\r\n\r\n function getQuoteValue() external view returns (uint256);\r\n\r\n function getExpiryTime() external view returns (uint256);\r\n\r\n function underlyingCache() external view returns (uint256);\r\n\r\n function strikeCache() external view returns (uint256);\r\n\r\n function factory() external view returns (address);\r\n\r\n function getCacheBalances() external view returns (uint256, uint256);\r\n\r\n function getAssetAddresses()\r\n external\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n );\r\n\r\n function getParameters()\r\n external\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n );\r\n\r\n function initRedeemToken(address _redeemToken) external;\r\n\r\n function updateCacheBalances() external;\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../../GSN/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20MinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/GSN/Context.sol": { + "content": "pragma solidity ^0.6.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "pragma solidity ^0.6.2;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/option/interfaces/IRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRegistry {\r\n function pauseDeployments() external;\r\n\r\n function unpauseDeployments() external;\r\n\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function setOptionFactory(address optionFactory_) external;\r\n\r\n function setRedeemFactory(address redeemFactory_) external;\r\n\r\n function optionFactory() external returns (address);\r\n\r\n function redeemFactory() external returns (address);\r\n\r\n function verifyToken(address tokenAddress) external;\r\n\r\n function verifyExpiry(uint256 expiry) external;\r\n\r\n function unverifyToken(address tokenAddress) external;\r\n\r\n function unverifyExpiry(uint256 expiry) external;\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n view\r\n returns (bool);\r\n}\r\n" + }, + "contracts/option/interfaces/ITrader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IOption } from \"./IOption.sol\";\r\n\r\ninterface ITrader {\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "contracts/option/libraries/TraderLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Trader Library\r\n * @notice Internal functions that can be used to safeTransfer\r\n * tokens into the option contract then call respective option contract functions.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary TraderLib {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n /**\r\n * @dev Conducts important safety checks to safely mint option tokens.\r\n * @param optionToken The address of the option token to mint.\r\n * @param mintQuantity The quantity of option tokens to mint.\r\n * @param receiver The address which receives the minted option tokens.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(mintQuantity > 0, \"ERR_ZERO\");\r\n IERC20(optionToken.getUnderlyingTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n mintQuantity\r\n );\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(exerciseQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.getStrikeTokenAddress()).balanceOf(msg.sender) >=\r\n inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n IERC20(optionToken.getStrikeTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inputRedeems = outputStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) internal returns (uint256) {\r\n require(redeemQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n // There can be the case there is no available strikes to redeem, causing a revert.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(receiver);\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n require(closeQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned. (What we mean by Implicit).\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens are sent to the receiver address and the redeemTokens are burned.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Checks\r\n require(unwindQuantity > 0, \"ERR_ZERO\");\r\n // solhint-disable-next-line not-rely-on-time\r\n require(\r\n optionToken.getExpiryTime() < block.timestamp,\r\n \"ERR_NOT_EXPIRED\"\r\n );\r\n\r\n // Calculate amount of redeems required\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/connectors/WETH/IWethConnector.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\n\r\ninterface IWethConnector {\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\ncontract ReentrancyGuard {\n bool private _notEntered;\n\n constructor () internal {\n // Storing an initial non-zero value makes deployment a bit more\n // expensive, but in exchange the refund on every call to nonReentrant\n // will be lower in amount. Since refunds are capped to a percetange of\n // the total transaction's gas, it is best to keep them low in cases\n // like this one, to increase the likelihood of the full refund coming\n // into effect.\n _notEntered = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _notEntered = false;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _notEntered = true;\n }\n}\n" + }, + "contracts/connectors/WETH/IWETH.sol": { + "content": "pragma solidity >=0.5.0;\r\n\r\ninterface IWETH {\r\n function deposit() external payable;\r\n\r\n function transfer(address to, uint256 value) external returns (bool);\r\n\r\n function withdraw(uint256) external;\r\n}\r\n" + }, + "contracts/connectors/WETH/WethConnector.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Weth Connector for bridging ether to WETH Primitive options.\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * Manages operations involving options with WETH as the underlying or strike asset.\r\n * Accepts deposits in ethers and withdraws ethers.\r\n * @author Primitive\r\n */\r\n\r\n// WETH Interface\r\nimport { IWETH } from \"./IWETH.sol\";\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { TraderLib } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector } from \"./IWethConnector.sol\";\r\n// Open Zeppelin\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract WethConnector is IWethConnector, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n IWETH public weth;\r\n\r\n event WethConnectorMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event WethConnectorExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event WethConnectorRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event WethConnectorClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event WethConnectorUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n /**\r\n * @dev Checks the quantity of an operation to make sure its not zero. Fails early.\r\n */\r\n modifier nonZero(uint256 quantity) {\r\n require(quantity > 0, \"ERR_ZERO\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Since the WethConnector contract is responsible for converting between ethers and WETH,\r\n * the contract is initialized with the address for WETH.\r\n */\r\n constructor(address payable _weth) public {\r\n weth = IWETH(_weth);\r\n }\r\n\r\n /**\r\n * @dev If ether is sent to this contract through a normal transaction, it will fail, unless\r\n * it was the WETH contract who sent it.\r\n */\r\n receive() external payable {\r\n assert(msg.sender == address(weth));\r\n }\r\n\r\n // ==== Operation Functions ====\r\n\r\n /**\r\n * @dev Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.\r\n * @notice This function is for options that have WETH as the underlying asset.\r\n * @param optionToken The address of the option token to mint.\r\n * @param receiver The address which receives the minted option and redeem tokens.\r\n */\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n // Check to make sure we are minting a WETH call option.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Convert ethers into WETH, then send WETH to option contract in preparation of calling mintOptions().\r\n _depositEthSendWeth(address(optionToken));\r\n\r\n // Mint the option and redeem tokens.\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n\r\n emit WethConnectorMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\r\n * @notice This function is for options with WETH as the strike asset.\r\n * Burns option tokens, accepts ethers, and pushes out underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n // Require one of the option's assets to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n uint256 inputStrikes = msg.value;\r\n // Calculate quantity of optionTokens needed to burn.\r\n // An ether put option with strike price $300 has a \"base\" value of 300, and a \"quote\" value of 1.\r\n // To calculate how many options are needed to be burned, we need to cancel out the \"quote\" units.\r\n // The input strike quantity can be multiplied by the strike ratio to cancel out \"quote\" units.\r\n // 1 ether (quote units) * 300 (base units) / 1 (quote units) = 300 inputOptions\r\n uint256 inputOptions = inputStrikes.mul(optionToken.getBaseValue()).div(\r\n optionToken.getQuoteValue()\r\n );\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= inputOptions,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Wrap the ethers into WETH, and send the WETH to the option contract to prepare for calling exerciseOptions().\r\n _depositEthSendWeth(address(optionToken));\r\n\r\n // Send the option tokens required to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n\r\n // Burns the transferred option tokens, stores the strike asset (ether), and pushes underlyingTokens\r\n // to the receiver address.\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n inputOptions,\r\n new bytes(0)\r\n );\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * Burns option tokens, pulls strikeTokens, and pushes out ethers.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(exerciseQuantity)\r\n returns (uint256, uint256)\r\n {\r\n // Require one of the option's assets to be WETH.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(underlyingAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fails early if msg.sender does not have enough optionTokens.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fails early if msg.sender does not have enough strikeTokens.\r\n require(\r\n IERC20(strikeAddress).balanceOf(msg.sender) >= inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n\r\n // Send strikeTokens to option contract to prepare for calling exerciseOptions().\r\n IERC20(strikeAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n\r\n // Send the option tokens to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n // Burns the optionTokens sent, stores the strikeTokens sent, and pushes underlyingTokens\r\n // to this contract.\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n address(this),\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n\r\n // Converts the withdrawn WETH to ethers, then sends the ethers to the receiver address.\r\n _withdrawEthAndSend(receiver, exerciseQuantity);\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\r\n * @notice This function is for options that have WETH as the strike asset.\r\n * Converts WETH to ethers, and withdraws ethers to the receiver address.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity The quantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant nonZero(redeemQuantity) returns (uint256) {\r\n // Require strikeToken to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens.\r\n address redeemAddress = optionToken.redeemToken();\r\n require(\r\n IERC20(redeemAddress).balanceOf(msg.sender) >= redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeemTokens to option contract in preparation for calling redeemStrikeTokens().\r\n IERC20(redeemAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n\r\n // If options have not been exercised, there will be no strikeTokens to redeem, causing a revert.\r\n // Burns the redeem tokens that were sent to the contract, and withdraws the same quantity of WETH.\r\n // Sends the withdrawn WETH to this contract, so that it can be unwrapped prior to being sent to receiver.\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(address(this));\r\n\r\n // Unwrap the redeemed WETH and then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, redeemQuantity);\r\n\r\n emit WethConnectorRedeem(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * WETH underlyingTokens are converted to ethers before being sent to receiver.\r\n * The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(closeQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early is msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem and option tokens in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n // Call the closeOptions() function to burn option and redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, closeQuantity);\r\n\r\n emit WethConnectorClose(msg.sender, address(optionToken), inputOptions);\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options.\r\n * This function is for options with WETH as the underlying asset.\r\n * The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(unwindQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // If the option is not expired, fail early.\r\n // solhint-disable-next-line not-rely-on-time\r\n require(optionToken.getExpiryTime() < now, \"ERR_NOT_EXPIRED\");\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n // Call the closeOptions() function to burn redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them to ethers then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, unwindQuantity);\r\n\r\n emit WethConnectorUnwind(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n // ==== WETH Operations ====\r\n\r\n /**\r\n * @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to \"to\".\r\n * @param to The address to send WETH ERC-20 tokens to.\r\n */\r\n function _depositEthSendWeth(address to) internal {\r\n // Deposit the ethers received from msg.value into the WETH contract.\r\n weth.deposit.value(msg.value)();\r\n\r\n // Send WETH.\r\n weth.transfer(to, msg.value);\r\n }\r\n\r\n /**\r\n * @dev Unwraps WETH to withrdaw ethers, which are then sent to the \"to\" address.\r\n * @param to The address to send withdrawn ethers to.\r\n * @param quantity The quantity of WETH to unwrap.\r\n */\r\n function _withdrawEthAndSend(address to, uint256 quantity) internal {\r\n // Withdraw ethers with weth.\r\n weth.withdraw(quantity);\r\n\r\n // Send ether.\r\n (bool success, ) = to.call.value(quantity)(\"\");\r\n\r\n // Revert is call is unsuccessful.\r\n require(success, \"ERR_SENDING_ETHER\");\r\n }\r\n}\r\n" + }, + "contracts/option/applications/factories/OptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Factory for deploying option contracts.\r\n * @author Primitive\r\n */\r\n\r\nimport { Option, SafeMath } from \"../../primitives/Option.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { OptionTemplateLib } from \"../../libraries/OptionTemplateLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { IOptionFactory } from \"../../interfaces/IOptionFactory.sol\";\r\n\r\ncontract OptionFactory is IOptionFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override optionTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the bytecode for the Option contract.\r\n */\r\n function deployOptionTemplate() public override {\r\n optionTemplate = OptionTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a create2 clone of the option template contract.\r\n * @param underlyingToken The address of the underlying ERC-20 token.\r\n * @param strikeToken The address of the strike ERC-20 token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp for option expiry.\r\n */\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override onlyOwner returns (address) {\r\n require(optionTemplate != address(0x0), \"ERR_NO_DEPLOYED_TEMPLATE\");\r\n\r\n // Calculates the salt for create2.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n\r\n // Deploys the clone using the template contract and calculated salt.\r\n address optionAddress = CloneLib.create2Clone(\r\n optionTemplate,\r\n uint256(salt)\r\n );\r\n\r\n // Sets the initial state of the option with the parameter arguments.\r\n Option(optionAddress).initialize(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Only the factory can call the initRedeemToken function to set the redeem token address.\r\n * This function is only callable by the Registry contract (the owner).\r\n */\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n Option(optionAddress).initRedeemToken(redeemAddress);\r\n }\r\n\r\n /**\r\n * @dev Calculates the option token's address using the five option parameters.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override view returns (address) {\r\n // Calculates the salt using the parameter arguments and the salt used in the template contract\r\n // create2 deployment.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n address optionAddress = CloneLib.deriveInstanceAddress(\r\n optionTemplate,\r\n salt\r\n );\r\n return optionAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Option.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Vanilla Option Token\r\n * @notice This is a low-level contract that is designed to be interacted with by\r\n * other sophisticated smart contracts which have important safety checks,\r\n * and not by externally owned accounts.\r\n * Incorrect usage through direct interaction from externally owned accounts\r\n * can lead to the loss of funds.\r\n * Use Primitive's Trader.sol contract to interact with this contract safely.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { IFlash } from \"../interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\ncontract Option is IOption, ERC20 {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n struct OptionParameters {\r\n address underlyingToken;\r\n address strikeToken;\r\n uint256 base;\r\n uint256 quote;\r\n uint256 expiry;\r\n }\r\n\r\n OptionParameters public optionParameters;\r\n\r\n // solhint-disable-next-line const-name-snakecase\r\n uint256 public override underlyingCache;\r\n uint256 public override strikeCache;\r\n address public override redeemToken;\r\n address public override factory;\r\n bool private _notEntered;\r\n\r\n string public constant name = \"Primitive V1 Option\";\r\n string public constant symbol = \"PRM\";\r\n uint8 public constant decimals = 18;\r\n\r\n event Mint(address indexed from, uint256 outOptions, uint256 outRedeems);\r\n event Exercise(\r\n address indexed from,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event Redeem(address indexed from, uint256 inRedeems);\r\n event Close(address indexed from, uint256 outUnderlyings);\r\n event UpdatedCacheBalances(uint256 underlyingCache, uint256 strikeCache);\r\n event InitializedRedeem(\r\n address indexed caller,\r\n address indexed redeemToken\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the intial state for the contract. Only called immediately after deployment.\r\n * @param underlyingToken The address of the underlying asset.\r\n * @param strikeToken The address of the strike asset.\r\n * @param base The quantity of underlying tokens per quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per base amount of underlying tokens.\r\n * @param expiry The expiration date for the option.\r\n */\r\n function initialize(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= block.timestamp, \"ERR_EXPIRY\");\r\n factory = msg.sender;\r\n optionParameters = OptionParameters(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n _notEntered = true;\r\n }\r\n\r\n modifier notExpired {\r\n // solhint-disable-next-line not-rely-on-time\r\n require(isNotExpired(), \"ERR_EXPIRED\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Prevents a contract from calling itself, directly or indirectly.\r\n * Calling a `nonReentrant` function from another `nonReentrant`\r\n * function is not supported. It is possible to prevent this from happening\r\n * by making the `nonReentrant` function external, and make it call a\r\n * `private` function that does the actual work.\r\n */\r\n modifier nonReentrant() {\r\n // On the first call to nonReentrant, _notEntered will be true\r\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\r\n\r\n // Any calls to nonReentrant after this point will fail\r\n _notEntered = false;\r\n\r\n _;\r\n\r\n // By storing the original value once again, a refund is triggered (see\r\n // https://eips.ethereum.org/EIPS/eip-2200)\r\n _notEntered = true;\r\n }\r\n\r\n /**\r\n * @dev Called after the option contract is initialized, and a redeem token has been deployed.\r\n * @notice Entangles a redeem token to this option contract permanently.\r\n * @param redeemToken_ The address of the redeem token.\r\n */\r\n function initRedeemToken(address redeemToken_) external override {\r\n require(msg.sender == factory, \"ERR_NOT_OWNER\");\r\n require(redeemToken == address(0x0), \"ERR_REDEEM_INITIALIZED\");\r\n redeemToken = redeemToken_;\r\n emit InitializedRedeem(msg.sender, redeemToken_);\r\n }\r\n\r\n /**\r\n * @dev Updates the cached balances to match the actual current balances.\r\n * Attempting to transfer tokens to this contract directly, in a separate transaction,\r\n * is incorrect and could result in loss of funds. Calling this function will permanently lock any excess\r\n * underlying or strike tokens which were erroneously sent to this contract.\r\n */\r\n function updateCacheBalances() external override nonReentrant {\r\n _updateCacheBalances(\r\n IERC20(optionParameters.underlyingToken).balanceOf(address(this)),\r\n IERC20(optionParameters.strikeToken).balanceOf(address(this))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Sets the cache balances to new values.\r\n */\r\n function _updateCacheBalances(\r\n uint256 underlyingBalance,\r\n uint256 strikeBalance\r\n ) private {\r\n underlyingCache = underlyingBalance;\r\n strikeCache = strikeBalance;\r\n emit UpdatedCacheBalances(underlyingBalance, strikeBalance);\r\n }\r\n\r\n /* === STATE MUTABLE === */\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Mints optionTokens at a 1:1 ratio to underlyingToken deposits. Also mints Redeem tokens at a base:quote ratio.\r\n * @notice inUnderlyings = outOptionTokens. inUnderlying / strike ratio = outRedeemTokens.\r\n * @param receiver The newly minted tokens are sent to the receiver address.\r\n */\r\n function mintOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n notExpired\r\n returns (uint256, uint256)\r\n {\r\n // Save on gas because this variable is used twice.\r\n uint256 underlyingBalance = IERC20(optionParameters.underlyingToken)\r\n .balanceOf(address(this));\r\n\r\n // Mint optionTokens equal to the difference between current and cached balance of underlyingTokens.\r\n uint256 inUnderlyings = underlyingBalance.sub(underlyingCache);\r\n\r\n // Calculate the quantity of redeemTokens to mint.\r\n uint256 outRedeems = inUnderlyings.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n require(outRedeems > 0, \"ERR_ZERO\");\r\n\r\n // Mint the optionTokens and redeemTokens.\r\n IRedeem(redeemToken).mint(receiver, outRedeems);\r\n _mint(receiver, inUnderlyings);\r\n\r\n // Update the underlyingCache.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Mint(msg.sender, inUnderlyings, outRedeems);\r\n return (inUnderlyings, outRedeems);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Sends out underlyingTokens then checks to make sure they are returned or paid for.\r\n * This function enables flash exercises and flash loans. Only smart contracts who implement\r\n * their own IFlash interface should be calling this function to initiate a flash exercise/loan.\r\n * @notice If the underlyingTokens are returned, only the fee has to be paid.\r\n * @param receiver The outUnderlyings are sent to the receiver address.\r\n * @param outUnderlyings Quantity of underlyingTokens to safeTransfer to receiver optimistically.\r\n * @param data Passing in any abritrary data will trigger the flash exercise callback function.\r\n */\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override nonReentrant notExpired returns (uint256, uint256) {\r\n // Store the cached balances and token addresses in memory.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n //(uint256 _underlyingCache, uint256 _strikeCache) = getCacheBalances();\r\n\r\n // Require outUnderlyings > 0 and balance of underlyings >= outUnderlyings.\r\n require(outUnderlyings > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(underlyingToken).balanceOf(address(this)) >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Optimistically safeTransfer out underlyingTokens.\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n if (data.length > 0)\r\n IFlash(receiver).primitiveFlash(msg.sender, outUnderlyings, data);\r\n\r\n // Store in memory for gas savings.\r\n uint256 strikeBalance = IERC20(optionParameters.strikeToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n\r\n // Calculate the differences.\r\n uint256 inStrikes = strikeBalance.sub(strikeCache);\r\n uint256 inUnderlyings = underlyingBalance.sub(\r\n underlyingCache.sub(outUnderlyings)\r\n ); // will be > 0 if underlyingTokens are returned.\r\n\r\n // Either underlyingTokens or strikeTokens must be sent into the contract.\r\n require(inStrikes > 0 || inUnderlyings > 0, \"ERR_ZERO\");\r\n\r\n // Calculate the remaining amount of underlyingToken that needs to be paid for.\r\n uint256 remainder = inUnderlyings > outUnderlyings\r\n ? 0\r\n : outUnderlyings.sub(inUnderlyings);\r\n\r\n // Calculate the expected payment of strikeTokens.\r\n uint256 payment = remainder.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n\r\n // Assumes the cached optionToken balance is 0, which is what it should be.\r\n uint256 inOptions = balanceOf(address(this));\r\n\r\n // Enforce the invariants.\r\n require(inStrikes >= payment, \"ERR_STRIKES_INPUT\");\r\n require(inOptions >= remainder, \"ERR_OPTIONS_INPUT\");\r\n\r\n // Burn the optionTokens at a 1:1 ratio to outUnderlyings.\r\n _burn(address(this), inOptions);\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeBalance);\r\n emit Exercise(msg.sender, outUnderlyings, inStrikes);\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Burns redeemTokens to withdraw strikeTokens at a ratio of 1:1.\r\n * @notice inRedeemTokens = outStrikeTokens. Only callable when strikeTokens are in the contract.\r\n * @param receiver The inRedeems quantity of strikeTokens are sent to the receiver address.\r\n */\r\n function redeemStrikeTokens(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (uint256)\r\n {\r\n address strikeToken = optionParameters.strikeToken;\r\n address _redeemToken = redeemToken;\r\n uint256 strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // Difference between redeemTokens balance and cache.\r\n require(inRedeems > 0, \"ERR_ZERO\");\r\n require(strikeBalance >= inRedeems, \"ERR_BAL_STRIKE\");\r\n\r\n // Burn redeemTokens in the contract. Send strikeTokens to receiver.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(strikeToken).safeTransfer(receiver, inRedeems);\r\n\r\n // Current balances.\r\n strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingCache, strikeBalance);\r\n emit Redeem(msg.sender, inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * If the option has expired, burn redeem tokens to withdraw underlying tokens.\r\n * If the option is not expired, burn option and redeem tokens to withdraw underlying tokens.\r\n * @notice inRedeemTokens / strike ratio = outUnderlyingTokens && inOptionTokens >= outUnderlyingTokens.\r\n * @param receiver The outUnderlyingTokens are sent to the receiver address.\r\n */\r\n function closeOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Stores addresses and balances locally for gas savings.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n address _redeemToken = redeemToken;\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 optionBalance = balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // The quantity of underlyingToken to send out it still determined by the quantity of inRedeems.\r\n // inRedeems is in units of strikeTokens, which is converted to underlyingTokens\r\n // by multiplying inRedeems by the strike ratio, which is base / quote.\r\n // This outUnderlyings quantity is checked against inOptions.\r\n // inOptions must be greater than or equal to outUnderlyings (1 option burned per 1 underlying purchased).\r\n // optionBalance must be greater than or equal to outUnderlyings.\r\n // Neither inRedeems or inOptions can be zero.\r\n uint256 outUnderlyings = inRedeems.mul(optionParameters.base).div(\r\n optionParameters.quote\r\n );\r\n\r\n // Assumes the cached balance is 0 so inOptions = balance of optionToken.\r\n // If optionToken is expired, optionToken does not need to be sent in. Only redeemToken.\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 inOptions = isNotExpired() ? optionBalance : outUnderlyings;\r\n require(inRedeems > 0 && inOptions > 0, \"ERR_ZERO\");\r\n require(\r\n inOptions >= outUnderlyings && underlyingBalance >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Burn optionTokens. optionTokens are only sent into contract when not expired.\r\n // solhint-disable-next-line not-rely-on-time\r\n if (isNotExpired()) {\r\n _burn(address(this), inOptions);\r\n }\r\n\r\n // Send underlyingTokens to user.\r\n // Burn redeemTokens held in the contract.\r\n // User does not receive extra underlyingTokens if there was extra optionTokens in the contract.\r\n // User receives outUnderlyings proportional to inRedeems.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n\r\n // Current balances of underlyingToken and redeemToken.\r\n underlyingBalance = IERC20(underlyingToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Close(msg.sender, outUnderlyings);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /* === VIEW === */\r\n\r\n /**\r\n * @dev Returns the previously saved balances of underlying and strike tokens.\r\n */\r\n function getCacheBalances()\r\n public\r\n override\r\n view\r\n returns (uint256, uint256)\r\n {\r\n return (underlyingCache, strikeCache);\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying, strike, and redeem token addresses.\r\n */\r\n function getAssetAddresses()\r\n public\r\n override\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n )\r\n {\r\n return (\r\n optionParameters.underlyingToken,\r\n optionParameters.strikeToken,\r\n redeemToken\r\n );\r\n }\r\n\r\n /**\r\n * @dev Returns the strike token address.\r\n */\r\n function getStrikeTokenAddress() public override view returns (address) {\r\n return optionParameters.strikeToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying token address.\r\n */\r\n function getUnderlyingTokenAddress()\r\n public\r\n override\r\n view\r\n returns (address)\r\n {\r\n return optionParameters.underlyingToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the base value option parameter.\r\n */\r\n function getBaseValue() public override view returns (uint256) {\r\n return optionParameters.base;\r\n }\r\n\r\n /**\r\n * @dev Returns the quote value option parameter.\r\n */\r\n function getQuoteValue() public override view returns (uint256) {\r\n return optionParameters.quote;\r\n }\r\n\r\n /**\r\n * @dev Returns the expiry timestamp option parameter.\r\n */\r\n function getExpiryTime() public override view returns (uint256) {\r\n return optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the option parameters and redeem token address.\r\n */\r\n function getParameters()\r\n public\r\n override\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n )\r\n {\r\n OptionParameters memory _optionParameters = optionParameters;\r\n _underlyingToken = _optionParameters.underlyingToken;\r\n _strikeToken = _optionParameters.strikeToken;\r\n _redeemToken = redeemToken;\r\n _base = _optionParameters.base;\r\n _quote = _optionParameters.quote;\r\n _expiry = _optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Internal function to check if the option is expired.\r\n */\r\n function isNotExpired() internal view returns (bool) {\r\n return optionParameters.expiry >= block.timestamp;\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IRedeem is IERC20 {\r\n function optionToken() external view returns (address);\r\n\r\n function factory() external view returns (address);\r\n\r\n function mint(address user, uint256 amount) external;\r\n\r\n function burn(address user, uint256 amount) external;\r\n\r\n function initialize(address _factory, address _optionToken) external;\r\n}\r\n" + }, + "contracts/option/interfaces/IFlash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IFlash {\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external;\r\n}\r\n" + }, + "contracts/option/primitives/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @dev Modifies name, symbol, and decimals by deleting them. Implemented as constants in parent contract.\r\n */\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\n/**\r\n * @dev Implementation of the {IERC20} interface.\r\n *\r\n * This implementation is agnostic to the way tokens are created. This means\r\n * that a supply mechanism has to be added in a derived contract using {_mint}.\r\n * For a generic mechanism see {ERC20PresetMinterPauser}.\r\n *\r\n * TIP: For a detailed writeup see our guide\r\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\r\n * to implement supply mechanisms].\r\n *\r\n * We have followed general OpenZeppelin guidelines: functions revert instead\r\n * of returning `false` on failure. This behavior is nonetheless conventional\r\n * and does not conflict with the expectations of ERC20 applications.\r\n *\r\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\r\n * This allows applications to reconstruct the allowance for all accounts just\r\n * by listening to said events. Other implementations of the EIP may not emit\r\n * these events, as it isn't required by the specification.\r\n *\r\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\r\n * functions have been added to mitigate the well-known issues around setting\r\n * allowances. See {IERC20-approve}.\r\n */\r\ncontract ERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n /**\r\n * @dev See {IERC20-totalSupply}.\r\n */\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-balanceOf}.\r\n */\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transfer}.\r\n *\r\n * Requirements:\r\n *\r\n * - `recipient` cannot be the zero address.\r\n * - the caller must have a balance of at least `amount`.\r\n */\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-allowance}.\r\n */\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-approve}.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transferFrom}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance. This is not\r\n * required by the EIP. See the note at the beginning of {ERC20};\r\n *\r\n * Requirements:\r\n * - `sender` and `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n * - the caller must have allowance for ``sender``'s tokens of at least\r\n * `amount`.\r\n */\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override returns (bool) {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically increases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n * - `spender` must have allowance for the caller of at least\r\n * `subtractedValue`.\r\n */\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Moves tokens `amount` from `sender` to `recipient`.\r\n *\r\n * This is internal function is equivalent to {transfer}, and can be used to\r\n * e.g. implement automatic token fees, slashing mechanisms, etc.\r\n *\r\n * Emits a {Transfer} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `sender` cannot be the zero address.\r\n * - `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n */\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\r\n * the total supply.\r\n *\r\n * Emits a {Transfer} event with `from` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `to` cannot be the zero address.\r\n */\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n /**\r\n * @dev Destroys `amount` tokens from `account`, reducing the\r\n * total supply.\r\n *\r\n * Emits a {Transfer} event with `to` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `account` cannot be the zero address.\r\n * - `account` must have at least `amount` tokens.\r\n */\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n /**\r\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\r\n *\r\n * This is internal function is equivalent to `approve`, and can be used to\r\n * e.g. set automatic allowances for certain subsystems, etc.\r\n *\r\n * Emits an {Approval} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `owner` cannot be the zero address.\r\n * - `spender` cannot be the zero address.\r\n */\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n /**\r\n * @dev Sets {decimals} to a value other than the default one of 18.\r\n *\r\n * WARNING: This function should only be called from the constructor. Most\r\n * applications that interact with token contracts will not expect\r\n * {decimals} to ever change, and may work incorrectly if it does.\r\n */\r\n /* function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n } */\r\n\r\n // ======= WARNING: ADDED FUNCTIONS =========\r\n\r\n /* function _setupName(string memory name_) internal {\r\n _name = name_;\r\n }\r\n\r\n function _setupSymbol(string memory symbol_) internal {\r\n _symbol = symbol_;\r\n } */\r\n\r\n // ======= END ADDED FUNCTIONS =========\r\n\r\n /**\r\n * @dev Hook that is called before any transfer of tokens. This includes\r\n * minting and burning.\r\n *\r\n * Calling conditions:\r\n *\r\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\r\n * will be to transferred to `to`.\r\n * - when `from` is zero, `amount` tokens will be minted for `to`.\r\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\r\n * - `from` and `to` are never both zero.\r\n *\r\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r\n */\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {}\r\n}\r\n" + }, + "contracts/option/libraries/OptionTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Option } from \"../primitives/Option.sol\";\r\n\r\nlibrary OptionTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _OPTION_SALT = 0x56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd87; // keccak(\"primitive-option\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function OPTION_SALT() internal pure returns (bytes32) {\r\n return _OPTION_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Option.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Option).creationCode;\r\n implementationAddress = Create2.deploy(0, _OPTION_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Create2.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address) {\n address addr;\n require(address(this).balance >= amount, \"Create2: insufficient balance\");\n require(bytecode.length != 0, \"Create2: bytecode length is zero\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), \"Create2: Failed on deploy\");\n return addr;\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address) {\n bytes32 _data = keccak256(\n abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)\n );\n return address(bytes20(_data << 96));\n }\n}\n" + }, + "contracts/option/applications/NullCloneConstructor.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ncontract NullCloneConstructor {\r\n // solhint-disable-next-line no-empty-blocks\r\n function cloneConstructor(bytes memory consData) public {\r\n // blank\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/CloneLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @title Create2 Clone Factory Library\r\n * @author Alan Lu, Gnosis.\r\n * Raymond Pulver IV.\r\n */\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\n\r\nlibrary CloneLib {\r\n /**\r\n * @dev Calls internal creation computation function.\r\n */\r\n function computeCreationCode(address target)\r\n internal\r\n view\r\n returns (bytes memory clone)\r\n {\r\n clone = computeCreationCode(address(this), target);\r\n }\r\n\r\n /**\r\n * @dev Computes the Clone's creation code.\r\n */\r\n function computeCreationCode(address deployer, address target)\r\n internal\r\n pure\r\n returns (bytes memory clone)\r\n {\r\n bytes memory consData = abi.encodeWithSignature(\r\n \"cloneConstructor(bytes)\",\r\n new bytes(0)\r\n );\r\n clone = new bytes(99 + consData.length);\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n mstore(\r\n add(clone, 0x20),\r\n 0x3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe\r\n )\r\n mstore(\r\n add(clone, 0x2d),\r\n mul(deployer, 0x01000000000000000000000000)\r\n )\r\n mstore(\r\n add(clone, 0x41),\r\n 0x5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be\r\n )\r\n mstore(add(clone, 0x60), mul(target, 0x01000000000000000000000000))\r\n mstore(\r\n add(clone, 116),\r\n 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000\r\n )\r\n }\r\n for (uint256 i = 0; i < consData.length; i++) {\r\n clone[i + 99] = consData[i];\r\n }\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(address target, bytes32 salt)\r\n internal\r\n view\r\n returns (address)\r\n {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(target))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(\r\n address from,\r\n address target,\r\n bytes32 salt\r\n ) internal pure returns (address) {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(from, target)),\r\n from\r\n );\r\n }\r\n\r\n /**\r\n * @dev Computs creation code, and then instantiates it with create2.\r\n */\r\n function create2Clone(address target, uint256 saltNonce)\r\n internal\r\n returns (address result)\r\n {\r\n bytes memory clone = computeCreationCode(target);\r\n bytes32 salt = bytes32(saltNonce);\r\n\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n let len := mload(clone)\r\n let data := add(clone, 0x20)\r\n result := create2(0, data, len, salt)\r\n }\r\n\r\n require(result != address(0), \"ERR_CREATE2_FAIL\");\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IOptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IOptionFactory {\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external;\r\n\r\n function deployOptionTemplate() external;\r\n\r\n function optionTemplate() external returns (address);\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n}\r\n" + }, + "contracts/option/applications/factories/RedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Factory Contract for Redeem Tokens.\r\n * @notice Uses cloning technology on a deployed template contract.\r\n * @author Primitive\r\n */\r\n\r\nimport { Redeem, SafeMath } from \"../../primitives/Redeem.sol\";\r\nimport { RedeemTemplateLib } from \"../../libraries/RedeemTemplateLib.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { IRedeemFactory } from \"../../interfaces/IRedeemFactory.sol\";\r\n\r\ncontract RedeemFactory is IRedeemFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override redeemTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the full bytecode of the Redeem contract to be used as a template for clones.\r\n */\r\n function deployRedeemTemplate() public override {\r\n redeemTemplate = RedeemTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a cloned instance of the template Redeem contract.\r\n * @param optionToken The address of the option token which this redeem clone will be paired with.\r\n * @return redeemAddress The address of the deployed Redeem token clone.\r\n */\r\n function deployClone(address optionToken)\r\n external\r\n override\r\n onlyOwner\r\n returns (address)\r\n {\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n RedeemTemplateLib.REDEEM_SALT(),\r\n owner(),\r\n optionToken\r\n )\r\n );\r\n address redeemAddress = CloneLib.create2Clone(\r\n redeemTemplate,\r\n uint256(salt)\r\n );\r\n Redeem(redeemAddress).initialize(owner(), optionToken);\r\n return redeemAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Redeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Redeem Token\r\n * @notice A token that is redeemable for it's paird option token's assets.\r\n * @author Primitive\r\n */\r\n\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Redeem is IRedeem, ERC20 {\r\n using SafeMath for uint256;\r\n\r\n address public override factory;\r\n address public override optionToken;\r\n\r\n string public constant name = \"Primitive V1 Redeem\";\r\n string public constant symbol = \"RDM\";\r\n uint8 public constant decimals = 18;\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the initial state for the redeem token. Called only once and immediately after deployment.\r\n * @param factory_ The address of the factory contract which handles the deployment.\r\n * @param optionToken_ The address of the option token which this redeem token will be paired with.\r\n */\r\n function initialize(address factory_, address optionToken_)\r\n public\r\n override\r\n {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n factory = factory_;\r\n optionToken = optionToken_;\r\n }\r\n\r\n /**\r\n * @dev Mints redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to mint redeem tokens to.\r\n * @param amount The quantity of redeem tokens to mint.\r\n */\r\n function mint(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _mint(to, amount);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to burn redeem tokens from.\r\n * @param amount The quantity of redeem tokens to burn.\r\n */\r\n function burn(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _burn(to, amount);\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/RedeemTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Redeem } from \"../primitives/Redeem.sol\";\r\n\r\nlibrary RedeemTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _REDEEM_SALT = 0xe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e2; // keccak(\"primitive-redeem\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function REDEEM_SALT() internal pure returns (bytes32) {\r\n return _REDEEM_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Redeem.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Redeem).creationCode;\r\n implementationAddress = Create2.deploy(0, _REDEEM_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRedeemFactory {\r\n function deployClone(address optionToken) external returns (address);\r\n\r\n function deployRedeemTemplate() external;\r\n\r\n function redeemTemplate() external returns (address);\r\n}\r\n" + }, + "contracts/option/applications/Registry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Registry Contract for Deployed Options.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../interfaces/IRegistry.sol\";\r\nimport { IOptionFactory } from \"../interfaces/IOptionFactory.sol\";\r\nimport { IRedeemFactory } from \"../interfaces/IRedeemFactory.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { Pausable } from \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Registry is IRegistry, Ownable, Pausable, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address public override optionFactory;\r\n address public override redeemFactory;\r\n\r\n mapping(address => bool) private verifiedTokens;\r\n mapping(uint256 => bool) private verifiedExpiries;\r\n address[] public allOptionClones;\r\n\r\n event UpdatedOptionFactory(address indexed optionFactory_);\r\n event UpdatedRedeemFactory(address indexed redeemFactory_);\r\n event VerifiedToken(address indexed token);\r\n event VerifiedExpiry(uint256 expiry);\r\n event UnverifiedToken(address indexed token);\r\n event UnverifiedExpiry(uint256 expiry);\r\n event DeployedOptionClone(\r\n address indexed from,\r\n address indexed optionAddress,\r\n address indexed redeemAddress\r\n );\r\n\r\n constructor() public {\r\n transferOwnership(msg.sender);\r\n }\r\n\r\n /**\r\n * @dev Pauses the deployOption function.\r\n */\r\n function pauseDeployments() external override onlyOwner {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @dev Unpauses the deployOption function.\r\n */\r\n function unpauseDeployments() external override onlyOwner {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @dev Sets the option factory contract to use for deploying clones.\r\n * @param optionFactory_ The address of the option factory.\r\n */\r\n function setOptionFactory(address optionFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n optionFactory = optionFactory_;\r\n emit UpdatedOptionFactory(optionFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the redeem factory contract to use for deploying clones.\r\n * @param redeemFactory_ The address of the redeem factory.\r\n */\r\n function setRedeemFactory(address redeemFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n redeemFactory = redeemFactory_;\r\n emit UpdatedRedeemFactory(redeemFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets an ERC-20 token verification status to true.\r\n * @notice A \"verified\" token is a standard ERC-20 token that we have tested with the option contract.\r\n * An example of an \"unverified\" token is a non-standard ERC-20 token which has not been tested.\r\n */\r\n function verifyToken(address tokenAddress) external override onlyOwner {\r\n require(tokenAddress != address(0x0), \"ERR_ZERO_ADDRESS\");\r\n verifiedTokens[tokenAddress] = true;\r\n emit VerifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets a verified token's verification status to false.\r\n */\r\n function unverifyToken(address tokenAddress) external override onlyOwner {\r\n verifiedTokens[tokenAddress] = false;\r\n emit UnverifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to true.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function verifyExpiry(uint256 expiry) external override onlyOwner {\r\n require(expiry >= now, \"ERR_EXPIRED_TIMESTAMP\");\r\n verifiedExpiries[expiry] = true;\r\n emit VerifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to false.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function unverifyExpiry(uint256 expiry) external override onlyOwner {\r\n verifiedExpiries[expiry] = false;\r\n emit UnverifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Deploys an option contract clone with create2.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the deployed option clone.\r\n */\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override nonReentrant whenNotPaused returns (address) {\r\n // Validation checks for option parameters.\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= now, \"ERR_EXPIRY\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(\r\n underlyingToken != address(0x0) && strikeToken != address(0x0),\r\n \"ERR_ZERO_ADDRESS\"\r\n );\r\n\r\n // Deploy option and redeem contract clones.\r\n address optionAddress = IOptionFactory(optionFactory).deployClone(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n address redeemAddress = IRedeemFactory(redeemFactory).deployClone(\r\n optionAddress\r\n );\r\n\r\n // Add the clone to the allOptionClones address array.\r\n allOptionClones.push(optionAddress);\r\n\r\n // Initialize the new option contract's paired redeem token.\r\n IOptionFactory(optionFactory).initRedeemToken(\r\n optionAddress,\r\n redeemAddress\r\n );\r\n emit DeployedOptionClone(msg.sender, optionAddress, redeemAddress);\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Calculates the option address deployed with create2 using the parameter arguments.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = IOptionFactory(optionFactory)\r\n .calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Checks an option address to see if it has verified assets and expiry time.\r\n * @param optionAddress The address of the option token.\r\n * @return bool If the option has verified underlying and strike tokens, and expiry time.\r\n */\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n override\r\n view\r\n returns (bool)\r\n {\r\n IOption option = IOption(optionAddress);\r\n address underlyingToken = option.getUnderlyingTokenAddress();\r\n address strikeToken = option.getStrikeTokenAddress();\r\n uint256 expiry = option.getExpiryTime();\r\n bool verifiedUnderlying = isVerifiedToken(underlyingToken);\r\n bool verifiedStrike = isVerifiedToken(strikeToken);\r\n bool verifiedExpiry = isVerifiedExpiry(expiry);\r\n return verifiedUnderlying && verifiedStrike && verifiedExpiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the length of the allOptionClones address array.\r\n */\r\n function getAllOptionClonesLength() public view returns (uint256) {\r\n return allOptionClones.length;\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedTokens private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedToken(address tokenAddress) public view returns (bool) {\r\n return verifiedTokens[tokenAddress];\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedExpiries private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedExpiry(uint256 expiry) public view returns (bool) {\r\n return verifiedExpiries[expiry];\r\n }\r\n\r\n /**\r\n * @dev Gets the option address and returns address zero if not yet deployed.\r\n * @notice Will calculate the option address using the parameter arguments.\r\n * Checks the code size of the address to see if the contract has been deployed yet.\r\n * If contract has not been deployed, returns address zero.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n uint32 size = checkCodeSize(optionAddress);\r\n if (size > 0) {\r\n return optionAddress;\r\n } else {\r\n return address(0x0);\r\n }\r\n }\r\n\r\n /**\r\n * @dev Checks the code size of a target address and returns the uint32 size.\r\n * @param target The address to check code size.\r\n */\r\n function checkCodeSize(address target) private view returns (uint32) {\r\n uint32 size;\r\n assembly {\r\n size := extcodesize(target)\r\n }\r\n return size;\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Pausable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\ncontract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor () internal {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n */\n modifier whenNotPaused() {\n require(!_paused, \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n */\n modifier whenPaused() {\n require(_paused, \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "contracts/option/extensions/Trader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Trader\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { ITrader } from \"../interfaces/ITrader.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { TraderLib } from \"../libraries/TraderLib.sol\";\r\n\r\ncontract Trader is ITrader, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address payable public weth;\r\n\r\n event TraderMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event TraderExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event TraderRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event TraderClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event TraderUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n constructor(address payable _weth) public {\r\n weth = _weth;\r\n }\r\n\r\n /**\r\n * @dev Mint options at a 1:1 ratio with deposited underlying tokens.\r\n * @notice Also mints redeems at a strike ratio to the deposited underlyings.\r\n * Warning: Calls msg.sender with safeTransferFrom.\r\n * @param optionToken The address of the option contract.\r\n * @param mintQuantity Quantity of options to mint and underlyingToken to deposit.\r\n * @param receiver The newly minted options and redeems are sent to the receiver address.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n mintQuantity,\r\n receiver\r\n );\r\n emit TraderMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 inStrikes, uint256 inOptions) = TraderLib.safeExercise(\r\n optionToken,\r\n exerciseQuantity,\r\n receiver\r\n );\r\n emit TraderExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inStrikes\r\n );\r\n\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inRedeems = outStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256) {\r\n uint256 inRedeems = TraderLib.safeRedeem(\r\n optionToken,\r\n redeemQuantity,\r\n receiver\r\n );\r\n emit TraderRedeem(msg.sender, address(optionToken), inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inOptions = inRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeClose(optionToken, closeQuantity, receiver);\r\n emit TraderClose(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens and redeemTokens are sent to the receiver address.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeUnwind(optionToken, unwindQuantity, receiver);\r\n emit TraderUnwind(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "contracts/test/Flash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Test Flash Exercise contract\r\n * @author Primitive\r\n */\r\n\r\n/**\r\n * A flash exercise is initiated by the exerciseOptions() function in the Option.sol contract.\r\n * Warning: Only correctly implemented wrapper smart contracts can safely execute these flash features.\r\n * Underlying tokens will be sent to the msg.sender of the exerciseOptions() call first.\r\n * The msg.sender should be a smart contract that implements the IFlash interface, which has a single\r\n * function: primitiveFlash().\r\n * The callback function primitiveFlash() can be triggered by passing in any arbritrary data to the\r\n * exerciseOptions() function. If the length of the data is greater than 0, it triggers the callback.\r\n * The implemented primitiveFlash() callback is where customized operations can be undertaken using the\r\n * underlying tokens received from the flash exercise.\r\n * After the callback function (whether its called or not), the exerciseOptions() function checks to see\r\n * if it has been paid the correct amount of strike and option tokens (an actual exercise of the option),\r\n * or if it has received the same quantity of underlying tokens back (a flash loan).\r\n */\r\n\r\nimport { IOption } from \"../option/interfaces/IOption.sol\";\r\nimport { IFlash } from \"../option/interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\n\r\ncontract Flash is IFlash {\r\n using SafeMath for uint256;\r\n\r\n address public optionToken;\r\n\r\n event FlashExercise(address indexed from);\r\n\r\n constructor(address _optionToken) public {\r\n optionToken = _optionToken;\r\n }\r\n\r\n function goodFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(1)\r\n );\r\n }\r\n\r\n function badFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n // bytes(2) will cause our implemented flash exercise to fail\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(2)\r\n );\r\n }\r\n\r\n /**\r\n * @dev An implemented primitiveFlash callback function that matches the interface in Option.sol.\r\n * @notice Calling the exerciseOptions() function in the Option contract will trigger this callback function.\r\n * @param receiver The account which receives the underlying tokens.\r\n * @param outUnderlyings The quantity of underlying tokens received as a flash loan.\r\n * @param data Any data that will be passed as an argument to the original exerciseOptions() call.\r\n */\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override {\r\n // Get the underlying token address.\r\n address underlyingToken = IOption(optionToken)\r\n .getUnderlyingTokenAddress();\r\n // In our test case we pass in the data param with bytes(1).\r\n bool good = keccak256(abi.encodePacked(data)) ==\r\n keccak256(abi.encodePacked(new bytes(1)));\r\n // If the flash exercise went through, we return the loaned underlyings.\r\n if (good) {\r\n IERC20(underlyingToken).transfer(optionToken, outUnderlyings);\r\n }\r\n emit FlashExercise(receiver);\r\n }\r\n}\r\n" + }, + "contracts/test/OptionTest.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Option test contract.\r\n * @author Primitive\r\n */\r\n\r\nimport \"../option/primitives/Option.sol\";\r\n\r\ncontract OptionTest is Option {\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public Option() {}\r\n\r\n function setExpiry(uint256 expiry) public {\r\n optionParameters.expiry = expiry;\r\n }\r\n\r\n function setRedeemToken(address redeem) public {\r\n redeemToken = redeem;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/BadERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\ninterface IERC20 {\r\n function totalSupply() external view returns (uint256);\r\n\r\n function balanceOf(address account) external view returns (uint256);\r\n\r\n function transfer(address recipient, uint256 amount) external;\r\n\r\n function allowance(address owner, address spender)\r\n external\r\n view\r\n returns (uint256);\r\n\r\n function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) external;\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\ncontract BadERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n string private _name;\r\n string private _symbol;\r\n uint8 private _decimals;\r\n\r\n constructor(string memory name, string memory symbol) public {\r\n _name = name;\r\n _symbol = symbol;\r\n _decimals = 18;\r\n }\r\n\r\n function name() public view returns (string memory) {\r\n return _name;\r\n }\r\n\r\n function symbol() public view returns (string memory) {\r\n return _symbol;\r\n }\r\n\r\n function decimals() public view returns (uint8) {\r\n return _decimals;\r\n }\r\n\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n }\r\n\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n function mint(address account, uint256 amount) public {\r\n _mint(account, amount);\r\n }\r\n\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n }\r\n\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n }\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {\r\n // do nothing\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract TestERC20 is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/USDC.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract USDC is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/WETH9.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\n// Copyright (C) 2015, 2016, 2017 Dapphub\r\n\r\n// This program is free software: you can redistribute it and/or modify\r\n// it under the terms of the GNU General Public License as published by\r\n// the Free Software Foundation, either version 3 of the License, or\r\n// (at your option) any later version.\r\n\r\n// This program is distributed in the hope that it will be useful,\r\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n// GNU General Public License for more details.\r\n\r\n// You should have received a copy of the GNU General Public License\r\n// along with this program. If not, see .\r\n\r\npragma solidity ^0.6.2;\r\n\r\ncontract WETH9 {\r\n string public name = \"Wrapped Ether\";\r\n string public symbol = \"WETH\";\r\n uint8 public decimals = 18;\r\n\r\n event Approval(address indexed src, address indexed guy, uint256 wad);\r\n event Transfer(address indexed src, address indexed dst, uint256 wad);\r\n event Deposit(address indexed dst, uint256 wad);\r\n event Withdrawal(address indexed src, uint256 wad);\r\n\r\n mapping(address => uint256) public balanceOf;\r\n mapping(address => mapping(address => uint256)) public allowance;\r\n\r\n /* function() external payable {\r\n deposit();\r\n } */\r\n function deposit() public payable {\r\n balanceOf[msg.sender] += msg.value;\r\n emit Deposit(msg.sender, msg.value);\r\n }\r\n\r\n function withdraw(uint256 wad) public {\r\n require(balanceOf[msg.sender] >= wad);\r\n balanceOf[msg.sender] -= wad;\r\n msg.sender.transfer(wad);\r\n emit Withdrawal(msg.sender, wad);\r\n }\r\n\r\n function totalSupply() public view returns (uint256) {\r\n return address(this).balance;\r\n }\r\n\r\n function approve(address guy, uint256 wad) public returns (bool) {\r\n allowance[msg.sender][guy] = wad;\r\n emit Approval(msg.sender, guy, wad);\r\n return true;\r\n }\r\n\r\n function transfer(address dst, uint256 wad) public returns (bool) {\r\n return transferFrom(msg.sender, dst, wad);\r\n }\r\n\r\n function transferFrom(\r\n address src,\r\n address dst,\r\n uint256 wad\r\n ) public returns (bool) {\r\n require(balanceOf[src] >= wad);\r\n\r\n if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) {\r\n require(allowance[src][msg.sender] >= wad);\r\n allowance[src][msg.sender] -= wad;\r\n }\r\n\r\n balanceOf[src] -= wad;\r\n balanceOf[dst] += wad;\r\n\r\n emit Transfer(src, dst, wad);\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/*\r\n GNU GENERAL PUBLIC LICENSE\r\n Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. \r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n Preamble\r\n\r\n The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works. By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users. We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors. You can apply it to\r\nyour programs, too.\r\n\r\n When we speak of free software, we are referring to freedom, not\r\nprice. Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights. Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received. You must make sure that they, too, receive\r\nor can get the source code. And you must show them these terms so they\r\nknow their rights.\r\n\r\n Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software. For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so. This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software. The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable. Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts. If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary. To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n TERMS AND CONDITIONS\r\n\r\n 0. Definitions.\r\n\r\n \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n \"The Program\" refers to any copyrightable work licensed under this\r\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy. The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy. Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies. Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License. If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n 1. Source Code.\r\n\r\n The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it. \"Object code\" means any non-source\r\nform of a work.\r\n\r\n A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form. A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities. However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work. For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n 2. Basic Permissions.\r\n\r\n All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met. This License explicitly affirms your unlimited\r\npermission to run the unmodified Program. The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work. This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force. You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright. Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below. Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n 4. Conveying Verbatim Copies.\r\n\r\n You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n 5. Conveying Modified Source Versions.\r\n\r\n You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n a) The work must carry prominent notices stating that you modified\r\n it, and giving a relevant date.\r\n\r\n b) The work must carry prominent notices stating that it is\r\n released under this License and any conditions added under section\r\n 7. This requirement modifies the requirement in section 4 to\r\n \"keep intact all notices\".\r\n\r\n c) You must license the entire work, as a whole, under this\r\n License to anyone who comes into possession of a copy. This\r\n License will therefore apply, along with any applicable section 7\r\n additional terms, to the whole of the work, and all its parts,\r\n regardless of how they are packaged. This License gives no\r\n permission to license the work in any other way, but it does not\r\n invalidate such permission if you have separately received it.\r\n\r\n d) If the work has interactive user interfaces, each must display\r\n Appropriate Legal Notices; however, if the Program has interactive\r\n interfaces that do not display Appropriate Legal Notices, your\r\n work need not make them do so.\r\n\r\n A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit. Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n 6. Conveying Non-Source Forms.\r\n\r\n You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n a) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by the\r\n Corresponding Source fixed on a durable physical medium\r\n customarily used for software interchange.\r\n\r\n b) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by a\r\n written offer, valid for at least three years and valid for as\r\n long as you offer spare parts or customer support for that product\r\n model, to give anyone who possesses the object code either (1) a\r\n copy of the Corresponding Source for all the software in the\r\n product that is covered by this License, on a durable physical\r\n medium customarily used for software interchange, for a price no\r\n more than your reasonable cost of physically performing this\r\n conveying of source, or (2) access to copy the\r\n Corresponding Source from a network server at no charge.\r\n\r\n c) Convey individual copies of the object code with a copy of the\r\n written offer to provide the Corresponding Source. This\r\n alternative is allowed only occasionally and noncommercially, and\r\n only if you received the object code with such an offer, in accord\r\n with subsection 6b.\r\n\r\n d) Convey the object code by offering access from a designated\r\n place (gratis or for a charge), and offer equivalent access to the\r\n Corresponding Source in the same way through the same place at no\r\n further charge. You need not require recipients to copy the\r\n Corresponding Source along with the object code. If the place to\r\n copy the object code is a network server, the Corresponding Source\r\n may be on a different server (operated by you or a third party)\r\n that supports equivalent copying facilities, provided you maintain\r\n clear directions next to the object code saying where to find the\r\n Corresponding Source. Regardless of what server hosts the\r\n Corresponding Source, you remain obligated to ensure that it is\r\n available for as long as needed to satisfy these requirements.\r\n\r\n e) Convey the object code using peer-to-peer transmission, provided\r\n you inform other peers where the object code and Corresponding\r\n Source of the work are being offered to the general public at no\r\n charge under subsection 6d.\r\n\r\n A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling. In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage. For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product. A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source. The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information. But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed. Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n 7. Additional Terms.\r\n\r\n \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law. If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit. (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.) You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n a) Disclaiming warranty or limiting liability differently from the\r\n terms of sections 15 and 16 of this License; or\r\n\r\n b) Requiring preservation of specified reasonable legal notices or\r\n author attributions in that material or in the Appropriate Legal\r\n Notices displayed by works containing it; or\r\n\r\n c) Prohibiting misrepresentation of the origin of that material, or\r\n requiring that modified versions of such material be marked in\r\n reasonable ways as different from the original version; or\r\n\r\n d) Limiting the use for publicity purposes of names of licensors or\r\n authors of the material; or\r\n\r\n e) Declining to grant rights under trademark law for use of some\r\n trade names, trademarks, or service marks; or\r\n\r\n f) Requiring indemnification of licensors and authors of that\r\n material by anyone who conveys the material (or modified versions of\r\n it) with contractual assumptions of liability to the recipient, for\r\n any liability that these contractual assumptions directly impose on\r\n those licensors and authors.\r\n\r\n All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10. If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term. If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n 8. Termination.\r\n\r\n You may not propagate or modify a covered work except as expressly\r\nprovided under this License. Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License. If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n 9. Acceptance Not Required for Having Copies.\r\n\r\n You are not required to accept this License in order to receive or\r\nrun a copy of the Program. Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance. However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work. These actions infringe copyright if you do\r\nnot accept this License. Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n 10. Automatic Licensing of Downstream Recipients.\r\n\r\n Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License. You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations. If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License. For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n 11. Patents.\r\n\r\n A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based. The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version. For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement). To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients. \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License. You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n 12. No Surrender of Others' Freedom.\r\n\r\n If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License. If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all. For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n 13. Use with the GNU Affero General Public License.\r\n\r\n Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work. The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n 14. Revised Versions of this License.\r\n\r\n The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time. Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n Each version is given a distinguishing version number. If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation. If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n Later license versions may give you additional or different\r\npermissions. However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n 15. Disclaimer of Warranty.\r\n\r\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n 16. Limitation of Liability.\r\n\r\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n 17. Interpretation of Sections 15 and 16.\r\n\r\n If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n END OF TERMS AND CONDITIONS\r\n\r\n How to Apply These Terms to Your New Programs\r\n\r\n If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n To do so, attach the following notices to the program. It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n \r\n Copyright (C) \r\n\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU General Public License as published by\r\n the Free Software Foundation, either version 3 of the License, or\r\n (at your option) any later version.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n GNU General Public License for more details.\r\n\r\n You should have received a copy of the GNU General Public License\r\n along with this program. If not, see .\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n Copyright (C) \r\n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n This is free software, and you are welcome to redistribute it\r\n under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License. Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n.\r\n\r\n The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs. If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library. If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License. But first, please read\r\n.\r\n\r\n*/\r\n" + } + }, + "settings": { + "metadata": { + "useLiteralContent": false + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "id", + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/deployments/localhost_31337/solcInputs/0x85dbd266bfa14eb8805070676c56f66961f1bfc5503ecbc7aab135d0ded78194.json b/deployments/localhost_31337/solcInputs/0x85dbd266bfa14eb8805070676c56f66961f1bfc5503ecbc7aab135d0ded78194.json new file mode 100644 index 00000000..23a2984c --- /dev/null +++ b/deployments/localhost_31337/solcInputs/0x85dbd266bfa14eb8805070676c56f66961f1bfc5503ecbc7aab135d0ded78194.json @@ -0,0 +1,165 @@ +{ + "language": "Solidity", + "sources": { + "contracts/connectors/Uniswap/IUniswapConnector.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\ninterface IUniswapConnector {}\r\n" + }, + "contracts/connectors/Uniswap/UniswapConnector.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\n/**\r\n * @title Combines Uniswap V2 Protocol functions with Primitive V1.\r\n * @author Primitive\r\n */\r\n\r\n// Uniswap\r\nimport {\r\n IUniswapV2Callee\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\";\r\nimport {\r\n IUniswapV2Router02\r\n} from \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\r\nimport {\r\n IUniswapV2Factory\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\r\nimport {\r\n IUniswapV2Pair\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\";\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../../option/interfaces/IRegistry.sol\";\r\nimport { ITrader } from \"../../option/interfaces/ITrader.sol\";\r\nimport { TraderLib } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector } from \"../WETH/IWethConnector.sol\";\r\n// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n IUniswapV2Router02 public router;\r\n IUniswapV2Factory public factory;\r\n ITrader public trader;\r\n IRegistry public registry;\r\n\r\n address public quoteToken; // Designated stablecoin for Primitive.\r\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\r\n\r\n event Initialized(address indexed from, address indexed quoteToken);\r\n event UpdatedRouter(address indexed from, address indexed newRouter);\r\n event UpdatedFactory(address indexed from, address indexed newFactory);\r\n event UpdatedTrader(address indexed from, address indexed newTrader);\r\n event UpdatedRegistry(address indexed from, address indexed newRegistry);\r\n event UpdatedQuoteToken(address indexed from, address indexed newQuote);\r\n\r\n event RolledOptions(\r\n address indexed from,\r\n address indexed optionFrom,\r\n address indexed optionTo,\r\n uint256 quantity\r\n );\r\n event RolledOptionLiquidity(\r\n address indexed from,\r\n address indexed optionMarketFrom,\r\n address indexed optionMarketTo,\r\n uint256 liquidity\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n // ==== Setup Functions ====\r\n\r\n function initialize(\r\n address router_,\r\n address factory_,\r\n address trader_,\r\n address registry_,\r\n address quoteToken_\r\n ) external onlyOwner {\r\n require(address(router) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(factory) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(trader) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(registry) == address(0x0), \"ERR_INITIALIZED\");\r\n require(quoteToken == address(0x0), \"ERR_INITIALIZED\");\r\n router = IUniswapV2Router02(router_);\r\n factory = IUniswapV2Factory(factory_);\r\n trader = ITrader(trader_);\r\n registry = IRegistry(registry_);\r\n quoteToken = quoteToken_;\r\n emit Initialized(msg.sender, quoteToken_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Uniswap V2 Router address to use.\r\n */\r\n function setRouter(address router_) external onlyOwner {\r\n router = IUniswapV2Router02(router_);\r\n emit UpdatedRouter(msg.sender, router_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Uniswap V2 Factory address to use.\r\n */\r\n function setFactory(address factory_) external onlyOwner {\r\n factory = IUniswapV2Factory(factory_);\r\n emit UpdatedFactory(msg.sender, factory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Primitive V1 Trader address to use.\r\n */\r\n function setTrader(address trader_) external onlyOwner {\r\n trader = ITrader(trader_);\r\n emit UpdatedTrader(msg.sender, trader_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Primitive V1 Registry address to use.\r\n */\r\n function setRegistry(address registry_) external onlyOwner {\r\n registry = IRegistry(registry_);\r\n emit UpdatedRegistry(msg.sender, registry_);\r\n }\r\n\r\n /**\r\n * @dev Sets the designated stablecoin to use (paired token in Uniswap pools).\r\n */\r\n function setQuoteToken(address quoteToken_) external onlyOwner {\r\n quoteToken = quoteToken_;\r\n emit UpdatedQuoteToken(msg.sender, quoteToken_);\r\n }\r\n\r\n // ==== Trading Functions ====\r\n\r\n /**\r\n * @dev Mints options using underlyingTokens provided by user, then swaps on Uniswap V2.\r\n * Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.\r\n * @notice If the first address in the path is not the optionToken address, the tx will fail.\r\n * underlyingToken -> optionToken -> quoteToken.\r\n * @param optionToken The address of the Oracle-less Primitive option.\r\n * @param amountIn The quantity of options to mint and then sell.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n * @param to The address to send the optionToken proceeds and redeem tokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function mintOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints option and redeem tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the optionToken address.\r\n (, bool success) = _swapExactOptionsForTokens(\r\n address(optionToken),\r\n outputOptions,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send redeemTokens (short options) to the \"to\" address.\r\n IERC20(optionToken.redeemToken()).safeTransfer(to, outputRedeems);\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens.\r\n * @notice If the first address in the path is not the redeemToken address, the tx will fail.\r\n * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\r\n * @param optionToken The address of the Option contract.\r\n * @param amountIn The quantity of options to mint.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the redeemTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\r\n * @param to The address to send the redeemToken proceeds and optionTokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function mintShortOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) public returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints option and redeem tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the optionToken address.\r\n address redeemToken = optionToken.redeemToken();\r\n (, bool success) = _swapExactOptionsForTokens(\r\n redeemToken,\r\n outputRedeems, // shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send optionTokens (long options) to the \"to\" address.\r\n IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference.\r\n * @notice If the first address in the path is not the redeemToken address, the tx will fail.\r\n * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\r\n * @param optionToken The address of the Option contract.\r\n * @param flashLoanQuantity The quantity of options to mint.\r\n * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\r\n * @param to The address to send the redeemToken proceeds and optionTokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function flashloanMintShortOptionsThenSwap(\r\n IOption optionToken,\r\n uint256 flashLoanQuantity,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) public returns (bool) {\r\n require(flashLoanQuantity > 0, \"ERR_ZERO\");\r\n // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens.\r\n\r\n // Mints option and redeem tokens to this contract.\r\n address underlyingToken = optionToken.getUnderlyingTokenAddress();\r\n\r\n // Mint optionTokens using the underlyingTokens received from UniswapV2 flashloan.\r\n // Sends underlyingTokens from this contract and to the optionToken contract, then calls mintOptions.\r\n // This contract receives the newly minted option and redeem tokens.\r\n IERC20(underlyingToken).safeTransfer(\r\n address(optionToken),\r\n flashLoanQuantity\r\n );\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(address(this));\r\n\r\n // Need to pay back the UniswapV2 flash loan by selling the redeemToken, then paying the remainder.\r\n\r\n // Swaps redeemTokens to the token specified at the end of the path, then sends to UniswapV2Pair.\r\n // Reverts if the first address in the path is not the redeemToken address.\r\n // Reverts if the last address in the path is not the underlyingToken address.\r\n // path[0] = redeemToken, path[1] = dai, path[2] = underlyingToken\r\n {\r\n require(path[2] == underlyingToken, \"ERR_END_PATH_NOT_UNDERLYING\");\r\n (\r\n uint256[] memory amounts,\r\n bool success\r\n ) = _swapExactOptionsForTokens(\r\n optionToken.redeemToken(),\r\n outputRedeems, // shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n msg.sender,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // The remainder is the flash loan amount - amount from selling redeemTokens.\r\n uint256 remainder = flashLoanQuantity > amounts[1]\r\n ? flashLoanQuantity.sub(amounts[1])\r\n : 0;\r\n\r\n // Pull underlyingTokens from the original spender to pay the remainder of the flash loan.\r\n IERC20(underlyingToken).safeTransferFrom(to, msg.sender, remainder);\r\n\r\n // Send optionTokens (long options) to the \"spender\" address.\r\n IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens\r\n }\r\n return true;\r\n }\r\n\r\n function executeFlashMint(\r\n uint256 amountOptions,\r\n uint256 amountOutMin,\r\n IOption optionToken\r\n ) public {\r\n address redeemToken = optionToken.redeemToken();\r\n address underlyingToken = optionToken.getUnderlyingTokenAddress();\r\n address pairAddress = factory.getPair(quoteToken, underlyingToken);\r\n address[] memory path = new address[](3);\r\n path[0] = redeemToken;\r\n path[1] = quoteToken;\r\n path[2] = underlyingToken;\r\n IUniswapV2Pair pair = IUniswapV2Pair(pairAddress);\r\n\r\n bytes4 selector = bytes4(\r\n keccak256(\r\n bytes(\r\n \"flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)\"\r\n )\r\n )\r\n );\r\n bytes memory params = abi.encodeWithSelector(\r\n selector, // function to call in this contract\r\n optionToken, // option token to mint with flash loaned tokens\r\n amountOptions, // quantity of tokens from flash loan\r\n amountOutMin, // total price paid for selling redeemTokens from the minted optionTokens\r\n path, // redeemToken -> stablecoin -> underlyingToken\r\n msg.sender, // address to pull the remainder loan amount to pay, and send optionTokens to.\r\n now + 15 minutes // deadline of this function call\r\n );\r\n\r\n // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address.\r\n // Then executes `flashLoanMintShortOptionsThenSwap`.\r\n pair.swap(0, amountOptions, address(this), params); // redeemToken <> stablecoin pair swap\r\n }\r\n\r\n // gets tokens/WETH via a V2 flash swap, mints options, swaps short tokens for tokens, pulls in difference, repays!\r\n function uniswapV2Call(\r\n address sender,\r\n uint256 amount0,\r\n uint256 amount1,\r\n bytes calldata data\r\n ) external override {\r\n (bool success, bytes memory returnData) = address(this).call(data);\r\n require(success, \"ERR_SECURE_LOAN_CALL_FAIL\");\r\n }\r\n\r\n /**\r\n * @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n * @notice Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender.\r\n * Then closes the optionTokens and withdraws underlyingTokens to the \"to\" address.\r\n * Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n * UNI-V2 -> optionToken -> underlyingToken.\r\n * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity.\r\n * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function removeLiquidityThenCloseOptions(\r\n address optionAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) public nonReentrant returns (uint256, uint256) {\r\n // Store in memory for gas savings.\r\n address quoteToken_ = quoteToken;\r\n IOption optionToken = IOption(optionAddress);\r\n //IUniswapV2Router02 router_ = router;\r\n\r\n {\r\n // Gets the Uniswap V2 Pair address for optionAddress and quoteToken.\r\n // Transfers the LP tokens for the pair to this contract.\r\n // Warning: external call to a non-trusted address `msg.sender`.\r\n address pair = getUniswapMarketForOption(optionAddress);\r\n IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);\r\n IERC20(pair).approve(address(router), uint256(-1));\r\n }\r\n\r\n // Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens).\r\n (uint256 amountOptions, uint256 amountQuote) = router.removeLiquidity(\r\n optionAddress,\r\n quoteToken_,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n address(this),\r\n deadline\r\n );\r\n\r\n // Approves trader to pull option and redeem tokens from this contract to close options.\r\n ITrader trader_ = trader;\r\n {\r\n //address redeemToken = optionToken.redeemToken();\r\n IERC20(optionAddress).approve(address(trader_), uint256(-1));\r\n IERC20(optionToken.redeemToken()).approve(\r\n address(trader_),\r\n uint256(-1)\r\n );\r\n\r\n // Calculate equivalent quantity of redeem (short option) tokens to close the option position.\r\n // Need to cancel base units and have quote units remaining.\r\n uint256 requiredRedeems = amountOptions\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Pull the required redeemTokens from msg.sender to this contract.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n requiredRedeems\r\n );\r\n }\r\n\r\n // Pushes option and redeem tokens to the option contract and calls \"closeOption\".\r\n // Receives underlyingTokens and sends them to the \"to\" address.\r\n trader_.safeClose(optionToken, amountOptions, to);\r\n\r\n // Send the quoteTokens received from burning liquidity shares to the \"to\" address.\r\n IERC20(quoteToken_).safeTransfer(to, amountQuote);\r\n\r\n return (amountOptions, amountQuote);\r\n }\r\n\r\n /**\r\n * @dev Combines \"removeLiquidityThenCloseOptions\" function with \"addLiquidityWithUnderlying\" fuction.\r\n * @notice Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair.\r\n * UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2.\r\n * @param rollFromOption The optionToken address to close a UNI-V2 position.\r\n * @param rollToOption The optionToken address to open a UNI-V2 position.\r\n * @param liquidity The quantity of UNI-V2 shares to roll from the first Uniswap pool.\r\n * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity.\r\n * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n * @param to The address that receives the UNI-V2 shares that have been rolled.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function rollOptionLiquidity(\r\n address rollFromOption,\r\n address rollToOption,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool) {\r\n (\r\n uint256 outUnderlyings,\r\n uint256 outQuote\r\n ) = removeLiquidityThenCloseOptions(\r\n rollFromOption,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n bool success = addLiquidityWithUnderlying(\r\n rollToOption,\r\n outUnderlyings,\r\n outQuote,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n require(success, \"ERR_ADD_LIQUIDITY_FAIL\");\r\n\r\n emit RolledOptionLiquidity(\r\n msg.sender,\r\n rollFromOption,\r\n rollToOption,\r\n liquidity\r\n );\r\n\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Closes an option position and opens a new one using the freed underlyingTokens.\r\n * @notice Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver.\r\n * rollFromOption -> underlyingToken -> rollToOption.\r\n * @param rollFromOption The optionToken to close.\r\n * @param rollToOption The optionToken to mint.\r\n * @param rollQuantity The quantity of underlyingTokens to receive from closed options then use to mint new options.\r\n * @param receiver The address that receives newly minted option and redeem tokens.\r\n */\r\n function rollOption(\r\n address rollFromOption,\r\n address rollToOption,\r\n uint256 rollQuantity,\r\n address receiver\r\n ) external returns (bool) {\r\n // Close the rollFromOption to receive underlyingTokens.\r\n // Sends the underlyingTokens to this contract.\r\n (, , uint256 outUnderlyings) = TraderLib.safeClose(\r\n IOption(rollFromOption),\r\n rollQuantity,\r\n address(this)\r\n );\r\n\r\n // Store in memory for gas savings.\r\n ITrader trader_ = trader;\r\n\r\n // Approve underlyingTokens to be sent to the Primitive Trader contract.\r\n IERC20(IOption(rollFromOption).getUnderlyingTokenAddress()).approve(\r\n address(trader_),\r\n uint256(-1)\r\n );\r\n\r\n // Mint rollToOptions using the underlyingTokens received from closing the rollFromOptions.\r\n // Pulls underlyingTokens from this contract and sends them to the rollToOption contract.\r\n // Sends minted option and redeem tokens to the \"receiver\" address.\r\n (uint256 outputOptions, ) = trader_.safeMint(\r\n IOption(rollToOption),\r\n outUnderlyings,\r\n receiver\r\n );\r\n\r\n // An event is emitted because a position was atomically rolled without additional capital.\r\n emit RolledOptions(\r\n msg.sender,\r\n rollFromOption,\r\n rollToOption,\r\n outputOptions\r\n );\r\n return true;\r\n }\r\n\r\n // ==== Liquidity Functions ====\r\n\r\n /**\r\n * @dev Adds liquidity to an option<>quote token pair by minting optionTokens with underlyingTokens.\r\n * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n * underlyingToken -> optionToken -> UNI-V2.\r\n * @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n * @param quantityOptions The quantity of underlyingTokens to use to mint optionTokens.\r\n * @param quantityQuoteTokens The quantity of quoteTokens to add with optionTokens to the Uniswap V2 Pair.\r\n * @param minQuantityOptions The minimum quantity of optionTokens expected to provide liquidity with.\r\n * @param minQuantityQuoteTokens The minimum quantity of quoteTokens expected to provide liquidity with.\r\n * @param to The address that receives UNI-V2 shares.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function addLiquidityWithUnderlying(\r\n address optionAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityQuoteTokens,\r\n uint256 minQuantityOptions,\r\n uint256 minQuantityQuoteTokens,\r\n address to,\r\n uint256 deadline\r\n ) public nonReentrant returns (bool) {\r\n // Store in memory for gas savings.\r\n IUniswapV2Router02 router_ = router;\r\n address quoteToken_ = quoteToken;\r\n\r\n // Pull quote tokens from msg.sender to add to Uniswap V2 Pair.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(quoteToken_).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityQuoteTokens\r\n );\r\n\r\n // Pulls underlyingTokens from msg.sender to this contract.\r\n // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n IOption(optionAddress),\r\n quantityOptions,\r\n address(this)\r\n );\r\n\r\n // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(optionAddress).approve(address(router_), uint256(-1));\r\n IERC20(quoteToken_).approve(address(router_), uint256(-1));\r\n\r\n // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router_.addLiquidity(\r\n optionAddress,\r\n quoteToken,\r\n outputOptions,\r\n quantityQuoteTokens,\r\n minQuantityOptions,\r\n minQuantityQuoteTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n // Send redeemTokens (short option tokens) from minting option operation to msg.sender.\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n msg.sender,\r\n outputRedeems\r\n );\r\n\r\n return true;\r\n }\r\n\r\n // ==== Internal Functions ====\r\n\r\n /**\r\n * @dev Calls the \"swapExactTokensForTokens\" function on the Uniswap V2 Router 02 Contract.\r\n * @notice Fails early if the address in the beginning of the path is not the optionToken address.\r\n * @param optionAddress The address of the optionToken to swap from.\r\n * @param amountIn The quantity of optionTokens to swap with.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens swapped.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n * @param to The address to send the optionToken proceeds and redeem tokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n */\r\n function _swapExactOptionsForTokens(\r\n address optionAddress,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256[] memory amounts, bool success) {\r\n // Fails early if the token being swapped from is not the optionToken.\r\n require(path[0] == optionAddress, \"ERR_PATH_OPTION_START\");\r\n\r\n // Store router in memory for gas savings.\r\n IUniswapV2Router02 router_ = router;\r\n\r\n // Approve the uniswap router to be able to transfer options from this contract.\r\n IERC20(optionAddress).approve(address(router_), uint256(-1));\r\n\r\n // Call the Uniswap V2 function to swap optionTokens to quoteTokens.\r\n (amounts) = router_.swapExactTokensForTokens(\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n success = true;\r\n }\r\n\r\n // ==== Management Functions ====\r\n\r\n /**\r\n * @dev Creats a Uniswap pair for option<>quote tokens.\r\n * @param optionAddress The address of the option to deploy a Uniswap V2 Pair for with the quoteToken.\r\n */\r\n function deployUniswapMarket(address optionAddress)\r\n external\r\n returns (address)\r\n {\r\n address uniswapPair = factory.createPair(optionAddress, quoteToken);\r\n return uniswapPair;\r\n }\r\n\r\n // ==== View ====\r\n\r\n /**\r\n * @dev The maxmium deadline available for each trade.\r\n */\r\n function getMaxDeadline() public view returns (uint256) {\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 deadline = now + 15 minutes;\r\n return deadline;\r\n }\r\n\r\n /**\r\n * @dev Gets a Uniswap Pair address for an option token and quote token.\r\n * @param optionAddress The address of the option to get a Uniswap V2 Pair address for (with quoteToken).\r\n */\r\n function getUniswapMarketForOption(address optionAddress)\r\n public\r\n view\r\n returns (address)\r\n {\r\n address uniswapPair = factory.getPair(optionAddress, quoteToken);\r\n require(uniswapPair != address(0x0), \"ERR_PAIR_DOES_NOT_EXIST\");\r\n return uniswapPair;\r\n }\r\n\r\n /**\r\n * @dev Gets a Uniswap Pair address for the corresponding option parameters.\r\n */\r\n function getUniswapMarketForSeries(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public view returns (address) {\r\n address optionAddress = registry.getOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n require(optionAddress != address(0x0), \"ERR_OPTION_DOES_NOT_EXIST\");\r\n return getUniswapMarketForOption(optionAddress);\r\n }\r\n}\r\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Callee {\n function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": { + "content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": { + "content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/option/interfaces/IOption.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IOption is IERC20 {\r\n function mintOptions(address receiver) external returns (uint256, uint256);\r\n\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external returns (uint256, uint256);\r\n\r\n function redeemStrikeTokens(address receiver) external returns (uint256);\r\n\r\n function closeOptions(address receiver)\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function redeemToken() external view returns (address);\r\n\r\n function getStrikeTokenAddress() external view returns (address);\r\n\r\n function getUnderlyingTokenAddress() external view returns (address);\r\n\r\n function getBaseValue() external view returns (uint256);\r\n\r\n function getQuoteValue() external view returns (uint256);\r\n\r\n function getExpiryTime() external view returns (uint256);\r\n\r\n function underlyingCache() external view returns (uint256);\r\n\r\n function strikeCache() external view returns (uint256);\r\n\r\n function factory() external view returns (address);\r\n\r\n function getCacheBalances() external view returns (uint256, uint256);\r\n\r\n function getAssetAddresses()\r\n external\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n );\r\n\r\n function getParameters()\r\n external\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n );\r\n\r\n function initRedeemToken(address _redeemToken) external;\r\n\r\n function updateCacheBalances() external;\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../../GSN/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20MinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/GSN/Context.sol": { + "content": "pragma solidity ^0.6.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "pragma solidity ^0.6.2;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/option/interfaces/IRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRegistry {\r\n function pauseDeployments() external;\r\n\r\n function unpauseDeployments() external;\r\n\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function setOptionFactory(address optionFactory_) external;\r\n\r\n function setRedeemFactory(address redeemFactory_) external;\r\n\r\n function optionFactory() external returns (address);\r\n\r\n function redeemFactory() external returns (address);\r\n\r\n function verifyToken(address tokenAddress) external;\r\n\r\n function verifyExpiry(uint256 expiry) external;\r\n\r\n function unverifyToken(address tokenAddress) external;\r\n\r\n function unverifyExpiry(uint256 expiry) external;\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n view\r\n returns (bool);\r\n}\r\n" + }, + "contracts/option/interfaces/ITrader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IOption } from \"./IOption.sol\";\r\n\r\ninterface ITrader {\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "contracts/option/libraries/TraderLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Trader Library\r\n * @notice Internal functions that can be used to safeTransfer\r\n * tokens into the option contract then call respective option contract functions.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary TraderLib {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n /**\r\n * @dev Conducts important safety checks to safely mint option tokens.\r\n * @param optionToken The address of the option token to mint.\r\n * @param mintQuantity The quantity of option tokens to mint.\r\n * @param receiver The address which receives the minted option tokens.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(mintQuantity > 0, \"ERR_ZERO\");\r\n IERC20(optionToken.getUnderlyingTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n mintQuantity\r\n );\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(exerciseQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.getStrikeTokenAddress()).balanceOf(msg.sender) >=\r\n inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n IERC20(optionToken.getStrikeTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inputRedeems = outputStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) internal returns (uint256) {\r\n require(redeemQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n // There can be the case there is no available strikes to redeem, causing a revert.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(receiver);\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n require(closeQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned. (What we mean by Implicit).\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens are sent to the receiver address and the redeemTokens are burned.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Checks\r\n require(unwindQuantity > 0, \"ERR_ZERO\");\r\n // solhint-disable-next-line not-rely-on-time\r\n require(\r\n optionToken.getExpiryTime() < block.timestamp,\r\n \"ERR_NOT_EXPIRED\"\r\n );\r\n\r\n // Calculate amount of redeems required\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/connectors/WETH/IWethConnector.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\n\r\ninterface IWethConnector {\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\ncontract ReentrancyGuard {\n bool private _notEntered;\n\n constructor () internal {\n // Storing an initial non-zero value makes deployment a bit more\n // expensive, but in exchange the refund on every call to nonReentrant\n // will be lower in amount. Since refunds are capped to a percetange of\n // the total transaction's gas, it is best to keep them low in cases\n // like this one, to increase the likelihood of the full refund coming\n // into effect.\n _notEntered = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _notEntered = false;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _notEntered = true;\n }\n}\n" + }, + "contracts/connectors/WETH/IWETH.sol": { + "content": "pragma solidity >=0.5.0;\r\n\r\ninterface IWETH {\r\n function deposit() external payable;\r\n\r\n function transfer(address to, uint256 value) external returns (bool);\r\n\r\n function withdraw(uint256) external;\r\n}\r\n" + }, + "contracts/connectors/WETH/WethConnector.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Weth Connector for bridging ether to WETH Primitive options.\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * Manages operations involving options with WETH as the underlying or strike asset.\r\n * Accepts deposits in ethers and withdraws ethers.\r\n * @author Primitive\r\n */\r\n\r\n// WETH Interface\r\nimport { IWETH } from \"./IWETH.sol\";\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { TraderLib } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector } from \"./IWethConnector.sol\";\r\n// Open Zeppelin\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract WethConnector is IWethConnector, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n IWETH public weth;\r\n\r\n event WethConnectorMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event WethConnectorExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event WethConnectorRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event WethConnectorClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event WethConnectorUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n /**\r\n * @dev Checks the quantity of an operation to make sure its not zero. Fails early.\r\n */\r\n modifier nonZero(uint256 quantity) {\r\n require(quantity > 0, \"ERR_ZERO\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Since the WethConnector contract is responsible for converting between ethers and WETH,\r\n * the contract is initialized with the address for WETH.\r\n */\r\n constructor(address payable _weth) public {\r\n weth = IWETH(_weth);\r\n }\r\n\r\n /**\r\n * @dev If ether is sent to this contract through a normal transaction, it will fail, unless\r\n * it was the WETH contract who sent it.\r\n */\r\n receive() external payable {\r\n assert(msg.sender == address(weth));\r\n }\r\n\r\n // ==== Operation Functions ====\r\n\r\n /**\r\n * @dev Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.\r\n * @notice This function is for options that have WETH as the underlying asset.\r\n * @param optionToken The address of the option token to mint.\r\n * @param receiver The address which receives the minted option and redeem tokens.\r\n */\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n // Check to make sure we are minting a WETH call option.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Convert ethers into WETH, then send WETH to option contract in preparation of calling mintOptions().\r\n _depositEthSendWeth(address(optionToken));\r\n\r\n // Mint the option and redeem tokens.\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n\r\n emit WethConnectorMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\r\n * @notice This function is for options with WETH as the strike asset.\r\n * Burns option tokens, accepts ethers, and pushes out underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n // Require one of the option's assets to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n uint256 inputStrikes = msg.value;\r\n // Calculate quantity of optionTokens needed to burn.\r\n // An ether put option with strike price $300 has a \"base\" value of 300, and a \"quote\" value of 1.\r\n // To calculate how many options are needed to be burned, we need to cancel out the \"quote\" units.\r\n // The input strike quantity can be multiplied by the strike ratio to cancel out \"quote\" units.\r\n // 1 ether (quote units) * 300 (base units) / 1 (quote units) = 300 inputOptions\r\n uint256 inputOptions = inputStrikes.mul(optionToken.getBaseValue()).div(\r\n optionToken.getQuoteValue()\r\n );\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= inputOptions,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Wrap the ethers into WETH, and send the WETH to the option contract to prepare for calling exerciseOptions().\r\n _depositEthSendWeth(address(optionToken));\r\n\r\n // Send the option tokens required to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n\r\n // Burns the transferred option tokens, stores the strike asset (ether), and pushes underlyingTokens\r\n // to the receiver address.\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n inputOptions,\r\n new bytes(0)\r\n );\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * Burns option tokens, pulls strikeTokens, and pushes out ethers.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(exerciseQuantity)\r\n returns (uint256, uint256)\r\n {\r\n // Require one of the option's assets to be WETH.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(underlyingAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fails early if msg.sender does not have enough optionTokens.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fails early if msg.sender does not have enough strikeTokens.\r\n require(\r\n IERC20(strikeAddress).balanceOf(msg.sender) >= inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n\r\n // Send strikeTokens to option contract to prepare for calling exerciseOptions().\r\n IERC20(strikeAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n\r\n // Send the option tokens to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n // Burns the optionTokens sent, stores the strikeTokens sent, and pushes underlyingTokens\r\n // to this contract.\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n address(this),\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n\r\n // Converts the withdrawn WETH to ethers, then sends the ethers to the receiver address.\r\n _withdrawEthAndSend(receiver, exerciseQuantity);\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\r\n * @notice This function is for options that have WETH as the strike asset.\r\n * Converts WETH to ethers, and withdraws ethers to the receiver address.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity The quantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant nonZero(redeemQuantity) returns (uint256) {\r\n // Require strikeToken to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens.\r\n address redeemAddress = optionToken.redeemToken();\r\n require(\r\n IERC20(redeemAddress).balanceOf(msg.sender) >= redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeemTokens to option contract in preparation for calling redeemStrikeTokens().\r\n IERC20(redeemAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n\r\n // If options have not been exercised, there will be no strikeTokens to redeem, causing a revert.\r\n // Burns the redeem tokens that were sent to the contract, and withdraws the same quantity of WETH.\r\n // Sends the withdrawn WETH to this contract, so that it can be unwrapped prior to being sent to receiver.\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(address(this));\r\n\r\n // Unwrap the redeemed WETH and then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, redeemQuantity);\r\n\r\n emit WethConnectorRedeem(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * WETH underlyingTokens are converted to ethers before being sent to receiver.\r\n * The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(closeQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early is msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem and option tokens in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n // Call the closeOptions() function to burn option and redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, closeQuantity);\r\n\r\n emit WethConnectorClose(msg.sender, address(optionToken), inputOptions);\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options.\r\n * This function is for options with WETH as the underlying asset.\r\n * The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(unwindQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // If the option is not expired, fail early.\r\n // solhint-disable-next-line not-rely-on-time\r\n require(optionToken.getExpiryTime() < now, \"ERR_NOT_EXPIRED\");\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n // Call the closeOptions() function to burn redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them to ethers then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, unwindQuantity);\r\n\r\n emit WethConnectorUnwind(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n // ==== WETH Operations ====\r\n\r\n /**\r\n * @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to \"to\".\r\n * @param to The address to send WETH ERC-20 tokens to.\r\n */\r\n function _depositEthSendWeth(address to) internal {\r\n // Deposit the ethers received from msg.value into the WETH contract.\r\n weth.deposit.value(msg.value)();\r\n\r\n // Send WETH.\r\n weth.transfer(to, msg.value);\r\n }\r\n\r\n /**\r\n * @dev Unwraps WETH to withrdaw ethers, which are then sent to the \"to\" address.\r\n * @param to The address to send withdrawn ethers to.\r\n * @param quantity The quantity of WETH to unwrap.\r\n */\r\n function _withdrawEthAndSend(address to, uint256 quantity) internal {\r\n // Withdraw ethers with weth.\r\n weth.withdraw(quantity);\r\n\r\n // Send ether.\r\n (bool success, ) = to.call.value(quantity)(\"\");\r\n\r\n // Revert is call is unsuccessful.\r\n require(success, \"ERR_SENDING_ETHER\");\r\n }\r\n}\r\n" + }, + "contracts/option/applications/factories/OptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Factory for deploying option contracts.\r\n * @author Primitive\r\n */\r\n\r\nimport { Option, SafeMath } from \"../../primitives/Option.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { OptionTemplateLib } from \"../../libraries/OptionTemplateLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { IOptionFactory } from \"../../interfaces/IOptionFactory.sol\";\r\n\r\ncontract OptionFactory is IOptionFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override optionTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the bytecode for the Option contract.\r\n */\r\n function deployOptionTemplate() public override {\r\n optionTemplate = OptionTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a create2 clone of the option template contract.\r\n * @param underlyingToken The address of the underlying ERC-20 token.\r\n * @param strikeToken The address of the strike ERC-20 token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp for option expiry.\r\n */\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override onlyOwner returns (address) {\r\n require(optionTemplate != address(0x0), \"ERR_NO_DEPLOYED_TEMPLATE\");\r\n\r\n // Calculates the salt for create2.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n\r\n // Deploys the clone using the template contract and calculated salt.\r\n address optionAddress = CloneLib.create2Clone(\r\n optionTemplate,\r\n uint256(salt)\r\n );\r\n\r\n // Sets the initial state of the option with the parameter arguments.\r\n Option(optionAddress).initialize(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Only the factory can call the initRedeemToken function to set the redeem token address.\r\n * This function is only callable by the Registry contract (the owner).\r\n */\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n Option(optionAddress).initRedeemToken(redeemAddress);\r\n }\r\n\r\n /**\r\n * @dev Calculates the option token's address using the five option parameters.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override view returns (address) {\r\n // Calculates the salt using the parameter arguments and the salt used in the template contract\r\n // create2 deployment.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n address optionAddress = CloneLib.deriveInstanceAddress(\r\n optionTemplate,\r\n salt\r\n );\r\n return optionAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Option.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Vanilla Option Token\r\n * @notice This is a low-level contract that is designed to be interacted with by\r\n * other sophisticated smart contracts which have important safety checks,\r\n * and not by externally owned accounts.\r\n * Incorrect usage through direct interaction from externally owned accounts\r\n * can lead to the loss of funds.\r\n * Use Primitive's Trader.sol contract to interact with this contract safely.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { IFlash } from \"../interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\ncontract Option is IOption, ERC20 {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n struct OptionParameters {\r\n address underlyingToken;\r\n address strikeToken;\r\n uint256 base;\r\n uint256 quote;\r\n uint256 expiry;\r\n }\r\n\r\n OptionParameters public optionParameters;\r\n\r\n // solhint-disable-next-line const-name-snakecase\r\n uint256 public override underlyingCache;\r\n uint256 public override strikeCache;\r\n address public override redeemToken;\r\n address public override factory;\r\n bool private _notEntered;\r\n\r\n string public constant name = \"Primitive V1 Option\";\r\n string public constant symbol = \"PRM\";\r\n uint8 public constant decimals = 18;\r\n\r\n event Mint(address indexed from, uint256 outOptions, uint256 outRedeems);\r\n event Exercise(\r\n address indexed from,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event Redeem(address indexed from, uint256 inRedeems);\r\n event Close(address indexed from, uint256 outUnderlyings);\r\n event UpdatedCacheBalances(uint256 underlyingCache, uint256 strikeCache);\r\n event InitializedRedeem(\r\n address indexed caller,\r\n address indexed redeemToken\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the intial state for the contract. Only called immediately after deployment.\r\n * @param underlyingToken The address of the underlying asset.\r\n * @param strikeToken The address of the strike asset.\r\n * @param base The quantity of underlying tokens per quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per base amount of underlying tokens.\r\n * @param expiry The expiration date for the option.\r\n */\r\n function initialize(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= block.timestamp, \"ERR_EXPIRY\");\r\n factory = msg.sender;\r\n optionParameters = OptionParameters(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n _notEntered = true;\r\n }\r\n\r\n modifier notExpired {\r\n // solhint-disable-next-line not-rely-on-time\r\n require(isNotExpired(), \"ERR_EXPIRED\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Prevents a contract from calling itself, directly or indirectly.\r\n * Calling a `nonReentrant` function from another `nonReentrant`\r\n * function is not supported. It is possible to prevent this from happening\r\n * by making the `nonReentrant` function external, and make it call a\r\n * `private` function that does the actual work.\r\n */\r\n modifier nonReentrant() {\r\n // On the first call to nonReentrant, _notEntered will be true\r\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\r\n\r\n // Any calls to nonReentrant after this point will fail\r\n _notEntered = false;\r\n\r\n _;\r\n\r\n // By storing the original value once again, a refund is triggered (see\r\n // https://eips.ethereum.org/EIPS/eip-2200)\r\n _notEntered = true;\r\n }\r\n\r\n /**\r\n * @dev Called after the option contract is initialized, and a redeem token has been deployed.\r\n * @notice Entangles a redeem token to this option contract permanently.\r\n * @param redeemToken_ The address of the redeem token.\r\n */\r\n function initRedeemToken(address redeemToken_) external override {\r\n require(msg.sender == factory, \"ERR_NOT_OWNER\");\r\n require(redeemToken == address(0x0), \"ERR_REDEEM_INITIALIZED\");\r\n redeemToken = redeemToken_;\r\n emit InitializedRedeem(msg.sender, redeemToken_);\r\n }\r\n\r\n /**\r\n * @dev Updates the cached balances to match the actual current balances.\r\n * Attempting to transfer tokens to this contract directly, in a separate transaction,\r\n * is incorrect and could result in loss of funds. Calling this function will permanently lock any excess\r\n * underlying or strike tokens which were erroneously sent to this contract.\r\n */\r\n function updateCacheBalances() external override nonReentrant {\r\n _updateCacheBalances(\r\n IERC20(optionParameters.underlyingToken).balanceOf(address(this)),\r\n IERC20(optionParameters.strikeToken).balanceOf(address(this))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Sets the cache balances to new values.\r\n */\r\n function _updateCacheBalances(\r\n uint256 underlyingBalance,\r\n uint256 strikeBalance\r\n ) private {\r\n underlyingCache = underlyingBalance;\r\n strikeCache = strikeBalance;\r\n emit UpdatedCacheBalances(underlyingBalance, strikeBalance);\r\n }\r\n\r\n /* === STATE MUTABLE === */\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Mints optionTokens at a 1:1 ratio to underlyingToken deposits. Also mints Redeem tokens at a base:quote ratio.\r\n * @notice inUnderlyings = outOptionTokens. inUnderlying / strike ratio = outRedeemTokens.\r\n * @param receiver The newly minted tokens are sent to the receiver address.\r\n */\r\n function mintOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n notExpired\r\n returns (uint256, uint256)\r\n {\r\n // Save on gas because this variable is used twice.\r\n uint256 underlyingBalance = IERC20(optionParameters.underlyingToken)\r\n .balanceOf(address(this));\r\n\r\n // Mint optionTokens equal to the difference between current and cached balance of underlyingTokens.\r\n uint256 inUnderlyings = underlyingBalance.sub(underlyingCache);\r\n\r\n // Calculate the quantity of redeemTokens to mint.\r\n uint256 outRedeems = inUnderlyings.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n require(outRedeems > 0, \"ERR_ZERO\");\r\n\r\n // Mint the optionTokens and redeemTokens.\r\n IRedeem(redeemToken).mint(receiver, outRedeems);\r\n _mint(receiver, inUnderlyings);\r\n\r\n // Update the underlyingCache.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Mint(msg.sender, inUnderlyings, outRedeems);\r\n return (inUnderlyings, outRedeems);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Sends out underlyingTokens then checks to make sure they are returned or paid for.\r\n * This function enables flash exercises and flash loans. Only smart contracts who implement\r\n * their own IFlash interface should be calling this function to initiate a flash exercise/loan.\r\n * @notice If the underlyingTokens are returned, only the fee has to be paid.\r\n * @param receiver The outUnderlyings are sent to the receiver address.\r\n * @param outUnderlyings Quantity of underlyingTokens to safeTransfer to receiver optimistically.\r\n * @param data Passing in any abritrary data will trigger the flash exercise callback function.\r\n */\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override nonReentrant notExpired returns (uint256, uint256) {\r\n // Store the cached balances and token addresses in memory.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n //(uint256 _underlyingCache, uint256 _strikeCache) = getCacheBalances();\r\n\r\n // Require outUnderlyings > 0 and balance of underlyings >= outUnderlyings.\r\n require(outUnderlyings > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(underlyingToken).balanceOf(address(this)) >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Optimistically safeTransfer out underlyingTokens.\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n if (data.length > 0)\r\n IFlash(receiver).primitiveFlash(msg.sender, outUnderlyings, data);\r\n\r\n // Store in memory for gas savings.\r\n uint256 strikeBalance = IERC20(optionParameters.strikeToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n\r\n // Calculate the differences.\r\n uint256 inStrikes = strikeBalance.sub(strikeCache);\r\n uint256 inUnderlyings = underlyingBalance.sub(\r\n underlyingCache.sub(outUnderlyings)\r\n ); // will be > 0 if underlyingTokens are returned.\r\n\r\n // Either underlyingTokens or strikeTokens must be sent into the contract.\r\n require(inStrikes > 0 || inUnderlyings > 0, \"ERR_ZERO\");\r\n\r\n // Calculate the remaining amount of underlyingToken that needs to be paid for.\r\n uint256 remainder = inUnderlyings > outUnderlyings\r\n ? 0\r\n : outUnderlyings.sub(inUnderlyings);\r\n\r\n // Calculate the expected payment of strikeTokens.\r\n uint256 payment = remainder.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n\r\n // Assumes the cached optionToken balance is 0, which is what it should be.\r\n uint256 inOptions = balanceOf(address(this));\r\n\r\n // Enforce the invariants.\r\n require(inStrikes >= payment, \"ERR_STRIKES_INPUT\");\r\n require(inOptions >= remainder, \"ERR_OPTIONS_INPUT\");\r\n\r\n // Burn the optionTokens at a 1:1 ratio to outUnderlyings.\r\n _burn(address(this), inOptions);\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeBalance);\r\n emit Exercise(msg.sender, outUnderlyings, inStrikes);\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Burns redeemTokens to withdraw strikeTokens at a ratio of 1:1.\r\n * @notice inRedeemTokens = outStrikeTokens. Only callable when strikeTokens are in the contract.\r\n * @param receiver The inRedeems quantity of strikeTokens are sent to the receiver address.\r\n */\r\n function redeemStrikeTokens(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (uint256)\r\n {\r\n address strikeToken = optionParameters.strikeToken;\r\n address _redeemToken = redeemToken;\r\n uint256 strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // Difference between redeemTokens balance and cache.\r\n require(inRedeems > 0, \"ERR_ZERO\");\r\n require(strikeBalance >= inRedeems, \"ERR_BAL_STRIKE\");\r\n\r\n // Burn redeemTokens in the contract. Send strikeTokens to receiver.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(strikeToken).safeTransfer(receiver, inRedeems);\r\n\r\n // Current balances.\r\n strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingCache, strikeBalance);\r\n emit Redeem(msg.sender, inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * If the option has expired, burn redeem tokens to withdraw underlying tokens.\r\n * If the option is not expired, burn option and redeem tokens to withdraw underlying tokens.\r\n * @notice inRedeemTokens / strike ratio = outUnderlyingTokens && inOptionTokens >= outUnderlyingTokens.\r\n * @param receiver The outUnderlyingTokens are sent to the receiver address.\r\n */\r\n function closeOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Stores addresses and balances locally for gas savings.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n address _redeemToken = redeemToken;\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 optionBalance = balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // The quantity of underlyingToken to send out it still determined by the quantity of inRedeems.\r\n // inRedeems is in units of strikeTokens, which is converted to underlyingTokens\r\n // by multiplying inRedeems by the strike ratio, which is base / quote.\r\n // This outUnderlyings quantity is checked against inOptions.\r\n // inOptions must be greater than or equal to outUnderlyings (1 option burned per 1 underlying purchased).\r\n // optionBalance must be greater than or equal to outUnderlyings.\r\n // Neither inRedeems or inOptions can be zero.\r\n uint256 outUnderlyings = inRedeems.mul(optionParameters.base).div(\r\n optionParameters.quote\r\n );\r\n\r\n // Assumes the cached balance is 0 so inOptions = balance of optionToken.\r\n // If optionToken is expired, optionToken does not need to be sent in. Only redeemToken.\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 inOptions = isNotExpired() ? optionBalance : outUnderlyings;\r\n require(inRedeems > 0 && inOptions > 0, \"ERR_ZERO\");\r\n require(\r\n inOptions >= outUnderlyings && underlyingBalance >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Burn optionTokens. optionTokens are only sent into contract when not expired.\r\n // solhint-disable-next-line not-rely-on-time\r\n if (isNotExpired()) {\r\n _burn(address(this), inOptions);\r\n }\r\n\r\n // Send underlyingTokens to user.\r\n // Burn redeemTokens held in the contract.\r\n // User does not receive extra underlyingTokens if there was extra optionTokens in the contract.\r\n // User receives outUnderlyings proportional to inRedeems.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n\r\n // Current balances of underlyingToken and redeemToken.\r\n underlyingBalance = IERC20(underlyingToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Close(msg.sender, outUnderlyings);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /* === VIEW === */\r\n\r\n /**\r\n * @dev Returns the previously saved balances of underlying and strike tokens.\r\n */\r\n function getCacheBalances()\r\n public\r\n override\r\n view\r\n returns (uint256, uint256)\r\n {\r\n return (underlyingCache, strikeCache);\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying, strike, and redeem token addresses.\r\n */\r\n function getAssetAddresses()\r\n public\r\n override\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n )\r\n {\r\n return (\r\n optionParameters.underlyingToken,\r\n optionParameters.strikeToken,\r\n redeemToken\r\n );\r\n }\r\n\r\n /**\r\n * @dev Returns the strike token address.\r\n */\r\n function getStrikeTokenAddress() public override view returns (address) {\r\n return optionParameters.strikeToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying token address.\r\n */\r\n function getUnderlyingTokenAddress()\r\n public\r\n override\r\n view\r\n returns (address)\r\n {\r\n return optionParameters.underlyingToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the base value option parameter.\r\n */\r\n function getBaseValue() public override view returns (uint256) {\r\n return optionParameters.base;\r\n }\r\n\r\n /**\r\n * @dev Returns the quote value option parameter.\r\n */\r\n function getQuoteValue() public override view returns (uint256) {\r\n return optionParameters.quote;\r\n }\r\n\r\n /**\r\n * @dev Returns the expiry timestamp option parameter.\r\n */\r\n function getExpiryTime() public override view returns (uint256) {\r\n return optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the option parameters and redeem token address.\r\n */\r\n function getParameters()\r\n public\r\n override\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n )\r\n {\r\n OptionParameters memory _optionParameters = optionParameters;\r\n _underlyingToken = _optionParameters.underlyingToken;\r\n _strikeToken = _optionParameters.strikeToken;\r\n _redeemToken = redeemToken;\r\n _base = _optionParameters.base;\r\n _quote = _optionParameters.quote;\r\n _expiry = _optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Internal function to check if the option is expired.\r\n */\r\n function isNotExpired() internal view returns (bool) {\r\n return optionParameters.expiry >= block.timestamp;\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IRedeem is IERC20 {\r\n function optionToken() external view returns (address);\r\n\r\n function factory() external view returns (address);\r\n\r\n function mint(address user, uint256 amount) external;\r\n\r\n function burn(address user, uint256 amount) external;\r\n\r\n function initialize(address _factory, address _optionToken) external;\r\n}\r\n" + }, + "contracts/option/interfaces/IFlash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IFlash {\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external;\r\n}\r\n" + }, + "contracts/option/primitives/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @dev Modifies name, symbol, and decimals by deleting them. Implemented as constants in parent contract.\r\n */\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\n/**\r\n * @dev Implementation of the {IERC20} interface.\r\n *\r\n * This implementation is agnostic to the way tokens are created. This means\r\n * that a supply mechanism has to be added in a derived contract using {_mint}.\r\n * For a generic mechanism see {ERC20PresetMinterPauser}.\r\n *\r\n * TIP: For a detailed writeup see our guide\r\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\r\n * to implement supply mechanisms].\r\n *\r\n * We have followed general OpenZeppelin guidelines: functions revert instead\r\n * of returning `false` on failure. This behavior is nonetheless conventional\r\n * and does not conflict with the expectations of ERC20 applications.\r\n *\r\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\r\n * This allows applications to reconstruct the allowance for all accounts just\r\n * by listening to said events. Other implementations of the EIP may not emit\r\n * these events, as it isn't required by the specification.\r\n *\r\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\r\n * functions have been added to mitigate the well-known issues around setting\r\n * allowances. See {IERC20-approve}.\r\n */\r\ncontract ERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n /**\r\n * @dev See {IERC20-totalSupply}.\r\n */\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-balanceOf}.\r\n */\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transfer}.\r\n *\r\n * Requirements:\r\n *\r\n * - `recipient` cannot be the zero address.\r\n * - the caller must have a balance of at least `amount`.\r\n */\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-allowance}.\r\n */\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-approve}.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transferFrom}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance. This is not\r\n * required by the EIP. See the note at the beginning of {ERC20};\r\n *\r\n * Requirements:\r\n * - `sender` and `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n * - the caller must have allowance for ``sender``'s tokens of at least\r\n * `amount`.\r\n */\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override returns (bool) {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically increases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n * - `spender` must have allowance for the caller of at least\r\n * `subtractedValue`.\r\n */\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Moves tokens `amount` from `sender` to `recipient`.\r\n *\r\n * This is internal function is equivalent to {transfer}, and can be used to\r\n * e.g. implement automatic token fees, slashing mechanisms, etc.\r\n *\r\n * Emits a {Transfer} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `sender` cannot be the zero address.\r\n * - `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n */\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\r\n * the total supply.\r\n *\r\n * Emits a {Transfer} event with `from` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `to` cannot be the zero address.\r\n */\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n /**\r\n * @dev Destroys `amount` tokens from `account`, reducing the\r\n * total supply.\r\n *\r\n * Emits a {Transfer} event with `to` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `account` cannot be the zero address.\r\n * - `account` must have at least `amount` tokens.\r\n */\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n /**\r\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\r\n *\r\n * This is internal function is equivalent to `approve`, and can be used to\r\n * e.g. set automatic allowances for certain subsystems, etc.\r\n *\r\n * Emits an {Approval} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `owner` cannot be the zero address.\r\n * - `spender` cannot be the zero address.\r\n */\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n /**\r\n * @dev Sets {decimals} to a value other than the default one of 18.\r\n *\r\n * WARNING: This function should only be called from the constructor. Most\r\n * applications that interact with token contracts will not expect\r\n * {decimals} to ever change, and may work incorrectly if it does.\r\n */\r\n /* function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n } */\r\n\r\n // ======= WARNING: ADDED FUNCTIONS =========\r\n\r\n /* function _setupName(string memory name_) internal {\r\n _name = name_;\r\n }\r\n\r\n function _setupSymbol(string memory symbol_) internal {\r\n _symbol = symbol_;\r\n } */\r\n\r\n // ======= END ADDED FUNCTIONS =========\r\n\r\n /**\r\n * @dev Hook that is called before any transfer of tokens. This includes\r\n * minting and burning.\r\n *\r\n * Calling conditions:\r\n *\r\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\r\n * will be to transferred to `to`.\r\n * - when `from` is zero, `amount` tokens will be minted for `to`.\r\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\r\n * - `from` and `to` are never both zero.\r\n *\r\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r\n */\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {}\r\n}\r\n" + }, + "contracts/option/libraries/OptionTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Option } from \"../primitives/Option.sol\";\r\n\r\nlibrary OptionTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _OPTION_SALT = 0x56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd87; // keccak(\"primitive-option\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function OPTION_SALT() internal pure returns (bytes32) {\r\n return _OPTION_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Option.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Option).creationCode;\r\n implementationAddress = Create2.deploy(0, _OPTION_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Create2.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address) {\n address addr;\n require(address(this).balance >= amount, \"Create2: insufficient balance\");\n require(bytecode.length != 0, \"Create2: bytecode length is zero\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), \"Create2: Failed on deploy\");\n return addr;\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address) {\n bytes32 _data = keccak256(\n abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)\n );\n return address(bytes20(_data << 96));\n }\n}\n" + }, + "contracts/option/applications/NullCloneConstructor.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ncontract NullCloneConstructor {\r\n // solhint-disable-next-line no-empty-blocks\r\n function cloneConstructor(bytes memory consData) public {\r\n // blank\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/CloneLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @title Create2 Clone Factory Library\r\n * @author Alan Lu, Gnosis.\r\n * Raymond Pulver IV.\r\n */\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\n\r\nlibrary CloneLib {\r\n /**\r\n * @dev Calls internal creation computation function.\r\n */\r\n function computeCreationCode(address target)\r\n internal\r\n view\r\n returns (bytes memory clone)\r\n {\r\n clone = computeCreationCode(address(this), target);\r\n }\r\n\r\n /**\r\n * @dev Computes the Clone's creation code.\r\n */\r\n function computeCreationCode(address deployer, address target)\r\n internal\r\n pure\r\n returns (bytes memory clone)\r\n {\r\n bytes memory consData = abi.encodeWithSignature(\r\n \"cloneConstructor(bytes)\",\r\n new bytes(0)\r\n );\r\n clone = new bytes(99 + consData.length);\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n mstore(\r\n add(clone, 0x20),\r\n 0x3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe\r\n )\r\n mstore(\r\n add(clone, 0x2d),\r\n mul(deployer, 0x01000000000000000000000000)\r\n )\r\n mstore(\r\n add(clone, 0x41),\r\n 0x5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be\r\n )\r\n mstore(add(clone, 0x60), mul(target, 0x01000000000000000000000000))\r\n mstore(\r\n add(clone, 116),\r\n 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000\r\n )\r\n }\r\n for (uint256 i = 0; i < consData.length; i++) {\r\n clone[i + 99] = consData[i];\r\n }\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(address target, bytes32 salt)\r\n internal\r\n view\r\n returns (address)\r\n {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(target))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(\r\n address from,\r\n address target,\r\n bytes32 salt\r\n ) internal pure returns (address) {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(from, target)),\r\n from\r\n );\r\n }\r\n\r\n /**\r\n * @dev Computs creation code, and then instantiates it with create2.\r\n */\r\n function create2Clone(address target, uint256 saltNonce)\r\n internal\r\n returns (address result)\r\n {\r\n bytes memory clone = computeCreationCode(target);\r\n bytes32 salt = bytes32(saltNonce);\r\n\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n let len := mload(clone)\r\n let data := add(clone, 0x20)\r\n result := create2(0, data, len, salt)\r\n }\r\n\r\n require(result != address(0), \"ERR_CREATE2_FAIL\");\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IOptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IOptionFactory {\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external;\r\n\r\n function deployOptionTemplate() external;\r\n\r\n function optionTemplate() external returns (address);\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n}\r\n" + }, + "contracts/option/applications/factories/RedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Factory Contract for Redeem Tokens.\r\n * @notice Uses cloning technology on a deployed template contract.\r\n * @author Primitive\r\n */\r\n\r\nimport { Redeem, SafeMath } from \"../../primitives/Redeem.sol\";\r\nimport { RedeemTemplateLib } from \"../../libraries/RedeemTemplateLib.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { IRedeemFactory } from \"../../interfaces/IRedeemFactory.sol\";\r\n\r\ncontract RedeemFactory is IRedeemFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override redeemTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the full bytecode of the Redeem contract to be used as a template for clones.\r\n */\r\n function deployRedeemTemplate() public override {\r\n redeemTemplate = RedeemTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a cloned instance of the template Redeem contract.\r\n * @param optionToken The address of the option token which this redeem clone will be paired with.\r\n * @return redeemAddress The address of the deployed Redeem token clone.\r\n */\r\n function deployClone(address optionToken)\r\n external\r\n override\r\n onlyOwner\r\n returns (address)\r\n {\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n RedeemTemplateLib.REDEEM_SALT(),\r\n owner(),\r\n optionToken\r\n )\r\n );\r\n address redeemAddress = CloneLib.create2Clone(\r\n redeemTemplate,\r\n uint256(salt)\r\n );\r\n Redeem(redeemAddress).initialize(owner(), optionToken);\r\n return redeemAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Redeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Redeem Token\r\n * @notice A token that is redeemable for it's paird option token's assets.\r\n * @author Primitive\r\n */\r\n\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Redeem is IRedeem, ERC20 {\r\n using SafeMath for uint256;\r\n\r\n address public override factory;\r\n address public override optionToken;\r\n\r\n string public constant name = \"Primitive V1 Redeem\";\r\n string public constant symbol = \"RDM\";\r\n uint8 public constant decimals = 18;\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the initial state for the redeem token. Called only once and immediately after deployment.\r\n * @param factory_ The address of the factory contract which handles the deployment.\r\n * @param optionToken_ The address of the option token which this redeem token will be paired with.\r\n */\r\n function initialize(address factory_, address optionToken_)\r\n public\r\n override\r\n {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n factory = factory_;\r\n optionToken = optionToken_;\r\n }\r\n\r\n /**\r\n * @dev Mints redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to mint redeem tokens to.\r\n * @param amount The quantity of redeem tokens to mint.\r\n */\r\n function mint(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _mint(to, amount);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to burn redeem tokens from.\r\n * @param amount The quantity of redeem tokens to burn.\r\n */\r\n function burn(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _burn(to, amount);\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/RedeemTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Redeem } from \"../primitives/Redeem.sol\";\r\n\r\nlibrary RedeemTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _REDEEM_SALT = 0xe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e2; // keccak(\"primitive-redeem\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function REDEEM_SALT() internal pure returns (bytes32) {\r\n return _REDEEM_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Redeem.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Redeem).creationCode;\r\n implementationAddress = Create2.deploy(0, _REDEEM_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRedeemFactory {\r\n function deployClone(address optionToken) external returns (address);\r\n\r\n function deployRedeemTemplate() external;\r\n\r\n function redeemTemplate() external returns (address);\r\n}\r\n" + }, + "contracts/option/applications/Registry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Registry Contract for Deployed Options.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../interfaces/IRegistry.sol\";\r\nimport { IOptionFactory } from \"../interfaces/IOptionFactory.sol\";\r\nimport { IRedeemFactory } from \"../interfaces/IRedeemFactory.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { Pausable } from \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Registry is IRegistry, Ownable, Pausable, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address public override optionFactory;\r\n address public override redeemFactory;\r\n\r\n mapping(address => bool) private verifiedTokens;\r\n mapping(uint256 => bool) private verifiedExpiries;\r\n address[] public allOptionClones;\r\n\r\n event UpdatedOptionFactory(address indexed optionFactory_);\r\n event UpdatedRedeemFactory(address indexed redeemFactory_);\r\n event VerifiedToken(address indexed token);\r\n event VerifiedExpiry(uint256 expiry);\r\n event UnverifiedToken(address indexed token);\r\n event UnverifiedExpiry(uint256 expiry);\r\n event DeployedOptionClone(\r\n address indexed from,\r\n address indexed optionAddress,\r\n address indexed redeemAddress\r\n );\r\n\r\n constructor() public {\r\n transferOwnership(msg.sender);\r\n }\r\n\r\n /**\r\n * @dev Pauses the deployOption function.\r\n */\r\n function pauseDeployments() external override onlyOwner {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @dev Unpauses the deployOption function.\r\n */\r\n function unpauseDeployments() external override onlyOwner {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @dev Sets the option factory contract to use for deploying clones.\r\n * @param optionFactory_ The address of the option factory.\r\n */\r\n function setOptionFactory(address optionFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n optionFactory = optionFactory_;\r\n emit UpdatedOptionFactory(optionFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the redeem factory contract to use for deploying clones.\r\n * @param redeemFactory_ The address of the redeem factory.\r\n */\r\n function setRedeemFactory(address redeemFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n redeemFactory = redeemFactory_;\r\n emit UpdatedRedeemFactory(redeemFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets an ERC-20 token verification status to true.\r\n * @notice A \"verified\" token is a standard ERC-20 token that we have tested with the option contract.\r\n * An example of an \"unverified\" token is a non-standard ERC-20 token which has not been tested.\r\n */\r\n function verifyToken(address tokenAddress) external override onlyOwner {\r\n require(tokenAddress != address(0x0), \"ERR_ZERO_ADDRESS\");\r\n verifiedTokens[tokenAddress] = true;\r\n emit VerifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets a verified token's verification status to false.\r\n */\r\n function unverifyToken(address tokenAddress) external override onlyOwner {\r\n verifiedTokens[tokenAddress] = false;\r\n emit UnverifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to true.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function verifyExpiry(uint256 expiry) external override onlyOwner {\r\n require(expiry >= now, \"ERR_EXPIRED_TIMESTAMP\");\r\n verifiedExpiries[expiry] = true;\r\n emit VerifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to false.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function unverifyExpiry(uint256 expiry) external override onlyOwner {\r\n verifiedExpiries[expiry] = false;\r\n emit UnverifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Deploys an option contract clone with create2.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the deployed option clone.\r\n */\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override nonReentrant whenNotPaused returns (address) {\r\n // Validation checks for option parameters.\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= now, \"ERR_EXPIRY\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(\r\n underlyingToken != address(0x0) && strikeToken != address(0x0),\r\n \"ERR_ZERO_ADDRESS\"\r\n );\r\n\r\n // Deploy option and redeem contract clones.\r\n address optionAddress = IOptionFactory(optionFactory).deployClone(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n address redeemAddress = IRedeemFactory(redeemFactory).deployClone(\r\n optionAddress\r\n );\r\n\r\n // Add the clone to the allOptionClones address array.\r\n allOptionClones.push(optionAddress);\r\n\r\n // Initialize the new option contract's paired redeem token.\r\n IOptionFactory(optionFactory).initRedeemToken(\r\n optionAddress,\r\n redeemAddress\r\n );\r\n emit DeployedOptionClone(msg.sender, optionAddress, redeemAddress);\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Calculates the option address deployed with create2 using the parameter arguments.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = IOptionFactory(optionFactory)\r\n .calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Checks an option address to see if it has verified assets and expiry time.\r\n * @param optionAddress The address of the option token.\r\n * @return bool If the option has verified underlying and strike tokens, and expiry time.\r\n */\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n override\r\n view\r\n returns (bool)\r\n {\r\n IOption option = IOption(optionAddress);\r\n address underlyingToken = option.getUnderlyingTokenAddress();\r\n address strikeToken = option.getStrikeTokenAddress();\r\n uint256 expiry = option.getExpiryTime();\r\n bool verifiedUnderlying = isVerifiedToken(underlyingToken);\r\n bool verifiedStrike = isVerifiedToken(strikeToken);\r\n bool verifiedExpiry = isVerifiedExpiry(expiry);\r\n return verifiedUnderlying && verifiedStrike && verifiedExpiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the length of the allOptionClones address array.\r\n */\r\n function getAllOptionClonesLength() public view returns (uint256) {\r\n return allOptionClones.length;\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedTokens private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedToken(address tokenAddress) public view returns (bool) {\r\n return verifiedTokens[tokenAddress];\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedExpiries private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedExpiry(uint256 expiry) public view returns (bool) {\r\n return verifiedExpiries[expiry];\r\n }\r\n\r\n /**\r\n * @dev Gets the option address and returns address zero if not yet deployed.\r\n * @notice Will calculate the option address using the parameter arguments.\r\n * Checks the code size of the address to see if the contract has been deployed yet.\r\n * If contract has not been deployed, returns address zero.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n uint32 size = checkCodeSize(optionAddress);\r\n if (size > 0) {\r\n return optionAddress;\r\n } else {\r\n return address(0x0);\r\n }\r\n }\r\n\r\n /**\r\n * @dev Checks the code size of a target address and returns the uint32 size.\r\n * @param target The address to check code size.\r\n */\r\n function checkCodeSize(address target) private view returns (uint32) {\r\n uint32 size;\r\n assembly {\r\n size := extcodesize(target)\r\n }\r\n return size;\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Pausable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\ncontract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor () internal {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n */\n modifier whenNotPaused() {\n require(!_paused, \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n */\n modifier whenPaused() {\n require(_paused, \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "contracts/option/extensions/Trader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Trader\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { ITrader } from \"../interfaces/ITrader.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { TraderLib } from \"../libraries/TraderLib.sol\";\r\n\r\ncontract Trader is ITrader, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address payable public weth;\r\n\r\n event TraderMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event TraderExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event TraderRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event TraderClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event TraderUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n constructor(address payable _weth) public {\r\n weth = _weth;\r\n }\r\n\r\n /**\r\n * @dev Mint options at a 1:1 ratio with deposited underlying tokens.\r\n * @notice Also mints redeems at a strike ratio to the deposited underlyings.\r\n * Warning: Calls msg.sender with safeTransferFrom.\r\n * @param optionToken The address of the option contract.\r\n * @param mintQuantity Quantity of options to mint and underlyingToken to deposit.\r\n * @param receiver The newly minted options and redeems are sent to the receiver address.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n mintQuantity,\r\n receiver\r\n );\r\n emit TraderMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 inStrikes, uint256 inOptions) = TraderLib.safeExercise(\r\n optionToken,\r\n exerciseQuantity,\r\n receiver\r\n );\r\n emit TraderExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inStrikes\r\n );\r\n\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inRedeems = outStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256) {\r\n uint256 inRedeems = TraderLib.safeRedeem(\r\n optionToken,\r\n redeemQuantity,\r\n receiver\r\n );\r\n emit TraderRedeem(msg.sender, address(optionToken), inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inOptions = inRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeClose(optionToken, closeQuantity, receiver);\r\n emit TraderClose(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens and redeemTokens are sent to the receiver address.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeUnwind(optionToken, unwindQuantity, receiver);\r\n emit TraderUnwind(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "contracts/test/Flash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Test Flash Exercise contract\r\n * @author Primitive\r\n */\r\n\r\n/**\r\n * A flash exercise is initiated by the exerciseOptions() function in the Option.sol contract.\r\n * Warning: Only correctly implemented wrapper smart contracts can safely execute these flash features.\r\n * Underlying tokens will be sent to the msg.sender of the exerciseOptions() call first.\r\n * The msg.sender should be a smart contract that implements the IFlash interface, which has a single\r\n * function: primitiveFlash().\r\n * The callback function primitiveFlash() can be triggered by passing in any arbritrary data to the\r\n * exerciseOptions() function. If the length of the data is greater than 0, it triggers the callback.\r\n * The implemented primitiveFlash() callback is where customized operations can be undertaken using the\r\n * underlying tokens received from the flash exercise.\r\n * After the callback function (whether its called or not), the exerciseOptions() function checks to see\r\n * if it has been paid the correct amount of strike and option tokens (an actual exercise of the option),\r\n * or if it has received the same quantity of underlying tokens back (a flash loan).\r\n */\r\n\r\nimport { IOption } from \"../option/interfaces/IOption.sol\";\r\nimport { IFlash } from \"../option/interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\n\r\ncontract Flash is IFlash {\r\n using SafeMath for uint256;\r\n\r\n address public optionToken;\r\n\r\n event FlashExercise(address indexed from);\r\n\r\n constructor(address _optionToken) public {\r\n optionToken = _optionToken;\r\n }\r\n\r\n function goodFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(1)\r\n );\r\n }\r\n\r\n function badFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n // bytes(2) will cause our implemented flash exercise to fail\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(2)\r\n );\r\n }\r\n\r\n /**\r\n * @dev An implemented primitiveFlash callback function that matches the interface in Option.sol.\r\n * @notice Calling the exerciseOptions() function in the Option contract will trigger this callback function.\r\n * @param receiver The account which receives the underlying tokens.\r\n * @param outUnderlyings The quantity of underlying tokens received as a flash loan.\r\n * @param data Any data that will be passed as an argument to the original exerciseOptions() call.\r\n */\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override {\r\n // Get the underlying token address.\r\n address underlyingToken = IOption(optionToken)\r\n .getUnderlyingTokenAddress();\r\n // In our test case we pass in the data param with bytes(1).\r\n bool good = keccak256(abi.encodePacked(data)) ==\r\n keccak256(abi.encodePacked(new bytes(1)));\r\n // If the flash exercise went through, we return the loaned underlyings.\r\n if (good) {\r\n IERC20(underlyingToken).transfer(optionToken, outUnderlyings);\r\n }\r\n emit FlashExercise(receiver);\r\n }\r\n}\r\n" + }, + "contracts/test/OptionTest.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Option test contract.\r\n * @author Primitive\r\n */\r\n\r\nimport \"../option/primitives/Option.sol\";\r\n\r\ncontract OptionTest is Option {\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public Option() {}\r\n\r\n function setExpiry(uint256 expiry) public {\r\n optionParameters.expiry = expiry;\r\n }\r\n\r\n function setRedeemToken(address redeem) public {\r\n redeemToken = redeem;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/BadERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\ninterface IERC20 {\r\n function totalSupply() external view returns (uint256);\r\n\r\n function balanceOf(address account) external view returns (uint256);\r\n\r\n function transfer(address recipient, uint256 amount) external;\r\n\r\n function allowance(address owner, address spender)\r\n external\r\n view\r\n returns (uint256);\r\n\r\n function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) external;\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\ncontract BadERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n string private _name;\r\n string private _symbol;\r\n uint8 private _decimals;\r\n\r\n constructor(string memory name, string memory symbol) public {\r\n _name = name;\r\n _symbol = symbol;\r\n _decimals = 18;\r\n }\r\n\r\n function name() public view returns (string memory) {\r\n return _name;\r\n }\r\n\r\n function symbol() public view returns (string memory) {\r\n return _symbol;\r\n }\r\n\r\n function decimals() public view returns (uint8) {\r\n return _decimals;\r\n }\r\n\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n }\r\n\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n function mint(address account, uint256 amount) public {\r\n _mint(account, amount);\r\n }\r\n\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n }\r\n\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n }\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {\r\n // do nothing\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract TestERC20 is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/WETH9.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\n// Copyright (C) 2015, 2016, 2017 Dapphub\r\n\r\n// This program is free software: you can redistribute it and/or modify\r\n// it under the terms of the GNU General Public License as published by\r\n// the Free Software Foundation, either version 3 of the License, or\r\n// (at your option) any later version.\r\n\r\n// This program is distributed in the hope that it will be useful,\r\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n// GNU General Public License for more details.\r\n\r\n// You should have received a copy of the GNU General Public License\r\n// along with this program. If not, see .\r\n\r\npragma solidity ^0.6.2;\r\n\r\ncontract WETH9 {\r\n string public name = \"Wrapped Ether\";\r\n string public symbol = \"WETH\";\r\n uint8 public decimals = 18;\r\n\r\n event Approval(address indexed src, address indexed guy, uint256 wad);\r\n event Transfer(address indexed src, address indexed dst, uint256 wad);\r\n event Deposit(address indexed dst, uint256 wad);\r\n event Withdrawal(address indexed src, uint256 wad);\r\n\r\n mapping(address => uint256) public balanceOf;\r\n mapping(address => mapping(address => uint256)) public allowance;\r\n\r\n /* function() external payable {\r\n deposit();\r\n } */\r\n function deposit() public payable {\r\n balanceOf[msg.sender] += msg.value;\r\n emit Deposit(msg.sender, msg.value);\r\n }\r\n\r\n function withdraw(uint256 wad) public {\r\n require(balanceOf[msg.sender] >= wad);\r\n balanceOf[msg.sender] -= wad;\r\n msg.sender.transfer(wad);\r\n emit Withdrawal(msg.sender, wad);\r\n }\r\n\r\n function totalSupply() public view returns (uint256) {\r\n return address(this).balance;\r\n }\r\n\r\n function approve(address guy, uint256 wad) public returns (bool) {\r\n allowance[msg.sender][guy] = wad;\r\n emit Approval(msg.sender, guy, wad);\r\n return true;\r\n }\r\n\r\n function transfer(address dst, uint256 wad) public returns (bool) {\r\n return transferFrom(msg.sender, dst, wad);\r\n }\r\n\r\n function transferFrom(\r\n address src,\r\n address dst,\r\n uint256 wad\r\n ) public returns (bool) {\r\n require(balanceOf[src] >= wad);\r\n\r\n if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) {\r\n require(allowance[src][msg.sender] >= wad);\r\n allowance[src][msg.sender] -= wad;\r\n }\r\n\r\n balanceOf[src] -= wad;\r\n balanceOf[dst] += wad;\r\n\r\n emit Transfer(src, dst, wad);\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/*\r\n GNU GENERAL PUBLIC LICENSE\r\n Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. \r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n Preamble\r\n\r\n The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works. By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users. We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors. You can apply it to\r\nyour programs, too.\r\n\r\n When we speak of free software, we are referring to freedom, not\r\nprice. Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights. Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received. You must make sure that they, too, receive\r\nor can get the source code. And you must show them these terms so they\r\nknow their rights.\r\n\r\n Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software. For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so. This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software. The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable. Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts. If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary. To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n TERMS AND CONDITIONS\r\n\r\n 0. Definitions.\r\n\r\n \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n \"The Program\" refers to any copyrightable work licensed under this\r\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy. The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy. Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies. Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License. If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n 1. Source Code.\r\n\r\n The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it. \"Object code\" means any non-source\r\nform of a work.\r\n\r\n A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form. A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities. However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work. For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n 2. Basic Permissions.\r\n\r\n All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met. This License explicitly affirms your unlimited\r\npermission to run the unmodified Program. The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work. This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force. You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright. Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below. Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n 4. Conveying Verbatim Copies.\r\n\r\n You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n 5. Conveying Modified Source Versions.\r\n\r\n You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n a) The work must carry prominent notices stating that you modified\r\n it, and giving a relevant date.\r\n\r\n b) The work must carry prominent notices stating that it is\r\n released under this License and any conditions added under section\r\n 7. This requirement modifies the requirement in section 4 to\r\n \"keep intact all notices\".\r\n\r\n c) You must license the entire work, as a whole, under this\r\n License to anyone who comes into possession of a copy. This\r\n License will therefore apply, along with any applicable section 7\r\n additional terms, to the whole of the work, and all its parts,\r\n regardless of how they are packaged. This License gives no\r\n permission to license the work in any other way, but it does not\r\n invalidate such permission if you have separately received it.\r\n\r\n d) If the work has interactive user interfaces, each must display\r\n Appropriate Legal Notices; however, if the Program has interactive\r\n interfaces that do not display Appropriate Legal Notices, your\r\n work need not make them do so.\r\n\r\n A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit. Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n 6. Conveying Non-Source Forms.\r\n\r\n You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n a) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by the\r\n Corresponding Source fixed on a durable physical medium\r\n customarily used for software interchange.\r\n\r\n b) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by a\r\n written offer, valid for at least three years and valid for as\r\n long as you offer spare parts or customer support for that product\r\n model, to give anyone who possesses the object code either (1) a\r\n copy of the Corresponding Source for all the software in the\r\n product that is covered by this License, on a durable physical\r\n medium customarily used for software interchange, for a price no\r\n more than your reasonable cost of physically performing this\r\n conveying of source, or (2) access to copy the\r\n Corresponding Source from a network server at no charge.\r\n\r\n c) Convey individual copies of the object code with a copy of the\r\n written offer to provide the Corresponding Source. This\r\n alternative is allowed only occasionally and noncommercially, and\r\n only if you received the object code with such an offer, in accord\r\n with subsection 6b.\r\n\r\n d) Convey the object code by offering access from a designated\r\n place (gratis or for a charge), and offer equivalent access to the\r\n Corresponding Source in the same way through the same place at no\r\n further charge. You need not require recipients to copy the\r\n Corresponding Source along with the object code. If the place to\r\n copy the object code is a network server, the Corresponding Source\r\n may be on a different server (operated by you or a third party)\r\n that supports equivalent copying facilities, provided you maintain\r\n clear directions next to the object code saying where to find the\r\n Corresponding Source. Regardless of what server hosts the\r\n Corresponding Source, you remain obligated to ensure that it is\r\n available for as long as needed to satisfy these requirements.\r\n\r\n e) Convey the object code using peer-to-peer transmission, provided\r\n you inform other peers where the object code and Corresponding\r\n Source of the work are being offered to the general public at no\r\n charge under subsection 6d.\r\n\r\n A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling. In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage. For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product. A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source. The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information. But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed. Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n 7. Additional Terms.\r\n\r\n \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law. If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit. (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.) You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n a) Disclaiming warranty or limiting liability differently from the\r\n terms of sections 15 and 16 of this License; or\r\n\r\n b) Requiring preservation of specified reasonable legal notices or\r\n author attributions in that material or in the Appropriate Legal\r\n Notices displayed by works containing it; or\r\n\r\n c) Prohibiting misrepresentation of the origin of that material, or\r\n requiring that modified versions of such material be marked in\r\n reasonable ways as different from the original version; or\r\n\r\n d) Limiting the use for publicity purposes of names of licensors or\r\n authors of the material; or\r\n\r\n e) Declining to grant rights under trademark law for use of some\r\n trade names, trademarks, or service marks; or\r\n\r\n f) Requiring indemnification of licensors and authors of that\r\n material by anyone who conveys the material (or modified versions of\r\n it) with contractual assumptions of liability to the recipient, for\r\n any liability that these contractual assumptions directly impose on\r\n those licensors and authors.\r\n\r\n All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10. If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term. If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n 8. Termination.\r\n\r\n You may not propagate or modify a covered work except as expressly\r\nprovided under this License. Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License. If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n 9. Acceptance Not Required for Having Copies.\r\n\r\n You are not required to accept this License in order to receive or\r\nrun a copy of the Program. Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance. However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work. These actions infringe copyright if you do\r\nnot accept this License. Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n 10. Automatic Licensing of Downstream Recipients.\r\n\r\n Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License. You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations. If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License. For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n 11. Patents.\r\n\r\n A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based. The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version. For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement). To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients. \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License. You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n 12. No Surrender of Others' Freedom.\r\n\r\n If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License. If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all. For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n 13. Use with the GNU Affero General Public License.\r\n\r\n Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work. The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n 14. Revised Versions of this License.\r\n\r\n The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time. Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n Each version is given a distinguishing version number. If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation. If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n Later license versions may give you additional or different\r\npermissions. However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n 15. Disclaimer of Warranty.\r\n\r\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n 16. Limitation of Liability.\r\n\r\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n 17. Interpretation of Sections 15 and 16.\r\n\r\n If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n END OF TERMS AND CONDITIONS\r\n\r\n How to Apply These Terms to Your New Programs\r\n\r\n If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n To do so, attach the following notices to the program. It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n \r\n Copyright (C) \r\n\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU General Public License as published by\r\n the Free Software Foundation, either version 3 of the License, or\r\n (at your option) any later version.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n GNU General Public License for more details.\r\n\r\n You should have received a copy of the GNU General Public License\r\n along with this program. If not, see .\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n Copyright (C) \r\n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n This is free software, and you are welcome to redistribute it\r\n under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License. Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n.\r\n\r\n The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs. If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library. If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License. But first, please read\r\n.\r\n\r\n*/\r\n" + } + }, + "settings": { + "metadata": { + "useLiteralContent": false + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "id", + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/deployments/localhost_31337/solcInputs/0xe9b46d9335602a13095a2a0530d52bf4d0839470eb21a9a6d0aff59f9c3124d2.json b/deployments/localhost_31337/solcInputs/0xe9b46d9335602a13095a2a0530d52bf4d0839470eb21a9a6d0aff59f9c3124d2.json new file mode 100644 index 00000000..4e61b731 --- /dev/null +++ b/deployments/localhost_31337/solcInputs/0xe9b46d9335602a13095a2a0530d52bf4d0839470eb21a9a6d0aff59f9c3124d2.json @@ -0,0 +1,168 @@ +{ + "language": "Solidity", + "sources": { + "contracts/connectors/Uniswap/IUniswapConnector.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\ninterface IUniswapConnector {}\r\n" + }, + "contracts/connectors/Uniswap/UniswapConnector.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\n/**\r\n * @title Combines Uniswap V2 Protocol functions with Primitive V1.\r\n * @author Primitive\r\n */\r\n\r\n// Uniswap\r\nimport {\r\n IUniswapV2Callee\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\";\r\nimport {\r\n IUniswapV2Router02\r\n} from \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\r\nimport {\r\n IUniswapV2Factory\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\r\nimport {\r\n IUniswapV2Pair\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\";\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../../option/interfaces/IRegistry.sol\";\r\nimport { ITrader } from \"../../option/interfaces/ITrader.sol\";\r\nimport { TraderLib } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector } from \"../WETH/IWethConnector.sol\";\r\n// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n IUniswapV2Router02 public router;\r\n IUniswapV2Factory public factory;\r\n ITrader public trader;\r\n IRegistry public registry;\r\n\r\n address public quoteToken; // Designated stablecoin for Primitive.\r\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\r\n\r\n event Initialized(address indexed from, address indexed quoteToken);\r\n event UpdatedRouter(address indexed from, address indexed newRouter);\r\n event UpdatedFactory(address indexed from, address indexed newFactory);\r\n event UpdatedTrader(address indexed from, address indexed newTrader);\r\n event UpdatedRegistry(address indexed from, address indexed newRegistry);\r\n event UpdatedQuoteToken(address indexed from, address indexed newQuote);\r\n\r\n event RolledOptions(\r\n address indexed from,\r\n address indexed optionFrom,\r\n address indexed optionTo,\r\n uint256 quantity\r\n );\r\n event RolledOptionLiquidity(\r\n address indexed from,\r\n address indexed optionMarketFrom,\r\n address indexed optionMarketTo,\r\n uint256 liquidity\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n // ==== Setup Functions ====\r\n\r\n function initialize(\r\n address router_,\r\n address factory_,\r\n address trader_,\r\n address registry_,\r\n address quoteToken_\r\n ) external onlyOwner {\r\n require(address(router) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(factory) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(trader) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(registry) == address(0x0), \"ERR_INITIALIZED\");\r\n require(quoteToken == address(0x0), \"ERR_INITIALIZED\");\r\n router = IUniswapV2Router02(router_);\r\n factory = IUniswapV2Factory(factory_);\r\n trader = ITrader(trader_);\r\n registry = IRegistry(registry_);\r\n quoteToken = quoteToken_;\r\n emit Initialized(msg.sender, quoteToken_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Uniswap V2 Router address to use.\r\n */\r\n function setRouter(address router_) external onlyOwner {\r\n router = IUniswapV2Router02(router_);\r\n emit UpdatedRouter(msg.sender, router_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Uniswap V2 Factory address to use.\r\n */\r\n function setFactory(address factory_) external onlyOwner {\r\n factory = IUniswapV2Factory(factory_);\r\n emit UpdatedFactory(msg.sender, factory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Primitive V1 Trader address to use.\r\n */\r\n function setTrader(address trader_) external onlyOwner {\r\n trader = ITrader(trader_);\r\n emit UpdatedTrader(msg.sender, trader_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Primitive V1 Registry address to use.\r\n */\r\n function setRegistry(address registry_) external onlyOwner {\r\n registry = IRegistry(registry_);\r\n emit UpdatedRegistry(msg.sender, registry_);\r\n }\r\n\r\n /**\r\n * @dev Sets the designated stablecoin to use (paired token in Uniswap pools).\r\n */\r\n function setQuoteToken(address quoteToken_) external onlyOwner {\r\n quoteToken = quoteToken_;\r\n emit UpdatedQuoteToken(msg.sender, quoteToken_);\r\n }\r\n\r\n // ==== Trading Functions ====\r\n\r\n /**\r\n * @dev Mints options using underlyingTokens provided by user, then swaps on Uniswap V2.\r\n * Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.\r\n * @notice If the first address in the path is not the optionToken address, the tx will fail.\r\n * underlyingToken -> optionToken -> quoteToken.\r\n * @param optionToken The address of the Oracle-less Primitive option.\r\n * @param amountIn The quantity of options to mint and then sell.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n * @param to The address to send the optionToken proceeds and redeem tokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function mintOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints option and redeem tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the optionToken address.\r\n (, bool success) = _swapExactOptionsForTokens(\r\n address(optionToken),\r\n outputOptions,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send redeemTokens (short options) to the \"to\" address.\r\n IERC20(optionToken.redeemToken()).safeTransfer(to, outputRedeems);\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens.\r\n * @notice If the first address in the path is not the redeemToken address, the tx will fail.\r\n * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\r\n * @param optionToken The address of the Option contract.\r\n * @param amountIn The quantity of options to mint.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the redeemTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\r\n * @param to The address to send the redeemToken proceeds and optionTokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function mintShortOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) public returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints option and redeem tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the optionToken address.\r\n address redeemToken = optionToken.redeemToken();\r\n (, bool success) = _swapExactOptionsForTokens(\r\n redeemToken,\r\n outputRedeems, // shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send optionTokens (long options) to the \"to\" address.\r\n IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference.\r\n * @notice If the first address in the path is not the redeemToken address, the tx will fail.\r\n * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\r\n * @param optionToken The address of the Option contract.\r\n * @param flashLoanQuantity The quantity of options to mint.\r\n * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\r\n * @param to The address to send the redeemToken proceeds and optionTokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function flashloanMintShortOptionsThenSwap(\r\n IOption optionToken,\r\n uint256 flashLoanQuantity,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) public returns (bool) {\r\n require(flashLoanQuantity > 0, \"ERR_ZERO\");\r\n // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens.\r\n\r\n // Mints option and redeem tokens to this contract.\r\n address underlyingToken = optionToken.getUnderlyingTokenAddress();\r\n\r\n // Mint optionTokens using the underlyingTokens received from UniswapV2 flashloan.\r\n // Sends underlyingTokens from this contract and to the optionToken contract, then calls mintOptions.\r\n // This contract receives the newly minted option and redeem tokens.\r\n IERC20(underlyingToken).safeTransfer(\r\n address(optionToken),\r\n flashLoanQuantity\r\n );\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(address(this));\r\n\r\n // Need to pay back the UniswapV2 flash loan by selling the redeemToken, then paying the remainder.\r\n\r\n // Swaps redeemTokens to the token specified at the end of the path, then sends to UniswapV2Pair.\r\n // Reverts if the first address in the path is not the redeemToken address.\r\n // Reverts if the last address in the path is not the underlyingToken address.\r\n // path[0] = redeemToken, path[1] = dai, path[2] = underlyingToken\r\n {\r\n require(path[2] == underlyingToken, \"ERR_END_PATH_NOT_UNDERLYING\");\r\n (\r\n uint256[] memory amounts,\r\n bool success\r\n ) = _swapExactOptionsForTokens(\r\n optionToken.redeemToken(),\r\n outputRedeems, // shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n msg.sender,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // The remainder is the flash loan amount - amount from selling redeemTokens.\r\n uint256 remainder = flashLoanQuantity > amounts[1]\r\n ? flashLoanQuantity.sub(amounts[1])\r\n : 0;\r\n\r\n // Pull underlyingTokens from the original spender to pay the remainder of the flash loan.\r\n IERC20(underlyingToken).safeTransferFrom(to, msg.sender, remainder);\r\n\r\n // Send optionTokens (long options) to the \"spender\" address.\r\n IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens\r\n }\r\n return true;\r\n }\r\n\r\n function executeFlashMint(\r\n uint256 amountOptions,\r\n uint256 amountOutMin,\r\n IOption optionToken\r\n ) public {\r\n address redeemToken = optionToken.redeemToken();\r\n address underlyingToken = optionToken.getUnderlyingTokenAddress();\r\n address pairAddress = factory.getPair(quoteToken, underlyingToken);\r\n address[] memory path = new address[](3);\r\n path[0] = redeemToken;\r\n path[1] = quoteToken;\r\n path[2] = underlyingToken;\r\n IUniswapV2Pair pair = IUniswapV2Pair(pairAddress);\r\n\r\n bytes4 selector = bytes4(\r\n keccak256(\r\n bytes(\r\n \"flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)\"\r\n )\r\n )\r\n );\r\n bytes memory params = abi.encodeWithSelector(\r\n selector, // function to call in this contract\r\n optionToken, // option token to mint with flash loaned tokens\r\n amountOptions, // quantity of tokens from flash loan\r\n amountOutMin, // total price paid for selling redeemTokens from the minted optionTokens\r\n path, // redeemToken -> stablecoin -> underlyingToken\r\n msg.sender, // address to pull the remainder loan amount to pay, and send optionTokens to.\r\n now + 15 minutes // deadline of this function call\r\n );\r\n\r\n // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address.\r\n // Then executes `flashLoanMintShortOptionsThenSwap`.\r\n pair.swap(0, amountOptions, address(this), params); // redeemToken <> stablecoin pair swap\r\n }\r\n\r\n // gets tokens/WETH via a V2 flash swap, mints options, swaps short tokens for tokens, pulls in difference, repays!\r\n function uniswapV2Call(\r\n address sender,\r\n uint256 amount0,\r\n uint256 amount1,\r\n bytes calldata data\r\n ) external override {\r\n (bool success, bytes memory returnData) = address(this).call(data);\r\n require(success, \"ERR_SECURE_LOAN_CALL_FAIL\");\r\n }\r\n\r\n /**\r\n * @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n * @notice Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender.\r\n * Then closes the optionTokens and withdraws underlyingTokens to the \"to\" address.\r\n * Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n * UNI-V2 -> optionToken -> underlyingToken.\r\n * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity.\r\n * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function removeLiquidityThenCloseOptions(\r\n address optionAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) public nonReentrant returns (uint256, uint256) {\r\n // Store in memory for gas savings.\r\n address quoteToken_ = quoteToken;\r\n IOption optionToken = IOption(optionAddress);\r\n //IUniswapV2Router02 router_ = router;\r\n\r\n {\r\n // Gets the Uniswap V2 Pair address for optionAddress and quoteToken.\r\n // Transfers the LP tokens for the pair to this contract.\r\n // Warning: external call to a non-trusted address `msg.sender`.\r\n address pair = getUniswapMarketForOption(optionAddress);\r\n IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);\r\n IERC20(pair).approve(address(router), uint256(-1));\r\n }\r\n\r\n // Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens).\r\n (uint256 amountOptions, uint256 amountQuote) = router.removeLiquidity(\r\n optionAddress,\r\n quoteToken_,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n address(this),\r\n deadline\r\n );\r\n\r\n // Approves trader to pull option and redeem tokens from this contract to close options.\r\n ITrader trader_ = trader;\r\n {\r\n //address redeemToken = optionToken.redeemToken();\r\n IERC20(optionAddress).approve(address(trader_), uint256(-1));\r\n IERC20(optionToken.redeemToken()).approve(\r\n address(trader_),\r\n uint256(-1)\r\n );\r\n\r\n // Calculate equivalent quantity of redeem (short option) tokens to close the option position.\r\n // Need to cancel base units and have quote units remaining.\r\n uint256 requiredRedeems = amountOptions\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Pull the required redeemTokens from msg.sender to this contract.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n requiredRedeems\r\n );\r\n }\r\n\r\n // Pushes option and redeem tokens to the option contract and calls \"closeOption\".\r\n // Receives underlyingTokens and sends them to the \"to\" address.\r\n trader_.safeClose(optionToken, amountOptions, to);\r\n\r\n // Send the quoteTokens received from burning liquidity shares to the \"to\" address.\r\n IERC20(quoteToken_).safeTransfer(to, amountQuote);\r\n\r\n return (amountOptions, amountQuote);\r\n }\r\n\r\n /**\r\n * @dev Combines \"removeLiquidityThenCloseOptions\" function with \"addLiquidityWithUnderlying\" fuction.\r\n * @notice Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair.\r\n * UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2.\r\n * @param rollFromOption The optionToken address to close a UNI-V2 position.\r\n * @param rollToOption The optionToken address to open a UNI-V2 position.\r\n * @param liquidity The quantity of UNI-V2 shares to roll from the first Uniswap pool.\r\n * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity.\r\n * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n * @param to The address that receives the UNI-V2 shares that have been rolled.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function rollOptionLiquidity(\r\n address rollFromOption,\r\n address rollToOption,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool) {\r\n (\r\n uint256 outUnderlyings,\r\n uint256 outQuote\r\n ) = removeLiquidityThenCloseOptions(\r\n rollFromOption,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n bool success = addLiquidityWithUnderlying(\r\n rollToOption,\r\n outUnderlyings,\r\n outQuote,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n require(success, \"ERR_ADD_LIQUIDITY_FAIL\");\r\n\r\n emit RolledOptionLiquidity(\r\n msg.sender,\r\n rollFromOption,\r\n rollToOption,\r\n liquidity\r\n );\r\n\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Closes an option position and opens a new one using the freed underlyingTokens.\r\n * @notice Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver.\r\n * rollFromOption -> underlyingToken -> rollToOption.\r\n * @param rollFromOption The optionToken to close.\r\n * @param rollToOption The optionToken to mint.\r\n * @param rollQuantity The quantity of underlyingTokens to receive from closed options then use to mint new options.\r\n * @param receiver The address that receives newly minted option and redeem tokens.\r\n */\r\n function rollOption(\r\n address rollFromOption,\r\n address rollToOption,\r\n uint256 rollQuantity,\r\n address receiver\r\n ) external returns (bool) {\r\n // Close the rollFromOption to receive underlyingTokens.\r\n // Sends the underlyingTokens to this contract.\r\n (, , uint256 outUnderlyings) = TraderLib.safeClose(\r\n IOption(rollFromOption),\r\n rollQuantity,\r\n address(this)\r\n );\r\n\r\n // Store in memory for gas savings.\r\n ITrader trader_ = trader;\r\n\r\n // Approve underlyingTokens to be sent to the Primitive Trader contract.\r\n IERC20(IOption(rollFromOption).getUnderlyingTokenAddress()).approve(\r\n address(trader_),\r\n uint256(-1)\r\n );\r\n\r\n // Mint rollToOptions using the underlyingTokens received from closing the rollFromOptions.\r\n // Pulls underlyingTokens from this contract and sends them to the rollToOption contract.\r\n // Sends minted option and redeem tokens to the \"receiver\" address.\r\n (uint256 outputOptions, ) = trader_.safeMint(\r\n IOption(rollToOption),\r\n outUnderlyings,\r\n receiver\r\n );\r\n\r\n // An event is emitted because a position was atomically rolled without additional capital.\r\n emit RolledOptions(\r\n msg.sender,\r\n rollFromOption,\r\n rollToOption,\r\n outputOptions\r\n );\r\n return true;\r\n }\r\n\r\n // ==== Liquidity Functions ====\r\n\r\n /**\r\n * @dev Adds liquidity to an option<>quote token pair by minting optionTokens with underlyingTokens.\r\n * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n * underlyingToken -> optionToken -> UNI-V2.\r\n * @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n * @param quantityOptions The quantity of underlyingTokens to use to mint optionTokens.\r\n * @param quantityQuoteTokens The quantity of quoteTokens to add with optionTokens to the Uniswap V2 Pair.\r\n * @param minQuantityOptions The minimum quantity of optionTokens expected to provide liquidity with.\r\n * @param minQuantityQuoteTokens The minimum quantity of quoteTokens expected to provide liquidity with.\r\n * @param to The address that receives UNI-V2 shares.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function addLiquidityWithUnderlying(\r\n address optionAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityQuoteTokens,\r\n uint256 minQuantityOptions,\r\n uint256 minQuantityQuoteTokens,\r\n address to,\r\n uint256 deadline\r\n ) public nonReentrant returns (bool) {\r\n // Store in memory for gas savings.\r\n IUniswapV2Router02 router_ = router;\r\n address quoteToken_ = quoteToken;\r\n\r\n // Pull quote tokens from msg.sender to add to Uniswap V2 Pair.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(quoteToken_).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityQuoteTokens\r\n );\r\n\r\n // Pulls underlyingTokens from msg.sender to this contract.\r\n // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n IOption(optionAddress),\r\n quantityOptions,\r\n address(this)\r\n );\r\n\r\n // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(optionAddress).approve(address(router_), uint256(-1));\r\n IERC20(quoteToken_).approve(address(router_), uint256(-1));\r\n\r\n // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router_.addLiquidity(\r\n optionAddress,\r\n quoteToken,\r\n outputOptions,\r\n quantityQuoteTokens,\r\n minQuantityOptions,\r\n minQuantityQuoteTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n // Send redeemTokens (short option tokens) from minting option operation to msg.sender.\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n msg.sender,\r\n outputRedeems\r\n );\r\n\r\n return true;\r\n }\r\n\r\n // ==== Internal Functions ====\r\n\r\n /**\r\n * @dev Calls the \"swapExactTokensForTokens\" function on the Uniswap V2 Router 02 Contract.\r\n * @notice Fails early if the address in the beginning of the path is not the optionToken address.\r\n * @param optionAddress The address of the optionToken to swap from.\r\n * @param amountIn The quantity of optionTokens to swap with.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens swapped.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n * @param to The address to send the optionToken proceeds and redeem tokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n */\r\n function _swapExactOptionsForTokens(\r\n address optionAddress,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256[] memory amounts, bool success) {\r\n // Fails early if the token being swapped from is not the optionToken.\r\n require(path[0] == optionAddress, \"ERR_PATH_OPTION_START\");\r\n\r\n // Store router in memory for gas savings.\r\n IUniswapV2Router02 router_ = router;\r\n\r\n // Approve the uniswap router to be able to transfer options from this contract.\r\n IERC20(optionAddress).approve(address(router_), uint256(-1));\r\n\r\n // Call the Uniswap V2 function to swap optionTokens to quoteTokens.\r\n (amounts) = router_.swapExactTokensForTokens(\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n success = true;\r\n }\r\n\r\n // ==== Management Functions ====\r\n\r\n /**\r\n * @dev Creats a Uniswap pair for option<>quote tokens.\r\n * @param optionAddress The address of the option to deploy a Uniswap V2 Pair for with the quoteToken.\r\n */\r\n function deployUniswapMarket(address optionAddress)\r\n external\r\n returns (address)\r\n {\r\n address uniswapPair = factory.createPair(optionAddress, quoteToken);\r\n return uniswapPair;\r\n }\r\n\r\n // ==== View ====\r\n\r\n /**\r\n * @dev The maxmium deadline available for each trade.\r\n */\r\n function getMaxDeadline() public view returns (uint256) {\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 deadline = now + 15 minutes;\r\n return deadline;\r\n }\r\n\r\n /**\r\n * @dev Gets a Uniswap Pair address for an option token and quote token.\r\n * @param optionAddress The address of the option to get a Uniswap V2 Pair address for (with quoteToken).\r\n */\r\n function getUniswapMarketForOption(address optionAddress)\r\n public\r\n view\r\n returns (address)\r\n {\r\n address uniswapPair = factory.getPair(optionAddress, quoteToken);\r\n require(uniswapPair != address(0x0), \"ERR_PAIR_DOES_NOT_EXIST\");\r\n return uniswapPair;\r\n }\r\n\r\n /**\r\n * @dev Gets a Uniswap Pair address for the corresponding option parameters.\r\n */\r\n function getUniswapMarketForSeries(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public view returns (address) {\r\n address optionAddress = registry.getOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n require(optionAddress != address(0x0), \"ERR_OPTION_DOES_NOT_EXIST\");\r\n return getUniswapMarketForOption(optionAddress);\r\n }\r\n}\r\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Callee {\n function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": { + "content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": { + "content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/option/interfaces/IOption.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IOption is IERC20 {\r\n function mintOptions(address receiver) external returns (uint256, uint256);\r\n\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external returns (uint256, uint256);\r\n\r\n function redeemStrikeTokens(address receiver) external returns (uint256);\r\n\r\n function closeOptions(address receiver)\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function redeemToken() external view returns (address);\r\n\r\n function getStrikeTokenAddress() external view returns (address);\r\n\r\n function getUnderlyingTokenAddress() external view returns (address);\r\n\r\n function getBaseValue() external view returns (uint256);\r\n\r\n function getQuoteValue() external view returns (uint256);\r\n\r\n function getExpiryTime() external view returns (uint256);\r\n\r\n function underlyingCache() external view returns (uint256);\r\n\r\n function strikeCache() external view returns (uint256);\r\n\r\n function factory() external view returns (address);\r\n\r\n function getCacheBalances() external view returns (uint256, uint256);\r\n\r\n function getAssetAddresses()\r\n external\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n );\r\n\r\n function getParameters()\r\n external\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n );\r\n\r\n function initRedeemToken(address _redeemToken) external;\r\n\r\n function updateCacheBalances() external;\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../../GSN/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20MinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/GSN/Context.sol": { + "content": "pragma solidity ^0.6.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "pragma solidity ^0.6.2;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/option/interfaces/IRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRegistry {\r\n function pauseDeployments() external;\r\n\r\n function unpauseDeployments() external;\r\n\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function setOptionFactory(address optionFactory_) external;\r\n\r\n function setRedeemFactory(address redeemFactory_) external;\r\n\r\n function optionFactory() external returns (address);\r\n\r\n function redeemFactory() external returns (address);\r\n\r\n function verifyToken(address tokenAddress) external;\r\n\r\n function verifyExpiry(uint256 expiry) external;\r\n\r\n function unverifyToken(address tokenAddress) external;\r\n\r\n function unverifyExpiry(uint256 expiry) external;\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n view\r\n returns (bool);\r\n}\r\n" + }, + "contracts/option/interfaces/ITrader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IOption } from \"./IOption.sol\";\r\n\r\ninterface ITrader {\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "contracts/option/libraries/TraderLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Trader Library\r\n * @notice Internal functions that can be used to safeTransfer\r\n * tokens into the option contract then call respective option contract functions.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary TraderLib {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n /**\r\n * @dev Conducts important safety checks to safely mint option tokens.\r\n * @param optionToken The address of the option token to mint.\r\n * @param mintQuantity The quantity of option tokens to mint.\r\n * @param receiver The address which receives the minted option tokens.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(mintQuantity > 0, \"ERR_ZERO\");\r\n IERC20(optionToken.getUnderlyingTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n mintQuantity\r\n );\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(exerciseQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.getStrikeTokenAddress()).balanceOf(msg.sender) >=\r\n inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n IERC20(optionToken.getStrikeTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inputRedeems = outputStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) internal returns (uint256) {\r\n require(redeemQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n // There can be the case there is no available strikes to redeem, causing a revert.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(receiver);\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n require(closeQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned. (What we mean by Implicit).\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens are sent to the receiver address and the redeemTokens are burned.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Checks\r\n require(unwindQuantity > 0, \"ERR_ZERO\");\r\n // solhint-disable-next-line not-rely-on-time\r\n require(\r\n optionToken.getExpiryTime() < block.timestamp,\r\n \"ERR_NOT_EXPIRED\"\r\n );\r\n\r\n // Calculate amount of redeems required\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/connectors/WETH/IWethConnector.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\n\r\ninterface IWethConnector {\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\ncontract ReentrancyGuard {\n bool private _notEntered;\n\n constructor () internal {\n // Storing an initial non-zero value makes deployment a bit more\n // expensive, but in exchange the refund on every call to nonReentrant\n // will be lower in amount. Since refunds are capped to a percetange of\n // the total transaction's gas, it is best to keep them low in cases\n // like this one, to increase the likelihood of the full refund coming\n // into effect.\n _notEntered = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _notEntered = false;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _notEntered = true;\n }\n}\n" + }, + "contracts/connectors/WETH/IWETH.sol": { + "content": "pragma solidity >=0.5.0;\r\n\r\ninterface IWETH {\r\n function deposit() external payable;\r\n\r\n function transfer(address to, uint256 value) external returns (bool);\r\n\r\n function withdraw(uint256) external;\r\n}\r\n" + }, + "contracts/connectors/WETH/WethConnector.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Weth Connector for bridging ether to WETH Primitive options.\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * Manages operations involving options with WETH as the underlying or strike asset.\r\n * Accepts deposits in ethers and withdraws ethers.\r\n * @author Primitive\r\n */\r\n\r\n// WETH Interface\r\nimport { IWETH } from \"./IWETH.sol\";\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { TraderLib } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector } from \"./IWethConnector.sol\";\r\n// Open Zeppelin\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract WethConnector is IWethConnector, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n IWETH public weth;\r\n\r\n event WethConnectorMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event WethConnectorExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event WethConnectorRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event WethConnectorClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event WethConnectorUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n /**\r\n * @dev Checks the quantity of an operation to make sure its not zero. Fails early.\r\n */\r\n modifier nonZero(uint256 quantity) {\r\n require(quantity > 0, \"ERR_ZERO\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Since the WethConnector contract is responsible for converting between ethers and WETH,\r\n * the contract is initialized with the address for WETH.\r\n */\r\n constructor(address payable _weth) public {\r\n weth = IWETH(_weth);\r\n }\r\n\r\n /**\r\n * @dev If ether is sent to this contract through a normal transaction, it will fail, unless\r\n * it was the WETH contract who sent it.\r\n */\r\n receive() external payable {\r\n assert(msg.sender == address(weth));\r\n }\r\n\r\n // ==== Operation Functions ====\r\n\r\n /**\r\n * @dev Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.\r\n * @notice This function is for options that have WETH as the underlying asset.\r\n * @param optionToken The address of the option token to mint.\r\n * @param receiver The address which receives the minted option and redeem tokens.\r\n */\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n // Check to make sure we are minting a WETH call option.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Convert ethers into WETH, then send WETH to option contract in preparation of calling mintOptions().\r\n _depositEthSendWeth(address(optionToken));\r\n\r\n // Mint the option and redeem tokens.\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n\r\n emit WethConnectorMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\r\n * @notice This function is for options with WETH as the strike asset.\r\n * Burns option tokens, accepts ethers, and pushes out underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n // Require one of the option's assets to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n uint256 inputStrikes = msg.value;\r\n // Calculate quantity of optionTokens needed to burn.\r\n // An ether put option with strike price $300 has a \"base\" value of 300, and a \"quote\" value of 1.\r\n // To calculate how many options are needed to be burned, we need to cancel out the \"quote\" units.\r\n // The input strike quantity can be multiplied by the strike ratio to cancel out \"quote\" units.\r\n // 1 ether (quote units) * 300 (base units) / 1 (quote units) = 300 inputOptions\r\n uint256 inputOptions = inputStrikes.mul(optionToken.getBaseValue()).div(\r\n optionToken.getQuoteValue()\r\n );\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= inputOptions,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Wrap the ethers into WETH, and send the WETH to the option contract to prepare for calling exerciseOptions().\r\n _depositEthSendWeth(address(optionToken));\r\n\r\n // Send the option tokens required to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n\r\n // Burns the transferred option tokens, stores the strike asset (ether), and pushes underlyingTokens\r\n // to the receiver address.\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n inputOptions,\r\n new bytes(0)\r\n );\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * Burns option tokens, pulls strikeTokens, and pushes out ethers.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(exerciseQuantity)\r\n returns (uint256, uint256)\r\n {\r\n // Require one of the option's assets to be WETH.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(underlyingAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fails early if msg.sender does not have enough optionTokens.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fails early if msg.sender does not have enough strikeTokens.\r\n require(\r\n IERC20(strikeAddress).balanceOf(msg.sender) >= inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n\r\n // Send strikeTokens to option contract to prepare for calling exerciseOptions().\r\n IERC20(strikeAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n\r\n // Send the option tokens to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n // Burns the optionTokens sent, stores the strikeTokens sent, and pushes underlyingTokens\r\n // to this contract.\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n address(this),\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n\r\n // Converts the withdrawn WETH to ethers, then sends the ethers to the receiver address.\r\n _withdrawEthAndSend(receiver, exerciseQuantity);\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\r\n * @notice This function is for options that have WETH as the strike asset.\r\n * Converts WETH to ethers, and withdraws ethers to the receiver address.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity The quantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant nonZero(redeemQuantity) returns (uint256) {\r\n // Require strikeToken to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens.\r\n address redeemAddress = optionToken.redeemToken();\r\n require(\r\n IERC20(redeemAddress).balanceOf(msg.sender) >= redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeemTokens to option contract in preparation for calling redeemStrikeTokens().\r\n IERC20(redeemAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n\r\n // If options have not been exercised, there will be no strikeTokens to redeem, causing a revert.\r\n // Burns the redeem tokens that were sent to the contract, and withdraws the same quantity of WETH.\r\n // Sends the withdrawn WETH to this contract, so that it can be unwrapped prior to being sent to receiver.\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(address(this));\r\n\r\n // Unwrap the redeemed WETH and then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, redeemQuantity);\r\n\r\n emit WethConnectorRedeem(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * WETH underlyingTokens are converted to ethers before being sent to receiver.\r\n * The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(closeQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early is msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem and option tokens in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n // Call the closeOptions() function to burn option and redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, closeQuantity);\r\n\r\n emit WethConnectorClose(msg.sender, address(optionToken), inputOptions);\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options.\r\n * This function is for options with WETH as the underlying asset.\r\n * The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(unwindQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // If the option is not expired, fail early.\r\n // solhint-disable-next-line not-rely-on-time\r\n require(optionToken.getExpiryTime() < now, \"ERR_NOT_EXPIRED\");\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n // Call the closeOptions() function to burn redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them to ethers then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, unwindQuantity);\r\n\r\n emit WethConnectorUnwind(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n // ==== WETH Operations ====\r\n\r\n /**\r\n * @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to \"to\".\r\n * @param to The address to send WETH ERC-20 tokens to.\r\n */\r\n function _depositEthSendWeth(address to) internal {\r\n // Deposit the ethers received from msg.value into the WETH contract.\r\n weth.deposit.value(msg.value)();\r\n\r\n // Send WETH.\r\n weth.transfer(to, msg.value);\r\n }\r\n\r\n /**\r\n * @dev Unwraps WETH to withrdaw ethers, which are then sent to the \"to\" address.\r\n * @param to The address to send withdrawn ethers to.\r\n * @param quantity The quantity of WETH to unwrap.\r\n */\r\n function _withdrawEthAndSend(address to, uint256 quantity) internal {\r\n // Withdraw ethers with weth.\r\n weth.withdraw(quantity);\r\n\r\n // Send ether.\r\n (bool success, ) = to.call.value(quantity)(\"\");\r\n\r\n // Revert is call is unsuccessful.\r\n require(success, \"ERR_SENDING_ETHER\");\r\n }\r\n}\r\n" + }, + "contracts/option/applications/factories/OptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Factory for deploying option contracts.\r\n * @author Primitive\r\n */\r\n\r\nimport { Option, SafeMath } from \"../../primitives/Option.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { OptionTemplateLib } from \"../../libraries/OptionTemplateLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { IOptionFactory } from \"../../interfaces/IOptionFactory.sol\";\r\n\r\ncontract OptionFactory is IOptionFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override optionTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the bytecode for the Option contract.\r\n */\r\n function deployOptionTemplate() public override {\r\n optionTemplate = OptionTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a create2 clone of the option template contract.\r\n * @param underlyingToken The address of the underlying ERC-20 token.\r\n * @param strikeToken The address of the strike ERC-20 token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp for option expiry.\r\n */\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override onlyOwner returns (address) {\r\n require(optionTemplate != address(0x0), \"ERR_NO_DEPLOYED_TEMPLATE\");\r\n\r\n // Calculates the salt for create2.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n\r\n // Deploys the clone using the template contract and calculated salt.\r\n address optionAddress = CloneLib.create2Clone(\r\n optionTemplate,\r\n uint256(salt)\r\n );\r\n\r\n // Sets the initial state of the option with the parameter arguments.\r\n Option(optionAddress).initialize(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Only the factory can call the initRedeemToken function to set the redeem token address.\r\n * This function is only callable by the Registry contract (the owner).\r\n */\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n Option(optionAddress).initRedeemToken(redeemAddress);\r\n }\r\n\r\n /**\r\n * @dev Calculates the option token's address using the five option parameters.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override view returns (address) {\r\n // Calculates the salt using the parameter arguments and the salt used in the template contract\r\n // create2 deployment.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n address optionAddress = CloneLib.deriveInstanceAddress(\r\n optionTemplate,\r\n salt\r\n );\r\n return optionAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Option.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Vanilla Option Token\r\n * @notice This is a low-level contract that is designed to be interacted with by\r\n * other sophisticated smart contracts which have important safety checks,\r\n * and not by externally owned accounts.\r\n * Incorrect usage through direct interaction from externally owned accounts\r\n * can lead to the loss of funds.\r\n * Use Primitive's Trader.sol contract to interact with this contract safely.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { IFlash } from \"../interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\ncontract Option is IOption, ERC20 {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n struct OptionParameters {\r\n address underlyingToken;\r\n address strikeToken;\r\n uint256 base;\r\n uint256 quote;\r\n uint256 expiry;\r\n }\r\n\r\n OptionParameters public optionParameters;\r\n\r\n // solhint-disable-next-line const-name-snakecase\r\n uint256 public override underlyingCache;\r\n uint256 public override strikeCache;\r\n address public override redeemToken;\r\n address public override factory;\r\n bool private _notEntered;\r\n\r\n string public constant name = \"Primitive V1 Option\";\r\n string public constant symbol = \"PRM\";\r\n uint8 public constant decimals = 18;\r\n\r\n event Mint(address indexed from, uint256 outOptions, uint256 outRedeems);\r\n event Exercise(\r\n address indexed from,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event Redeem(address indexed from, uint256 inRedeems);\r\n event Close(address indexed from, uint256 outUnderlyings);\r\n event UpdatedCacheBalances(uint256 underlyingCache, uint256 strikeCache);\r\n event InitializedRedeem(\r\n address indexed caller,\r\n address indexed redeemToken\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the intial state for the contract. Only called immediately after deployment.\r\n * @param underlyingToken The address of the underlying asset.\r\n * @param strikeToken The address of the strike asset.\r\n * @param base The quantity of underlying tokens per quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per base amount of underlying tokens.\r\n * @param expiry The expiration date for the option.\r\n */\r\n function initialize(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= block.timestamp, \"ERR_EXPIRY\");\r\n factory = msg.sender;\r\n optionParameters = OptionParameters(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n _notEntered = true;\r\n }\r\n\r\n modifier notExpired {\r\n // solhint-disable-next-line not-rely-on-time\r\n require(isNotExpired(), \"ERR_EXPIRED\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Prevents a contract from calling itself, directly or indirectly.\r\n * Calling a `nonReentrant` function from another `nonReentrant`\r\n * function is not supported. It is possible to prevent this from happening\r\n * by making the `nonReentrant` function external, and make it call a\r\n * `private` function that does the actual work.\r\n */\r\n modifier nonReentrant() {\r\n // On the first call to nonReentrant, _notEntered will be true\r\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\r\n\r\n // Any calls to nonReentrant after this point will fail\r\n _notEntered = false;\r\n\r\n _;\r\n\r\n // By storing the original value once again, a refund is triggered (see\r\n // https://eips.ethereum.org/EIPS/eip-2200)\r\n _notEntered = true;\r\n }\r\n\r\n /**\r\n * @dev Called after the option contract is initialized, and a redeem token has been deployed.\r\n * @notice Entangles a redeem token to this option contract permanently.\r\n * @param redeemToken_ The address of the redeem token.\r\n */\r\n function initRedeemToken(address redeemToken_) external override {\r\n require(msg.sender == factory, \"ERR_NOT_OWNER\");\r\n require(redeemToken == address(0x0), \"ERR_REDEEM_INITIALIZED\");\r\n redeemToken = redeemToken_;\r\n emit InitializedRedeem(msg.sender, redeemToken_);\r\n }\r\n\r\n /**\r\n * @dev Updates the cached balances to match the actual current balances.\r\n * Attempting to transfer tokens to this contract directly, in a separate transaction,\r\n * is incorrect and could result in loss of funds. Calling this function will permanently lock any excess\r\n * underlying or strike tokens which were erroneously sent to this contract.\r\n */\r\n function updateCacheBalances() external override nonReentrant {\r\n _updateCacheBalances(\r\n IERC20(optionParameters.underlyingToken).balanceOf(address(this)),\r\n IERC20(optionParameters.strikeToken).balanceOf(address(this))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Sets the cache balances to new values.\r\n */\r\n function _updateCacheBalances(\r\n uint256 underlyingBalance,\r\n uint256 strikeBalance\r\n ) private {\r\n underlyingCache = underlyingBalance;\r\n strikeCache = strikeBalance;\r\n emit UpdatedCacheBalances(underlyingBalance, strikeBalance);\r\n }\r\n\r\n /* === STATE MUTABLE === */\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Mints optionTokens at a 1:1 ratio to underlyingToken deposits. Also mints Redeem tokens at a base:quote ratio.\r\n * @notice inUnderlyings = outOptionTokens. inUnderlying / strike ratio = outRedeemTokens.\r\n * @param receiver The newly minted tokens are sent to the receiver address.\r\n */\r\n function mintOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n notExpired\r\n returns (uint256, uint256)\r\n {\r\n // Save on gas because this variable is used twice.\r\n uint256 underlyingBalance = IERC20(optionParameters.underlyingToken)\r\n .balanceOf(address(this));\r\n\r\n // Mint optionTokens equal to the difference between current and cached balance of underlyingTokens.\r\n uint256 inUnderlyings = underlyingBalance.sub(underlyingCache);\r\n\r\n // Calculate the quantity of redeemTokens to mint.\r\n uint256 outRedeems = inUnderlyings.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n require(outRedeems > 0, \"ERR_ZERO\");\r\n\r\n // Mint the optionTokens and redeemTokens.\r\n IRedeem(redeemToken).mint(receiver, outRedeems);\r\n _mint(receiver, inUnderlyings);\r\n\r\n // Update the underlyingCache.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Mint(msg.sender, inUnderlyings, outRedeems);\r\n return (inUnderlyings, outRedeems);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Sends out underlyingTokens then checks to make sure they are returned or paid for.\r\n * This function enables flash exercises and flash loans. Only smart contracts who implement\r\n * their own IFlash interface should be calling this function to initiate a flash exercise/loan.\r\n * @notice If the underlyingTokens are returned, only the fee has to be paid.\r\n * @param receiver The outUnderlyings are sent to the receiver address.\r\n * @param outUnderlyings Quantity of underlyingTokens to safeTransfer to receiver optimistically.\r\n * @param data Passing in any abritrary data will trigger the flash exercise callback function.\r\n */\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override nonReentrant notExpired returns (uint256, uint256) {\r\n // Store the cached balances and token addresses in memory.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n //(uint256 _underlyingCache, uint256 _strikeCache) = getCacheBalances();\r\n\r\n // Require outUnderlyings > 0 and balance of underlyings >= outUnderlyings.\r\n require(outUnderlyings > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(underlyingToken).balanceOf(address(this)) >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Optimistically safeTransfer out underlyingTokens.\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n if (data.length > 0)\r\n IFlash(receiver).primitiveFlash(msg.sender, outUnderlyings, data);\r\n\r\n // Store in memory for gas savings.\r\n uint256 strikeBalance = IERC20(optionParameters.strikeToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n\r\n // Calculate the differences.\r\n uint256 inStrikes = strikeBalance.sub(strikeCache);\r\n uint256 inUnderlyings = underlyingBalance.sub(\r\n underlyingCache.sub(outUnderlyings)\r\n ); // will be > 0 if underlyingTokens are returned.\r\n\r\n // Either underlyingTokens or strikeTokens must be sent into the contract.\r\n require(inStrikes > 0 || inUnderlyings > 0, \"ERR_ZERO\");\r\n\r\n // Calculate the remaining amount of underlyingToken that needs to be paid for.\r\n uint256 remainder = inUnderlyings > outUnderlyings\r\n ? 0\r\n : outUnderlyings.sub(inUnderlyings);\r\n\r\n // Calculate the expected payment of strikeTokens.\r\n uint256 payment = remainder.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n\r\n // Assumes the cached optionToken balance is 0, which is what it should be.\r\n uint256 inOptions = balanceOf(address(this));\r\n\r\n // Enforce the invariants.\r\n require(inStrikes >= payment, \"ERR_STRIKES_INPUT\");\r\n require(inOptions >= remainder, \"ERR_OPTIONS_INPUT\");\r\n\r\n // Burn the optionTokens at a 1:1 ratio to outUnderlyings.\r\n _burn(address(this), inOptions);\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeBalance);\r\n emit Exercise(msg.sender, outUnderlyings, inStrikes);\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Burns redeemTokens to withdraw strikeTokens at a ratio of 1:1.\r\n * @notice inRedeemTokens = outStrikeTokens. Only callable when strikeTokens are in the contract.\r\n * @param receiver The inRedeems quantity of strikeTokens are sent to the receiver address.\r\n */\r\n function redeemStrikeTokens(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (uint256)\r\n {\r\n address strikeToken = optionParameters.strikeToken;\r\n address _redeemToken = redeemToken;\r\n uint256 strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // Difference between redeemTokens balance and cache.\r\n require(inRedeems > 0, \"ERR_ZERO\");\r\n require(strikeBalance >= inRedeems, \"ERR_BAL_STRIKE\");\r\n\r\n // Burn redeemTokens in the contract. Send strikeTokens to receiver.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(strikeToken).safeTransfer(receiver, inRedeems);\r\n\r\n // Current balances.\r\n strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingCache, strikeBalance);\r\n emit Redeem(msg.sender, inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * If the option has expired, burn redeem tokens to withdraw underlying tokens.\r\n * If the option is not expired, burn option and redeem tokens to withdraw underlying tokens.\r\n * @notice inRedeemTokens / strike ratio = outUnderlyingTokens && inOptionTokens >= outUnderlyingTokens.\r\n * @param receiver The outUnderlyingTokens are sent to the receiver address.\r\n */\r\n function closeOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Stores addresses and balances locally for gas savings.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n address _redeemToken = redeemToken;\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 optionBalance = balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // The quantity of underlyingToken to send out it still determined by the quantity of inRedeems.\r\n // inRedeems is in units of strikeTokens, which is converted to underlyingTokens\r\n // by multiplying inRedeems by the strike ratio, which is base / quote.\r\n // This outUnderlyings quantity is checked against inOptions.\r\n // inOptions must be greater than or equal to outUnderlyings (1 option burned per 1 underlying purchased).\r\n // optionBalance must be greater than or equal to outUnderlyings.\r\n // Neither inRedeems or inOptions can be zero.\r\n uint256 outUnderlyings = inRedeems.mul(optionParameters.base).div(\r\n optionParameters.quote\r\n );\r\n\r\n // Assumes the cached balance is 0 so inOptions = balance of optionToken.\r\n // If optionToken is expired, optionToken does not need to be sent in. Only redeemToken.\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 inOptions = isNotExpired() ? optionBalance : outUnderlyings;\r\n require(inRedeems > 0 && inOptions > 0, \"ERR_ZERO\");\r\n require(\r\n inOptions >= outUnderlyings && underlyingBalance >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Burn optionTokens. optionTokens are only sent into contract when not expired.\r\n // solhint-disable-next-line not-rely-on-time\r\n if (isNotExpired()) {\r\n _burn(address(this), inOptions);\r\n }\r\n\r\n // Send underlyingTokens to user.\r\n // Burn redeemTokens held in the contract.\r\n // User does not receive extra underlyingTokens if there was extra optionTokens in the contract.\r\n // User receives outUnderlyings proportional to inRedeems.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n\r\n // Current balances of underlyingToken and redeemToken.\r\n underlyingBalance = IERC20(underlyingToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Close(msg.sender, outUnderlyings);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /* === VIEW === */\r\n\r\n /**\r\n * @dev Returns the previously saved balances of underlying and strike tokens.\r\n */\r\n function getCacheBalances()\r\n public\r\n override\r\n view\r\n returns (uint256, uint256)\r\n {\r\n return (underlyingCache, strikeCache);\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying, strike, and redeem token addresses.\r\n */\r\n function getAssetAddresses()\r\n public\r\n override\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n )\r\n {\r\n return (\r\n optionParameters.underlyingToken,\r\n optionParameters.strikeToken,\r\n redeemToken\r\n );\r\n }\r\n\r\n /**\r\n * @dev Returns the strike token address.\r\n */\r\n function getStrikeTokenAddress() public override view returns (address) {\r\n return optionParameters.strikeToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying token address.\r\n */\r\n function getUnderlyingTokenAddress()\r\n public\r\n override\r\n view\r\n returns (address)\r\n {\r\n return optionParameters.underlyingToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the base value option parameter.\r\n */\r\n function getBaseValue() public override view returns (uint256) {\r\n return optionParameters.base;\r\n }\r\n\r\n /**\r\n * @dev Returns the quote value option parameter.\r\n */\r\n function getQuoteValue() public override view returns (uint256) {\r\n return optionParameters.quote;\r\n }\r\n\r\n /**\r\n * @dev Returns the expiry timestamp option parameter.\r\n */\r\n function getExpiryTime() public override view returns (uint256) {\r\n return optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the option parameters and redeem token address.\r\n */\r\n function getParameters()\r\n public\r\n override\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n )\r\n {\r\n OptionParameters memory _optionParameters = optionParameters;\r\n _underlyingToken = _optionParameters.underlyingToken;\r\n _strikeToken = _optionParameters.strikeToken;\r\n _redeemToken = redeemToken;\r\n _base = _optionParameters.base;\r\n _quote = _optionParameters.quote;\r\n _expiry = _optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Internal function to check if the option is expired.\r\n */\r\n function isNotExpired() internal view returns (bool) {\r\n return optionParameters.expiry >= block.timestamp;\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IRedeem is IERC20 {\r\n function optionToken() external view returns (address);\r\n\r\n function factory() external view returns (address);\r\n\r\n function mint(address user, uint256 amount) external;\r\n\r\n function burn(address user, uint256 amount) external;\r\n\r\n function initialize(address _factory, address _optionToken) external;\r\n}\r\n" + }, + "contracts/option/interfaces/IFlash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IFlash {\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external;\r\n}\r\n" + }, + "contracts/option/primitives/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @dev Modifies name, symbol, and decimals by deleting them. Implemented as constants in parent contract.\r\n */\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\n/**\r\n * @dev Implementation of the {IERC20} interface.\r\n *\r\n * This implementation is agnostic to the way tokens are created. This means\r\n * that a supply mechanism has to be added in a derived contract using {_mint}.\r\n * For a generic mechanism see {ERC20PresetMinterPauser}.\r\n *\r\n * TIP: For a detailed writeup see our guide\r\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\r\n * to implement supply mechanisms].\r\n *\r\n * We have followed general OpenZeppelin guidelines: functions revert instead\r\n * of returning `false` on failure. This behavior is nonetheless conventional\r\n * and does not conflict with the expectations of ERC20 applications.\r\n *\r\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\r\n * This allows applications to reconstruct the allowance for all accounts just\r\n * by listening to said events. Other implementations of the EIP may not emit\r\n * these events, as it isn't required by the specification.\r\n *\r\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\r\n * functions have been added to mitigate the well-known issues around setting\r\n * allowances. See {IERC20-approve}.\r\n */\r\ncontract ERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n /**\r\n * @dev See {IERC20-totalSupply}.\r\n */\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-balanceOf}.\r\n */\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transfer}.\r\n *\r\n * Requirements:\r\n *\r\n * - `recipient` cannot be the zero address.\r\n * - the caller must have a balance of at least `amount`.\r\n */\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-allowance}.\r\n */\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-approve}.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transferFrom}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance. This is not\r\n * required by the EIP. See the note at the beginning of {ERC20};\r\n *\r\n * Requirements:\r\n * - `sender` and `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n * - the caller must have allowance for ``sender``'s tokens of at least\r\n * `amount`.\r\n */\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override returns (bool) {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically increases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n * - `spender` must have allowance for the caller of at least\r\n * `subtractedValue`.\r\n */\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Moves tokens `amount` from `sender` to `recipient`.\r\n *\r\n * This is internal function is equivalent to {transfer}, and can be used to\r\n * e.g. implement automatic token fees, slashing mechanisms, etc.\r\n *\r\n * Emits a {Transfer} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `sender` cannot be the zero address.\r\n * - `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n */\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\r\n * the total supply.\r\n *\r\n * Emits a {Transfer} event with `from` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `to` cannot be the zero address.\r\n */\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n /**\r\n * @dev Destroys `amount` tokens from `account`, reducing the\r\n * total supply.\r\n *\r\n * Emits a {Transfer} event with `to` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `account` cannot be the zero address.\r\n * - `account` must have at least `amount` tokens.\r\n */\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n /**\r\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\r\n *\r\n * This is internal function is equivalent to `approve`, and can be used to\r\n * e.g. set automatic allowances for certain subsystems, etc.\r\n *\r\n * Emits an {Approval} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `owner` cannot be the zero address.\r\n * - `spender` cannot be the zero address.\r\n */\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n /**\r\n * @dev Sets {decimals} to a value other than the default one of 18.\r\n *\r\n * WARNING: This function should only be called from the constructor. Most\r\n * applications that interact with token contracts will not expect\r\n * {decimals} to ever change, and may work incorrectly if it does.\r\n */\r\n /* function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n } */\r\n\r\n // ======= WARNING: ADDED FUNCTIONS =========\r\n\r\n /* function _setupName(string memory name_) internal {\r\n _name = name_;\r\n }\r\n\r\n function _setupSymbol(string memory symbol_) internal {\r\n _symbol = symbol_;\r\n } */\r\n\r\n // ======= END ADDED FUNCTIONS =========\r\n\r\n /**\r\n * @dev Hook that is called before any transfer of tokens. This includes\r\n * minting and burning.\r\n *\r\n * Calling conditions:\r\n *\r\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\r\n * will be to transferred to `to`.\r\n * - when `from` is zero, `amount` tokens will be minted for `to`.\r\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\r\n * - `from` and `to` are never both zero.\r\n *\r\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r\n */\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {}\r\n}\r\n" + }, + "contracts/option/libraries/OptionTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Option } from \"../primitives/Option.sol\";\r\n\r\nlibrary OptionTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _OPTION_SALT = 0x56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd87; // keccak(\"primitive-option\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function OPTION_SALT() internal pure returns (bytes32) {\r\n return _OPTION_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Option.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Option).creationCode;\r\n implementationAddress = Create2.deploy(0, _OPTION_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Create2.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address) {\n address addr;\n require(address(this).balance >= amount, \"Create2: insufficient balance\");\n require(bytecode.length != 0, \"Create2: bytecode length is zero\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), \"Create2: Failed on deploy\");\n return addr;\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address) {\n bytes32 _data = keccak256(\n abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)\n );\n return address(bytes20(_data << 96));\n }\n}\n" + }, + "contracts/option/applications/NullCloneConstructor.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ncontract NullCloneConstructor {\r\n // solhint-disable-next-line no-empty-blocks\r\n function cloneConstructor(bytes memory consData) public {\r\n // blank\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/CloneLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @title Create2 Clone Factory Library\r\n * @author Alan Lu, Gnosis.\r\n * Raymond Pulver IV.\r\n */\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\n\r\nlibrary CloneLib {\r\n /**\r\n * @dev Calls internal creation computation function.\r\n */\r\n function computeCreationCode(address target)\r\n internal\r\n view\r\n returns (bytes memory clone)\r\n {\r\n clone = computeCreationCode(address(this), target);\r\n }\r\n\r\n /**\r\n * @dev Computes the Clone's creation code.\r\n */\r\n function computeCreationCode(address deployer, address target)\r\n internal\r\n pure\r\n returns (bytes memory clone)\r\n {\r\n bytes memory consData = abi.encodeWithSignature(\r\n \"cloneConstructor(bytes)\",\r\n new bytes(0)\r\n );\r\n clone = new bytes(99 + consData.length);\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n mstore(\r\n add(clone, 0x20),\r\n 0x3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe\r\n )\r\n mstore(\r\n add(clone, 0x2d),\r\n mul(deployer, 0x01000000000000000000000000)\r\n )\r\n mstore(\r\n add(clone, 0x41),\r\n 0x5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be\r\n )\r\n mstore(add(clone, 0x60), mul(target, 0x01000000000000000000000000))\r\n mstore(\r\n add(clone, 116),\r\n 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000\r\n )\r\n }\r\n for (uint256 i = 0; i < consData.length; i++) {\r\n clone[i + 99] = consData[i];\r\n }\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(address target, bytes32 salt)\r\n internal\r\n view\r\n returns (address)\r\n {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(target))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(\r\n address from,\r\n address target,\r\n bytes32 salt\r\n ) internal pure returns (address) {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(from, target)),\r\n from\r\n );\r\n }\r\n\r\n /**\r\n * @dev Computs creation code, and then instantiates it with create2.\r\n */\r\n function create2Clone(address target, uint256 saltNonce)\r\n internal\r\n returns (address result)\r\n {\r\n bytes memory clone = computeCreationCode(target);\r\n bytes32 salt = bytes32(saltNonce);\r\n\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n let len := mload(clone)\r\n let data := add(clone, 0x20)\r\n result := create2(0, data, len, salt)\r\n }\r\n\r\n require(result != address(0), \"ERR_CREATE2_FAIL\");\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IOptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IOptionFactory {\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external;\r\n\r\n function deployOptionTemplate() external;\r\n\r\n function optionTemplate() external returns (address);\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n}\r\n" + }, + "contracts/option/applications/factories/RedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Factory Contract for Redeem Tokens.\r\n * @notice Uses cloning technology on a deployed template contract.\r\n * @author Primitive\r\n */\r\n\r\nimport { Redeem, SafeMath } from \"../../primitives/Redeem.sol\";\r\nimport { RedeemTemplateLib } from \"../../libraries/RedeemTemplateLib.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { IRedeemFactory } from \"../../interfaces/IRedeemFactory.sol\";\r\n\r\ncontract RedeemFactory is IRedeemFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override redeemTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the full bytecode of the Redeem contract to be used as a template for clones.\r\n */\r\n function deployRedeemTemplate() public override {\r\n redeemTemplate = RedeemTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a cloned instance of the template Redeem contract.\r\n * @param optionToken The address of the option token which this redeem clone will be paired with.\r\n * @return redeemAddress The address of the deployed Redeem token clone.\r\n */\r\n function deployClone(address optionToken)\r\n external\r\n override\r\n onlyOwner\r\n returns (address)\r\n {\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n RedeemTemplateLib.REDEEM_SALT(),\r\n owner(),\r\n optionToken\r\n )\r\n );\r\n address redeemAddress = CloneLib.create2Clone(\r\n redeemTemplate,\r\n uint256(salt)\r\n );\r\n Redeem(redeemAddress).initialize(owner(), optionToken);\r\n return redeemAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Redeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Redeem Token\r\n * @notice A token that is redeemable for it's paird option token's assets.\r\n * @author Primitive\r\n */\r\n\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Redeem is IRedeem, ERC20 {\r\n using SafeMath for uint256;\r\n\r\n address public override factory;\r\n address public override optionToken;\r\n\r\n string public constant name = \"Primitive V1 Redeem\";\r\n string public constant symbol = \"RDM\";\r\n uint8 public constant decimals = 18;\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the initial state for the redeem token. Called only once and immediately after deployment.\r\n * @param factory_ The address of the factory contract which handles the deployment.\r\n * @param optionToken_ The address of the option token which this redeem token will be paired with.\r\n */\r\n function initialize(address factory_, address optionToken_)\r\n public\r\n override\r\n {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n factory = factory_;\r\n optionToken = optionToken_;\r\n }\r\n\r\n /**\r\n * @dev Mints redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to mint redeem tokens to.\r\n * @param amount The quantity of redeem tokens to mint.\r\n */\r\n function mint(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _mint(to, amount);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to burn redeem tokens from.\r\n * @param amount The quantity of redeem tokens to burn.\r\n */\r\n function burn(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _burn(to, amount);\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/RedeemTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Redeem } from \"../primitives/Redeem.sol\";\r\n\r\nlibrary RedeemTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _REDEEM_SALT = 0xe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e2; // keccak(\"primitive-redeem\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function REDEEM_SALT() internal pure returns (bytes32) {\r\n return _REDEEM_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Redeem.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Redeem).creationCode;\r\n implementationAddress = Create2.deploy(0, _REDEEM_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRedeemFactory {\r\n function deployClone(address optionToken) external returns (address);\r\n\r\n function deployRedeemTemplate() external;\r\n\r\n function redeemTemplate() external returns (address);\r\n}\r\n" + }, + "contracts/option/applications/Registry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Registry Contract for Deployed Options.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../interfaces/IRegistry.sol\";\r\nimport { IOptionFactory } from \"../interfaces/IOptionFactory.sol\";\r\nimport { IRedeemFactory } from \"../interfaces/IRedeemFactory.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { Pausable } from \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Registry is IRegistry, Ownable, Pausable, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address public override optionFactory;\r\n address public override redeemFactory;\r\n\r\n mapping(address => bool) private verifiedTokens;\r\n mapping(uint256 => bool) private verifiedExpiries;\r\n address[] public allOptionClones;\r\n\r\n event UpdatedOptionFactory(address indexed optionFactory_);\r\n event UpdatedRedeemFactory(address indexed redeemFactory_);\r\n event VerifiedToken(address indexed token);\r\n event VerifiedExpiry(uint256 expiry);\r\n event UnverifiedToken(address indexed token);\r\n event UnverifiedExpiry(uint256 expiry);\r\n event DeployedOptionClone(\r\n address indexed from,\r\n address indexed optionAddress,\r\n address indexed redeemAddress\r\n );\r\n\r\n constructor() public {\r\n transferOwnership(msg.sender);\r\n }\r\n\r\n /**\r\n * @dev Pauses the deployOption function.\r\n */\r\n function pauseDeployments() external override onlyOwner {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @dev Unpauses the deployOption function.\r\n */\r\n function unpauseDeployments() external override onlyOwner {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @dev Sets the option factory contract to use for deploying clones.\r\n * @param optionFactory_ The address of the option factory.\r\n */\r\n function setOptionFactory(address optionFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n optionFactory = optionFactory_;\r\n emit UpdatedOptionFactory(optionFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the redeem factory contract to use for deploying clones.\r\n * @param redeemFactory_ The address of the redeem factory.\r\n */\r\n function setRedeemFactory(address redeemFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n redeemFactory = redeemFactory_;\r\n emit UpdatedRedeemFactory(redeemFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets an ERC-20 token verification status to true.\r\n * @notice A \"verified\" token is a standard ERC-20 token that we have tested with the option contract.\r\n * An example of an \"unverified\" token is a non-standard ERC-20 token which has not been tested.\r\n */\r\n function verifyToken(address tokenAddress) external override onlyOwner {\r\n require(tokenAddress != address(0x0), \"ERR_ZERO_ADDRESS\");\r\n verifiedTokens[tokenAddress] = true;\r\n emit VerifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets a verified token's verification status to false.\r\n */\r\n function unverifyToken(address tokenAddress) external override onlyOwner {\r\n verifiedTokens[tokenAddress] = false;\r\n emit UnverifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to true.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function verifyExpiry(uint256 expiry) external override onlyOwner {\r\n require(expiry >= now, \"ERR_EXPIRED_TIMESTAMP\");\r\n verifiedExpiries[expiry] = true;\r\n emit VerifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to false.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function unverifyExpiry(uint256 expiry) external override onlyOwner {\r\n verifiedExpiries[expiry] = false;\r\n emit UnverifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Deploys an option contract clone with create2.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the deployed option clone.\r\n */\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override nonReentrant whenNotPaused returns (address) {\r\n // Validation checks for option parameters.\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= now, \"ERR_EXPIRY\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(\r\n underlyingToken != address(0x0) && strikeToken != address(0x0),\r\n \"ERR_ZERO_ADDRESS\"\r\n );\r\n\r\n // Deploy option and redeem contract clones.\r\n address optionAddress = IOptionFactory(optionFactory).deployClone(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n address redeemAddress = IRedeemFactory(redeemFactory).deployClone(\r\n optionAddress\r\n );\r\n\r\n // Add the clone to the allOptionClones address array.\r\n allOptionClones.push(optionAddress);\r\n\r\n // Initialize the new option contract's paired redeem token.\r\n IOptionFactory(optionFactory).initRedeemToken(\r\n optionAddress,\r\n redeemAddress\r\n );\r\n emit DeployedOptionClone(msg.sender, optionAddress, redeemAddress);\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Calculates the option address deployed with create2 using the parameter arguments.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = IOptionFactory(optionFactory)\r\n .calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Checks an option address to see if it has verified assets and expiry time.\r\n * @param optionAddress The address of the option token.\r\n * @return bool If the option has verified underlying and strike tokens, and expiry time.\r\n */\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n override\r\n view\r\n returns (bool)\r\n {\r\n IOption option = IOption(optionAddress);\r\n address underlyingToken = option.getUnderlyingTokenAddress();\r\n address strikeToken = option.getStrikeTokenAddress();\r\n uint256 expiry = option.getExpiryTime();\r\n bool verifiedUnderlying = isVerifiedToken(underlyingToken);\r\n bool verifiedStrike = isVerifiedToken(strikeToken);\r\n bool verifiedExpiry = isVerifiedExpiry(expiry);\r\n return verifiedUnderlying && verifiedStrike && verifiedExpiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the length of the allOptionClones address array.\r\n */\r\n function getAllOptionClonesLength() public view returns (uint256) {\r\n return allOptionClones.length;\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedTokens private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedToken(address tokenAddress) public view returns (bool) {\r\n return verifiedTokens[tokenAddress];\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedExpiries private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedExpiry(uint256 expiry) public view returns (bool) {\r\n return verifiedExpiries[expiry];\r\n }\r\n\r\n /**\r\n * @dev Gets the option address and returns address zero if not yet deployed.\r\n * @notice Will calculate the option address using the parameter arguments.\r\n * Checks the code size of the address to see if the contract has been deployed yet.\r\n * If contract has not been deployed, returns address zero.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n uint32 size = checkCodeSize(optionAddress);\r\n if (size > 0) {\r\n return optionAddress;\r\n } else {\r\n return address(0x0);\r\n }\r\n }\r\n\r\n /**\r\n * @dev Checks the code size of a target address and returns the uint32 size.\r\n * @param target The address to check code size.\r\n */\r\n function checkCodeSize(address target) private view returns (uint32) {\r\n uint32 size;\r\n assembly {\r\n size := extcodesize(target)\r\n }\r\n return size;\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Pausable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\ncontract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor () internal {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n */\n modifier whenNotPaused() {\n require(!_paused, \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n */\n modifier whenPaused() {\n require(_paused, \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "contracts/option/extensions/Trader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Trader\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { ITrader } from \"../interfaces/ITrader.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { TraderLib } from \"../libraries/TraderLib.sol\";\r\n\r\ncontract Trader is ITrader, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address payable public weth;\r\n\r\n event TraderMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event TraderExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event TraderRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event TraderClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event TraderUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n constructor(address payable _weth) public {\r\n weth = _weth;\r\n }\r\n\r\n /**\r\n * @dev Mint options at a 1:1 ratio with deposited underlying tokens.\r\n * @notice Also mints redeems at a strike ratio to the deposited underlyings.\r\n * Warning: Calls msg.sender with safeTransferFrom.\r\n * @param optionToken The address of the option contract.\r\n * @param mintQuantity Quantity of options to mint and underlyingToken to deposit.\r\n * @param receiver The newly minted options and redeems are sent to the receiver address.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n mintQuantity,\r\n receiver\r\n );\r\n emit TraderMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 inStrikes, uint256 inOptions) = TraderLib.safeExercise(\r\n optionToken,\r\n exerciseQuantity,\r\n receiver\r\n );\r\n emit TraderExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inStrikes\r\n );\r\n\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inRedeems = outStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256) {\r\n uint256 inRedeems = TraderLib.safeRedeem(\r\n optionToken,\r\n redeemQuantity,\r\n receiver\r\n );\r\n emit TraderRedeem(msg.sender, address(optionToken), inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inOptions = inRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeClose(optionToken, closeQuantity, receiver);\r\n emit TraderClose(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens and redeemTokens are sent to the receiver address.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeUnwind(optionToken, unwindQuantity, receiver);\r\n emit TraderUnwind(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "contracts/test/Flash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Test Flash Exercise contract\r\n * @author Primitive\r\n */\r\n\r\n/**\r\n * A flash exercise is initiated by the exerciseOptions() function in the Option.sol contract.\r\n * Warning: Only correctly implemented wrapper smart contracts can safely execute these flash features.\r\n * Underlying tokens will be sent to the msg.sender of the exerciseOptions() call first.\r\n * The msg.sender should be a smart contract that implements the IFlash interface, which has a single\r\n * function: primitiveFlash().\r\n * The callback function primitiveFlash() can be triggered by passing in any arbritrary data to the\r\n * exerciseOptions() function. If the length of the data is greater than 0, it triggers the callback.\r\n * The implemented primitiveFlash() callback is where customized operations can be undertaken using the\r\n * underlying tokens received from the flash exercise.\r\n * After the callback function (whether its called or not), the exerciseOptions() function checks to see\r\n * if it has been paid the correct amount of strike and option tokens (an actual exercise of the option),\r\n * or if it has received the same quantity of underlying tokens back (a flash loan).\r\n */\r\n\r\nimport { IOption } from \"../option/interfaces/IOption.sol\";\r\nimport { IFlash } from \"../option/interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\n\r\ncontract Flash is IFlash {\r\n using SafeMath for uint256;\r\n\r\n address public optionToken;\r\n\r\n event FlashExercise(address indexed from);\r\n\r\n constructor(address _optionToken) public {\r\n optionToken = _optionToken;\r\n }\r\n\r\n function goodFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(1)\r\n );\r\n }\r\n\r\n function badFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n // bytes(2) will cause our implemented flash exercise to fail\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(2)\r\n );\r\n }\r\n\r\n /**\r\n * @dev An implemented primitiveFlash callback function that matches the interface in Option.sol.\r\n * @notice Calling the exerciseOptions() function in the Option contract will trigger this callback function.\r\n * @param receiver The account which receives the underlying tokens.\r\n * @param outUnderlyings The quantity of underlying tokens received as a flash loan.\r\n * @param data Any data that will be passed as an argument to the original exerciseOptions() call.\r\n */\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override {\r\n // Get the underlying token address.\r\n address underlyingToken = IOption(optionToken)\r\n .getUnderlyingTokenAddress();\r\n // In our test case we pass in the data param with bytes(1).\r\n bool good = keccak256(abi.encodePacked(data)) ==\r\n keccak256(abi.encodePacked(new bytes(1)));\r\n // If the flash exercise went through, we return the loaned underlyings.\r\n if (good) {\r\n IERC20(underlyingToken).transfer(optionToken, outUnderlyings);\r\n }\r\n emit FlashExercise(receiver);\r\n }\r\n}\r\n" + }, + "contracts/test/OptionTest.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Option test contract.\r\n * @author Primitive\r\n */\r\n\r\nimport \"../option/primitives/Option.sol\";\r\n\r\ncontract OptionTest is Option {\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public Option() {}\r\n\r\n function setExpiry(uint256 expiry) public {\r\n optionParameters.expiry = expiry;\r\n }\r\n\r\n function setRedeemToken(address redeem) public {\r\n redeemToken = redeem;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/BadERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\ninterface IERC20 {\r\n function totalSupply() external view returns (uint256);\r\n\r\n function balanceOf(address account) external view returns (uint256);\r\n\r\n function transfer(address recipient, uint256 amount) external;\r\n\r\n function allowance(address owner, address spender)\r\n external\r\n view\r\n returns (uint256);\r\n\r\n function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) external;\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\ncontract BadERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n string private _name;\r\n string private _symbol;\r\n uint8 private _decimals;\r\n\r\n constructor(string memory name, string memory symbol) public {\r\n _name = name;\r\n _symbol = symbol;\r\n _decimals = 18;\r\n }\r\n\r\n function name() public view returns (string memory) {\r\n return _name;\r\n }\r\n\r\n function symbol() public view returns (string memory) {\r\n return _symbol;\r\n }\r\n\r\n function decimals() public view returns (uint8) {\r\n return _decimals;\r\n }\r\n\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n }\r\n\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n function mint(address account, uint256 amount) public {\r\n _mint(account, amount);\r\n }\r\n\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n }\r\n\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n }\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {\r\n // do nothing\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract TestERC20 is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/USDC.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract USDC is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/WETH9.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\n// Copyright (C) 2015, 2016, 2017 Dapphub\r\n\r\n// This program is free software: you can redistribute it and/or modify\r\n// it under the terms of the GNU General Public License as published by\r\n// the Free Software Foundation, either version 3 of the License, or\r\n// (at your option) any later version.\r\n\r\n// This program is distributed in the hope that it will be useful,\r\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n// GNU General Public License for more details.\r\n\r\n// You should have received a copy of the GNU General Public License\r\n// along with this program. If not, see .\r\n\r\npragma solidity ^0.6.2;\r\n\r\ncontract WETH9 {\r\n string public name = \"Wrapped Ether\";\r\n string public symbol = \"WETH\";\r\n uint8 public decimals = 18;\r\n\r\n event Approval(address indexed src, address indexed guy, uint256 wad);\r\n event Transfer(address indexed src, address indexed dst, uint256 wad);\r\n event Deposit(address indexed dst, uint256 wad);\r\n event Withdrawal(address indexed src, uint256 wad);\r\n\r\n mapping(address => uint256) public balanceOf;\r\n mapping(address => mapping(address => uint256)) public allowance;\r\n\r\n /* function() external payable {\r\n deposit();\r\n } */\r\n function deposit() public payable {\r\n balanceOf[msg.sender] += msg.value;\r\n emit Deposit(msg.sender, msg.value);\r\n }\r\n\r\n function withdraw(uint256 wad) public {\r\n require(balanceOf[msg.sender] >= wad);\r\n balanceOf[msg.sender] -= wad;\r\n msg.sender.transfer(wad);\r\n emit Withdrawal(msg.sender, wad);\r\n }\r\n\r\n function totalSupply() public view returns (uint256) {\r\n return address(this).balance;\r\n }\r\n\r\n function approve(address guy, uint256 wad) public returns (bool) {\r\n allowance[msg.sender][guy] = wad;\r\n emit Approval(msg.sender, guy, wad);\r\n return true;\r\n }\r\n\r\n function transfer(address dst, uint256 wad) public returns (bool) {\r\n return transferFrom(msg.sender, dst, wad);\r\n }\r\n\r\n function transferFrom(\r\n address src,\r\n address dst,\r\n uint256 wad\r\n ) public returns (bool) {\r\n require(balanceOf[src] >= wad);\r\n\r\n if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) {\r\n require(allowance[src][msg.sender] >= wad);\r\n allowance[src][msg.sender] -= wad;\r\n }\r\n\r\n balanceOf[src] -= wad;\r\n balanceOf[dst] += wad;\r\n\r\n emit Transfer(src, dst, wad);\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/*\r\n GNU GENERAL PUBLIC LICENSE\r\n Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. \r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n Preamble\r\n\r\n The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works. By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users. We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors. You can apply it to\r\nyour programs, too.\r\n\r\n When we speak of free software, we are referring to freedom, not\r\nprice. Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights. Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received. You must make sure that they, too, receive\r\nor can get the source code. And you must show them these terms so they\r\nknow their rights.\r\n\r\n Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software. For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so. This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software. The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable. Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts. If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary. To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n TERMS AND CONDITIONS\r\n\r\n 0. Definitions.\r\n\r\n \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n \"The Program\" refers to any copyrightable work licensed under this\r\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy. The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy. Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies. Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License. If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n 1. Source Code.\r\n\r\n The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it. \"Object code\" means any non-source\r\nform of a work.\r\n\r\n A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form. A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities. However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work. For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n 2. Basic Permissions.\r\n\r\n All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met. This License explicitly affirms your unlimited\r\npermission to run the unmodified Program. The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work. This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force. You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright. Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below. Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n 4. Conveying Verbatim Copies.\r\n\r\n You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n 5. Conveying Modified Source Versions.\r\n\r\n You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n a) The work must carry prominent notices stating that you modified\r\n it, and giving a relevant date.\r\n\r\n b) The work must carry prominent notices stating that it is\r\n released under this License and any conditions added under section\r\n 7. This requirement modifies the requirement in section 4 to\r\n \"keep intact all notices\".\r\n\r\n c) You must license the entire work, as a whole, under this\r\n License to anyone who comes into possession of a copy. This\r\n License will therefore apply, along with any applicable section 7\r\n additional terms, to the whole of the work, and all its parts,\r\n regardless of how they are packaged. This License gives no\r\n permission to license the work in any other way, but it does not\r\n invalidate such permission if you have separately received it.\r\n\r\n d) If the work has interactive user interfaces, each must display\r\n Appropriate Legal Notices; however, if the Program has interactive\r\n interfaces that do not display Appropriate Legal Notices, your\r\n work need not make them do so.\r\n\r\n A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit. Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n 6. Conveying Non-Source Forms.\r\n\r\n You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n a) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by the\r\n Corresponding Source fixed on a durable physical medium\r\n customarily used for software interchange.\r\n\r\n b) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by a\r\n written offer, valid for at least three years and valid for as\r\n long as you offer spare parts or customer support for that product\r\n model, to give anyone who possesses the object code either (1) a\r\n copy of the Corresponding Source for all the software in the\r\n product that is covered by this License, on a durable physical\r\n medium customarily used for software interchange, for a price no\r\n more than your reasonable cost of physically performing this\r\n conveying of source, or (2) access to copy the\r\n Corresponding Source from a network server at no charge.\r\n\r\n c) Convey individual copies of the object code with a copy of the\r\n written offer to provide the Corresponding Source. This\r\n alternative is allowed only occasionally and noncommercially, and\r\n only if you received the object code with such an offer, in accord\r\n with subsection 6b.\r\n\r\n d) Convey the object code by offering access from a designated\r\n place (gratis or for a charge), and offer equivalent access to the\r\n Corresponding Source in the same way through the same place at no\r\n further charge. You need not require recipients to copy the\r\n Corresponding Source along with the object code. If the place to\r\n copy the object code is a network server, the Corresponding Source\r\n may be on a different server (operated by you or a third party)\r\n that supports equivalent copying facilities, provided you maintain\r\n clear directions next to the object code saying where to find the\r\n Corresponding Source. Regardless of what server hosts the\r\n Corresponding Source, you remain obligated to ensure that it is\r\n available for as long as needed to satisfy these requirements.\r\n\r\n e) Convey the object code using peer-to-peer transmission, provided\r\n you inform other peers where the object code and Corresponding\r\n Source of the work are being offered to the general public at no\r\n charge under subsection 6d.\r\n\r\n A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling. In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage. For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product. A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source. The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information. But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed. Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n 7. Additional Terms.\r\n\r\n \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law. If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit. (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.) You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n a) Disclaiming warranty or limiting liability differently from the\r\n terms of sections 15 and 16 of this License; or\r\n\r\n b) Requiring preservation of specified reasonable legal notices or\r\n author attributions in that material or in the Appropriate Legal\r\n Notices displayed by works containing it; or\r\n\r\n c) Prohibiting misrepresentation of the origin of that material, or\r\n requiring that modified versions of such material be marked in\r\n reasonable ways as different from the original version; or\r\n\r\n d) Limiting the use for publicity purposes of names of licensors or\r\n authors of the material; or\r\n\r\n e) Declining to grant rights under trademark law for use of some\r\n trade names, trademarks, or service marks; or\r\n\r\n f) Requiring indemnification of licensors and authors of that\r\n material by anyone who conveys the material (or modified versions of\r\n it) with contractual assumptions of liability to the recipient, for\r\n any liability that these contractual assumptions directly impose on\r\n those licensors and authors.\r\n\r\n All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10. If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term. If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n 8. Termination.\r\n\r\n You may not propagate or modify a covered work except as expressly\r\nprovided under this License. Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License. If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n 9. Acceptance Not Required for Having Copies.\r\n\r\n You are not required to accept this License in order to receive or\r\nrun a copy of the Program. Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance. However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work. These actions infringe copyright if you do\r\nnot accept this License. Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n 10. Automatic Licensing of Downstream Recipients.\r\n\r\n Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License. You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations. If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License. For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n 11. Patents.\r\n\r\n A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based. The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version. For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement). To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients. \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License. You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n 12. No Surrender of Others' Freedom.\r\n\r\n If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License. If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all. For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n 13. Use with the GNU Affero General Public License.\r\n\r\n Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work. The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n 14. Revised Versions of this License.\r\n\r\n The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time. Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n Each version is given a distinguishing version number. If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation. If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n Later license versions may give you additional or different\r\npermissions. However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n 15. Disclaimer of Warranty.\r\n\r\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n 16. Limitation of Liability.\r\n\r\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n 17. Interpretation of Sections 15 and 16.\r\n\r\n If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n END OF TERMS AND CONDITIONS\r\n\r\n How to Apply These Terms to Your New Programs\r\n\r\n If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n To do so, attach the following notices to the program. It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n \r\n Copyright (C) \r\n\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU General Public License as published by\r\n the Free Software Foundation, either version 3 of the License, or\r\n (at your option) any later version.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n GNU General Public License for more details.\r\n\r\n You should have received a copy of the GNU General Public License\r\n along with this program. If not, see .\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n Copyright (C) \r\n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n This is free software, and you are welcome to redistribute it\r\n under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License. Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n.\r\n\r\n The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs. If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library. If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License. But first, please read\r\n.\r\n\r\n*/\r\n" + } + }, + "settings": { + "metadata": { + "useLiteralContent": false + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "id", + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/test/test_uni_connector.js b/test/test_uni_connector.js index 3b952598..bb785543 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.js @@ -7,7 +7,13 @@ const setup = require("./lib/setup"); const constants = require("./lib/constants"); const { parseEther, formatEther } = require("ethers/lib/utils"); const { assertBNEqual } = utils; -const { ONE_ETHER, TEN_ETHER, HUNDRED_ETHER, MILLION_ETHER } = constants.VALUES; +const { + ONE_ETHER, + TEN_ETHER, + HUNDRED_ETHER, + THOUSAND_ETHER, + MILLION_ETHER, +} = constants.VALUES; const UniswapV2Pair = require("@uniswap/v2-core/build/UniswapV2Pair.json"); describe("UniswapConnector", () => { @@ -51,7 +57,7 @@ describe("UniswapConnector", () => { underlyingToken = weth; strikeToken = dai; base = parseEther("1"); - quote = parseEther("200"); + quote = parseEther("100"); expiry = "1690868800"; // May 30, 2020, 8PM UTC // Option and redeem instances @@ -71,22 +77,24 @@ describe("UniswapConnector", () => { // Trader Instance trader = await setup.newTrader(Admin, weth.address); - // Initialize the uniswap connector - await uniswapConnector.setRouter(uniswapRouter.address); - await uniswapConnector.setFactory(uniswapFactory.address); - await uniswapConnector.setTrader(trader.address); - await uniswapConnector.setRegistry(registry.address); - await uniswapConnector.setQuoteToken(quoteToken.address); - - // Mint some initial weth and approve instances to pull tokens. - await weth.deposit({ from: Alice, value: HUNDRED_ETHER }); + // Initialize the uniswap connector with addresses + await uniswapConnector.initialize( + uniswapRouter.address, + uniswapFactory.address, + trader.address, + registry.address, + quoteToken.address + ); + // Approve tokens to be sent to trader contract await underlyingToken .connect(Admin) .approve(trader.address, MILLION_ETHER); await strikeToken.connect(Admin).approve(trader.address, MILLION_ETHER); await optionToken.connect(Admin).approve(trader.address, MILLION_ETHER); + await redeemToken.connect(Admin).approve(trader.address, MILLION_ETHER); + // Approve tokens to be sent to uniswapConnector await underlyingToken .connect(Admin) .approve(uniswapConnector.address, MILLION_ETHER); @@ -96,7 +104,11 @@ describe("UniswapConnector", () => { await optionToken .connect(Admin) .approve(uniswapConnector.address, MILLION_ETHER); + await redeemToken + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + // Approve tokens to be sent to uniswapRouter await underlyingToken .connect(Admin) .approve(uniswapRouter.address, MILLION_ETHER); @@ -106,16 +118,67 @@ describe("UniswapConnector", () => { await optionToken .connect(Admin) .approve(uniswapRouter.address, MILLION_ETHER); + await redeemToken + .connect(Admin) + .approve(uniswapRouter.address, MILLION_ETHER); + + // Create UNISWAP PAIRS + // option <> dai: 1:10 ($10 option) 1,000 options and 10,000 dai (1,000 weth) + // weth <> dai: 1:100 ($100 weth) 1,000 weth and 100,000 dai + // redeem <> dai: 1:1 ($1 redeem) 100,000 redeems and 100,000 dai + + const totalOptions = parseEther("1000"); + const daiForOptionsPair = parseEther("100000"); + const totalDai = parseEther("210000"); + const totalWethForPair = parseEther("1000"); + const totalDaiForPair = parseEther("100000"); + const totalRedeemForPair = parseEther("100000"); - // Create a Uniswap V2 Pair and add liquidity. - await trader.safeMint(optionToken.address, TEN_ETHER, Alice); - //await uniswapFactory.createPair(optionToken.address, dai.address); + // MINT 2,010 WETH + await weth.deposit({ from: Alice, value: parseEther("2500") }); + + // MINT 1,000 OPTIONS + await trader.safeMint(optionToken.address, totalOptions, Alice); + + // Mint some options for tests + await trader.safeMint(optionToken.address, parseEther("10"), Alice); + + // MINT 210,000 DAI + await dai.mint(Alice, totalDai); + + // regular deadline const deadline = Math.floor(Date.now() / 1000) + 60 * 20; + + // Add liquidity to option <> dai pair await uniswapRouter.addLiquidity( optionToken.address, dai.address, - TEN_ETHER, - HUNDRED_ETHER, + totalOptions, + daiForOptionsPair, + 0, + 0, + Alice, + deadline + ); + + // Add liquidity to weth <> dai pair + await uniswapRouter.addLiquidity( + weth.address, + dai.address, + totalWethForPair, + totalDaiForPair, + 0, + 0, + Alice, + deadline + ); + + // Add liquidity to redeem <> dai pair + await uniswapRouter.addLiquidity( + redeemToken.address, + dai.address, + totalRedeemForPair, + totalDaiForPair, 0, 0, Alice, @@ -210,15 +273,13 @@ describe("UniswapConnector", () => { let deadline = Math.floor(Date.now() / 1000) + 60 * 20; // Call the function - await expect( - uniswapConnector.mintOptionsThenSwapToTokens( - optionTokenAddress, - amountIn, - amountOutMin, - path, - to, - deadline - ) + await uniswapConnector.mintOptionsThenSwapToTokens( + optionTokenAddress, + amountIn, + amountOutMin, + path, + to, + deadline ); let underlyingBalanceAfter = await underlyingToken.balanceOf(Alice); @@ -379,8 +440,7 @@ describe("UniswapConnector", () => { // Function parameters let rollFromOption = rollFromOptionToken.address; let rollToOption = rollToOptionToken.address; - let liquidity = await rollFromPair.balanceOf(Alice); - console.log(formatEther(liquidity)); + let liquidity = ONE_ETHER; let amountAMin = 0; let amountBMin = 0; let to = Alice; @@ -469,16 +529,14 @@ describe("UniswapConnector", () => { let minQuantityQuoteTokens = 0; let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; - await expect( - uniswapConnector.addLiquidityWithUnderlying( - optionAddress, - quantityOptions, - quantityQuoteTokens, - minQuantityOptions, - minQuantityQuoteTokens, - to, - deadline - ) + await uniswapConnector.addLiquidityWithUnderlying( + optionAddress, + quantityOptions, + quantityQuoteTokens, + minQuantityOptions, + minQuantityQuoteTokens, + to, + deadline ); }); }); @@ -498,19 +556,71 @@ describe("UniswapConnector", () => { let optionAddress = optionToken.address; let liquidity = ONE_ETHER; + let pairAddress = await uniswapConnector.getUniswapMarketForOption( + optionToken.address + ); + let pair = new ethers.Contract( + pairAddress, + UniswapV2Pair.abi, + Admin + ); + console.log(formatEther(await pair.balanceOf(Alice))); + await pair + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + assert.equal( + (await pair.balanceOf(Alice)) >= liquidity, + true, + "err not enough pair tokens" + ); + assert.equal( + pairAddress != constants.ADDRESSES.ZERO_ADDRESS, + true, + "err pair not deployed" + ); let amountAMin = 0; let amountBMin = 0; let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; - await expect( - uniswapConnector.removeLiquidityThenCloseOptions( - optionAddress, - liquidity, - amountAMin, - amountBMin, - to, - deadline - ) + await uniswapConnector.removeLiquidityThenCloseOptions( + optionAddress, + liquidity, + amountAMin, + amountBMin, + to, + deadline + ); + }); + }); + + describe("openFlashShort", () => { + it("gets a flash loan for underlyings, mints options, swaps redeem to underlyings to pay back", async () => { + // Create a Uniswap V2 Pair and add liquidity. + + console.log( + `Redeem balance: ${formatEther( + await redeemToken.balanceOf(Alice) + )}` + ); + + console.log( + `Option balance: ${formatEther( + await optionToken.balanceOf(Alice) + )}` + ); + + // Get the pair instance to approve it to the uniswapConnector + assert.equal( + quoteToken.address, + await uniswapConnector.quoteToken(), + "QuoteToken mismatch" + ); + let amountOptions = ONE_ETHER; + let amountOutMin = "0"; + await uniswapConnector.openFlashShort( + amountOptions, + amountOutMin, + optionToken.address ); }); }); From 56bc722ba80f1d3dd5a0aab301184c304f419cde Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Wed, 28 Oct 2020 17:52:17 -0700 Subject: [PATCH 03/20] Figured out why revert. Mutex in swap function after calling swapExact.. --- artifacts/UniswapConnector.json | 73 ++--- .../connectors/Uniswap/UniswapConnector.sol | 93 +++--- .../localhost_31337/OptionFactory.json | 12 +- .../localhost_31337/OptionTemplateLib.json | 4 +- .../localhost_31337/RedeemFactory.json | 12 +- .../localhost_31337/RedeemTemplateLib.json | 4 +- deployments/localhost_31337/Registry.json | 24 +- deployments/localhost_31337/TestERC20.json | 18 +- deployments/localhost_31337/Trader.json | 8 +- deployments/localhost_31337/USDC.json | 18 +- .../localhost_31337/UniswapConnector.json | 176 +++++------ deployments/localhost_31337/WETH9.json | 14 +- .../localhost_31337/WethConnector.json | 12 +- ...ba2762aebc0c9f542a70b8574981b5d9482d3.json | 171 +++++++++++ test/test_uni_connector.js | 16 +- test/test_uni_flash.js | 283 ++++++++++++++++++ 16 files changed, 674 insertions(+), 264 deletions(-) create mode 100644 deployments/localhost_31337/solcInputs/0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3.json create mode 100644 test/test_uni_flash.js diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index ca233f38..a7fcd8e2 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -6,6 +6,25 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + } + ], + "name": "FlashedShortOption", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -303,8 +322,8 @@ "type": "address" }, { - "internalType": "contract IOption", - "name": "optionToken", + "internalType": "address", + "name": "optionAddress", "type": "address" }, { @@ -337,7 +356,7 @@ "outputs": [ { "internalType": "bool", - "name": "", + "name": "success", "type": "bool" } ], @@ -492,50 +511,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "mintShortOptionsThenSwapToTokens", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -870,8 +845,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615bc180620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638ac32329116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610dce578063f2fde38b14610e18578063f441e35014610e5c578063f887ea4014610f02576101c4565b8063acc7943814610c99578063ad5c464814610d40578063c0d7865514610d8a576101c4565b806395f0ae76116100d357806395f0ae76146109955780639bb9ef2914610ac3578063a6bc18f914610c11578063a91ee0dc14610c55576101c4565b80638ac32329146107d95780638d2a1cf11461089d5780638da5cb5b1461094b576101c4565b806351b8498f116101665780636bd64c3a116101405780636bd64c3a146106e35780636d4542bd14610701578063715018a6146107855780637b1039991461078f576101c4565b806351b8498f146105595780635bb478081461061b5780636af255d71461065f576101c4565b80631cfb886d116101a25780631cfb886d14610384578063217a4b70146103c85780632ea4fbb41461041257806338bd2aaa14610501576101c4565b806310d1e85c146101c95780631459457a146102765780631758078b1461033a575b600080fd5b610274600480360360808110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184600183028401116401000000008311171561026457600080fd5b9091929391929390505050610f4c565b005b610338600480360360a081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611041565b005b610342611684565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c66004803603602081101561039a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116aa565b005b6103d0611811565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e7600480360360c081101561042857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611837565b604051808215151515815260200191505060405180910390f35b6105576004803603606081101561051757600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ce565b005b6105d9600480360360a081101561056f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612172565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61065d6004803603602081101561063157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612355565b005b6106a16004803603602081101561067557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124bc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb6125fc565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061260d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078d6127ee565b005b610797612976565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610883600480360360e08110156107ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061299c565b604051808215151515815260200191505060405180910390f35b610931600480360360e08110156108b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ac6565b604051808215151515815260200191505060405180910390f35b610953613012565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aa9600480360360c08110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109fc57600080fd5b820183602082011115610a0e57600080fd5b80359060200191846020830284011164010000000083111715610a3057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061303b565b604051808215151515815260200191505060405180910390f35b610bf7600480360360e0811015610ad957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610b4a57600080fd5b820183602082011115610b5c57600080fd5b80359060200191846020830284011164010000000083111715610b7e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613196565b604051808215151515815260200191505060405180910390f35b610c5360048036036020811015610c2757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134cd565b005b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613634565b005b610d23600480360360c0811015610caf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061379b565b604051808381526020018281526020019250505060405180910390f35b610d486140c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dcc60048036036020811015610da057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140de565b005b610dd6614245565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e5a60048036036020811015610e2e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061426b565b005b610ee860048036036080811015610e7257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614478565b604051808215151515815260200191505060405180910390f35b610f0a6147a3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610fbb576040519150601f19603f3d011682016040523d82523d6000602084013e610fc0565b606091505b509150915081611038576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6110496147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461110a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611292576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461141a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116b26147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611773576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006118478a8a306147d1565b91509150600061189c8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6149d1565b91505080611912576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6119bd86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195d57600080fd5b505afa158015611971573d6000803e3d6000fd5b505050506040513d602081101561198757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9b57600080fd5b505afa158015611aaf573d6000803e3d6000fd5b505050506040513d6020811015611ac557600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611bcf57600080fd5b505afa158015611be3573d6000803e3d6000fd5b505050506040513d6020811015611bf957600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611c3e5781602001602082028038833980820191505090505b5090508381600081518110611c4f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611cb957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611d0157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615b06605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611e60578082015181840152602081019050611e45565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2f57600080fd5b505afa158015611f43573d6000803e3d6000fd5b505050506040513d6020811015611f5957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f8c576000611f8e565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611fef57600080fd5b505afa158015612003573d6000803e3d6000fd5b505050506040513d602081101561201957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461204b578b61204e565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156120fd5780820151818401526020810190506120e2565b50505050905090810190601f16801561212a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561214c57600080fd5b505af1158015612160573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561226057600080fd5b505afa158015612274573d6000803e3d6000fd5b505050506040513d602081101561228a57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612340576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6123498161260d565b91505095945050505050565b61235d6147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461241e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156125b657600080fd5b505af11580156125ca573d6000803e3d6000fd5b505050506040513d60208110156125e057600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561270557600080fd5b505afa158015612719573d6000803e3d6000fd5b505050506040513d602081101561272f57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6127f66147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146128b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006129af8a898989898961379b565b9150915060006129c48a84848b8b8b8b612ac6565b905080612a39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612b49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612bde33308a8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b600080612bec8c8c306147d1565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c9757600080fd5b505af1158015612cab573d6000803e3d6000fd5b505050506040513d6020811015612cc157600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d7a57600080fd5b505af1158015612d8e573d6000803e3d6000fd5b505050506040513d6020811015612da457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612ee757600080fd5b505af1158015612efb573d6000803e3d6000fd5b505050506040513d6060811015612f1157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612fe433828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f8457600080fd5b505afa158015612f98573d6000803e3d6000fd5b505050506040513d6020811015612fae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600061304b8989306147d1565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561309757600080fd5b505afa1580156130ab573d6000803e3d6000fd5b505050506040513d60208110156130c157600080fd5b8101908080519060200190929190505050905060006130e482848b8b8b8b6149d1565b9150508061315a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61318587858d73ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b809450505050509695505050505050565b600080861161320d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000613249613226600389614f0090919063ffffffff16565b61323b6103e88a614f0090919063ffffffff16565b614f8690919063ffffffff16565b905060008873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561329357600080fd5b505afa1580156132a7573d6000803e3d6000fd5b505050506040513d60208110156132bd57600080fd5b81019080805190602001909291905050509050613311858b6132ea6103e88661500e90919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6133d18173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561339157600080fd5b505afa1580156133a5573d6000803e3d6000fd5b505050506040513d60208110156133bb57600080fd5b8101908080519060200190929190505050615058565b6133fc8a898373ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b6134bc8173ffffffffffffffffffffffffffffffffffffffff166370a082318c6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561347c57600080fd5b505afa158015613490573d6000803e3d6000fd5b505050506040513d60208110156134a657600080fd5b8101908080519060200190929190505050615058565b600192505050979650505050505050565b6134d56147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613596576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363c6147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138718b61260d565b90506138a033308c8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396957600080fd5b505af115801561397d573d6000803e3d6000fd5b505050506040513d602081101561399357600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ad157600080fd5b505af1158015613ae5573d6000803e3d6000fd5b505050506040513d6040811015613afb57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be857600080fd5b505af1158015613bfc573d6000803e3d6000fd5b505050506040513d6020811015613c1257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6a57600080fd5b505afa158015613c7e573d6000803e3d6000fd5b505050506040513d6020811015613c9457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4b57600080fd5b505af1158015613d5f573d6000803e3d6000fd5b505050506040513d6020811015613d7557600080fd5b8101908080519060200190929190505050506000613ead8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dd257600080fd5b505afa158015613de6573d6000803e3d6000fd5b505050506040513d6020811015613dfc57600080fd5b8101908080519060200190929190505050613e9f8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5557600080fd5b505afa158015613e69573d6000803e3d6000fd5b505050506040513d6020811015613e7f57600080fd5b810190808051906020019092919050505087614f0090919063ffffffff16565b61500e90919063ffffffff16565b9050613f5c3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613efb57600080fd5b505afa158015613f0f573d6000803e3d6000fd5b505050506040513d6020811015613f2557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401857600080fd5b505af115801561402c573d6000803e3d6000fd5b505050506040513d606081101561404257600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061409589838773ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140e66147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146141a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6142736147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143ba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615abf6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806144868685306150f1565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144f757600080fd5b505afa15801561450b573d6000803e3d6000fd5b505050506040513d602081101561452157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d857600080fd5b505af11580156145ec573d6000803e3d6000fd5b505050506040513d602081101561460257600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146d057600080fd5b505af11580156146e4573d6000803e3d6000fd5b505050506040513d60408110156146fa57600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b6000806000841161484a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6148f73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561489657600080fd5b505afa1580156148aa573d6000803e3d6000fd5b505050506040513d60208110156148c057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561497857600080fd5b505af115801561498c573d6000803e3d6000fd5b505050506040513d60408110156149a257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106149f957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614a8a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614b5857600080fd5b505af1158015614b6c573d6000803e3d6000fd5b505050506040513d6020811015614b8257600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614c4b578082015181840152602081019050614c30565b505050509050019650505050505050600060405180830381600087803b158015614c7457600080fd5b505af1158015614c88573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614cb257600080fd5b8101908080516040519392919084640100000000821115614cd257600080fd5b83820191506020820185811115614ce857600080fd5b8251866020820283011164010000000082111715614d0557600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614d3c578082015181840152602081019050614d21565b5050505090500160405250505092506001915050965096945050505050565b614e0e8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615739565b505050565b614efa846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615739565b50505050565b600080831415614f135760009050614f80565b6000828402905082848281614f2457fe5b0414614f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615ae56021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015615004576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061505083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615984565b905092915050565b6150ee81604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a4a565b50565b600080600080851161516b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156151e957600080fd5b505afa1580156151fd573d6000803e3d6000fd5b505050506040513d602081101561521357600080fd5b81019080805190602001909291905050501015615298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006153be8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156152e357600080fd5b505afa1580156152f7573d6000803e3d6000fd5b505050506040513d602081101561530d57600080fd5b81019080805190602001909291905050506153b08973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561536657600080fd5b505afa15801561537a573d6000803e3d6000fd5b505050506040513d602081101561539057600080fd5b810190808051906020019092919050505089614f0090919063ffffffff16565b61500e90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561540757600080fd5b505afa15801561541b573d6000803e3d6000fd5b505050506040513d602081101561543157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156154be57600080fd5b505afa1580156154d2573d6000803e3d6000fd5b505050506040513d60208110156154e857600080fd5b8101908080519060200190929190505050101561556d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61561a3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155b957600080fd5b505afa1580156155cd573d6000803e3d6000fd5b505050506040513d60208110156155e357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6156473388888a73ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156156c957600080fd5b505af11580156156dd573d6000803e3d6000fd5b505050506040513d60608110156156f357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6157588273ffffffffffffffffffffffffffffffffffffffff16615a73565b6157ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061581957805182526020820191506020810190506020830392506157f6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461587b576040519150601f19603f3d011682016040523d82523d6000602084013e615880565b606091505b5091509150816158f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561597e5780806020019051602081101561591757600080fd5b810190808051906020019092919050505061597d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b62602a913960400191505060405180910390fd5b5b50505050565b60008083118290615a30576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156159f55780820151818401526020810190506159da565b50505050905090810190601f168015615a225780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615a3c57fe5b049050809150509392505050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ab557506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220bcff2a0b5703dd8579bace6132dccc3cae8078514c6b24bb7f05af54046a03c264736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638ac32329116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610dce578063f2fde38b14610e18578063f441e35014610e5c578063f887ea4014610f02576101c4565b8063acc7943814610c99578063ad5c464814610d40578063c0d7865514610d8a576101c4565b806395f0ae76116100d357806395f0ae76146109955780639bb9ef2914610ac3578063a6bc18f914610c11578063a91ee0dc14610c55576101c4565b80638ac32329146107d95780638d2a1cf11461089d5780638da5cb5b1461094b576101c4565b806351b8498f116101665780636bd64c3a116101405780636bd64c3a146106e35780636d4542bd14610701578063715018a6146107855780637b1039991461078f576101c4565b806351b8498f146105595780635bb478081461061b5780636af255d71461065f576101c4565b80631cfb886d116101a25780631cfb886d14610384578063217a4b70146103c85780632ea4fbb41461041257806338bd2aaa14610501576101c4565b806310d1e85c146101c95780631459457a146102765780631758078b1461033a575b600080fd5b610274600480360360808110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184600183028401116401000000008311171561026457600080fd5b9091929391929390505050610f4c565b005b610338600480360360a081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611041565b005b610342611684565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c66004803603602081101561039a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116aa565b005b6103d0611811565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e7600480360360c081101561042857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611837565b604051808215151515815260200191505060405180910390f35b6105576004803603606081101561051757600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ce565b005b6105d9600480360360a081101561056f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612172565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61065d6004803603602081101561063157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612355565b005b6106a16004803603602081101561067557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124bc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb6125fc565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061260d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078d6127ee565b005b610797612976565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610883600480360360e08110156107ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061299c565b604051808215151515815260200191505060405180910390f35b610931600480360360e08110156108b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ac6565b604051808215151515815260200191505060405180910390f35b610953613012565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aa9600480360360c08110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109fc57600080fd5b820183602082011115610a0e57600080fd5b80359060200191846020830284011164010000000083111715610a3057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061303b565b604051808215151515815260200191505060405180910390f35b610bf7600480360360e0811015610ad957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610b4a57600080fd5b820183602082011115610b5c57600080fd5b80359060200191846020830284011164010000000083111715610b7e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613196565b604051808215151515815260200191505060405180910390f35b610c5360048036036020811015610c2757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134cd565b005b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613634565b005b610d23600480360360c0811015610caf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061379b565b604051808381526020018281526020019250505060405180910390f35b610d486140c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dcc60048036036020811015610da057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140de565b005b610dd6614245565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e5a60048036036020811015610e2e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061426b565b005b610ee860048036036080811015610e7257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614478565b604051808215151515815260200191505060405180910390f35b610f0a6147a3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610fbb576040519150601f19603f3d011682016040523d82523d6000602084013e610fc0565b606091505b509150915081611038576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6110496147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461110a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611292576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461141a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116b26147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611773576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006118478a8a306147d1565b91509150600061189c8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6149d1565b91505080611912576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6119bd86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195d57600080fd5b505afa158015611971573d6000803e3d6000fd5b505050506040513d602081101561198757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9b57600080fd5b505afa158015611aaf573d6000803e3d6000fd5b505050506040513d6020811015611ac557600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611bcf57600080fd5b505afa158015611be3573d6000803e3d6000fd5b505050506040513d6020811015611bf957600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611c3e5781602001602082028038833980820191505090505b5090508381600081518110611c4f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611cb957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611d0157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615b06605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611e60578082015181840152602081019050611e45565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2f57600080fd5b505afa158015611f43573d6000803e3d6000fd5b505050506040513d6020811015611f5957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f8c576000611f8e565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611fef57600080fd5b505afa158015612003573d6000803e3d6000fd5b505050506040513d602081101561201957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461204b578b61204e565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156120fd5780820151818401526020810190506120e2565b50505050905090810190601f16801561212a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561214c57600080fd5b505af1158015612160573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561226057600080fd5b505afa158015612274573d6000803e3d6000fd5b505050506040513d602081101561228a57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612340576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6123498161260d565b91505095945050505050565b61235d6147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461241e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156125b657600080fd5b505af11580156125ca573d6000803e3d6000fd5b505050506040513d60208110156125e057600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561270557600080fd5b505afa158015612719573d6000803e3d6000fd5b505050506040513d602081101561272f57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6127f66147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146128b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006129af8a898989898961379b565b9150915060006129c48a84848b8b8b8b612ac6565b905080612a39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612b49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612bde33308a8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b600080612bec8c8c306147d1565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c9757600080fd5b505af1158015612cab573d6000803e3d6000fd5b505050506040513d6020811015612cc157600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d7a57600080fd5b505af1158015612d8e573d6000803e3d6000fd5b505050506040513d6020811015612da457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612ee757600080fd5b505af1158015612efb573d6000803e3d6000fd5b505050506040513d6060811015612f1157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612fe433828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f8457600080fd5b505afa158015612f98573d6000803e3d6000fd5b505050506040513d6020811015612fae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600061304b8989306147d1565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561309757600080fd5b505afa1580156130ab573d6000803e3d6000fd5b505050506040513d60208110156130c157600080fd5b8101908080519060200190929190505050905060006130e482848b8b8b8b6149d1565b9150508061315a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61318587858d73ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b809450505050509695505050505050565b600080861161320d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000613249613226600389614f0090919063ffffffff16565b61323b6103e88a614f0090919063ffffffff16565b614f8690919063ffffffff16565b905060008873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561329357600080fd5b505afa1580156132a7573d6000803e3d6000fd5b505050506040513d60208110156132bd57600080fd5b81019080805190602001909291905050509050613311858b6132ea6103e88661500e90919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6133d18173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561339157600080fd5b505afa1580156133a5573d6000803e3d6000fd5b505050506040513d60208110156133bb57600080fd5b8101908080519060200190929190505050615058565b6133fc8a898373ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b6134bc8173ffffffffffffffffffffffffffffffffffffffff166370a082318c6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561347c57600080fd5b505afa158015613490573d6000803e3d6000fd5b505050506040513d60208110156134a657600080fd5b8101908080519060200190929190505050615058565b600192505050979650505050505050565b6134d56147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613596576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363c6147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138718b61260d565b90506138a033308c8473ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396957600080fd5b505af115801561397d573d6000803e3d6000fd5b505050506040513d602081101561399357600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ad157600080fd5b505af1158015613ae5573d6000803e3d6000fd5b505050506040513d6040811015613afb57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be857600080fd5b505af1158015613bfc573d6000803e3d6000fd5b505050506040513d6020811015613c1257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6a57600080fd5b505afa158015613c7e573d6000803e3d6000fd5b505050506040513d6020811015613c9457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4b57600080fd5b505af1158015613d5f573d6000803e3d6000fd5b505050506040513d6020811015613d7557600080fd5b8101908080519060200190929190505050506000613ead8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dd257600080fd5b505afa158015613de6573d6000803e3d6000fd5b505050506040513d6020811015613dfc57600080fd5b8101908080519060200190929190505050613e9f8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5557600080fd5b505afa158015613e69573d6000803e3d6000fd5b505050506040513d6020811015613e7f57600080fd5b810190808051906020019092919050505087614f0090919063ffffffff16565b61500e90919063ffffffff16565b9050613f5c3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613efb57600080fd5b505afa158015613f0f573d6000803e3d6000fd5b505050506040513d6020811015613f2557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401857600080fd5b505af115801561402c573d6000803e3d6000fd5b505050506040513d606081101561404257600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061409589838773ffffffffffffffffffffffffffffffffffffffff16614d5b9092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140e66147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146141a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6142736147c9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614334576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143ba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615abf6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806144868685306150f1565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144f757600080fd5b505afa15801561450b573d6000803e3d6000fd5b505050506040513d602081101561452157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d857600080fd5b505af11580156145ec573d6000803e3d6000fd5b505050506040513d602081101561460257600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146d057600080fd5b505af11580156146e4573d6000803e3d6000fd5b505050506040513d60408110156146fa57600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b6000806000841161484a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6148f73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561489657600080fd5b505afa1580156148aa573d6000803e3d6000fd5b505050506040513d60208110156148c057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561497857600080fd5b505af115801561498c573d6000803e3d6000fd5b505050506040513d60408110156149a257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106149f957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614a8a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614b5857600080fd5b505af1158015614b6c573d6000803e3d6000fd5b505050506040513d6020811015614b8257600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614c4b578082015181840152602081019050614c30565b505050509050019650505050505050600060405180830381600087803b158015614c7457600080fd5b505af1158015614c88573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614cb257600080fd5b8101908080516040519392919084640100000000821115614cd257600080fd5b83820191506020820185811115614ce857600080fd5b8251866020820283011164010000000082111715614d0557600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614d3c578082015181840152602081019050614d21565b5050505090500160405250505092506001915050965096945050505050565b614e0e8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615739565b505050565b614efa846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615739565b50505050565b600080831415614f135760009050614f80565b6000828402905082848281614f2457fe5b0414614f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615ae56021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015615004576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061505083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615984565b905092915050565b6150ee81604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a4a565b50565b600080600080851161516b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156151e957600080fd5b505afa1580156151fd573d6000803e3d6000fd5b505050506040513d602081101561521357600080fd5b81019080805190602001909291905050501015615298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006153be8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156152e357600080fd5b505afa1580156152f7573d6000803e3d6000fd5b505050506040513d602081101561530d57600080fd5b81019080805190602001909291905050506153b08973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561536657600080fd5b505afa15801561537a573d6000803e3d6000fd5b505050506040513d602081101561539057600080fd5b810190808051906020019092919050505089614f0090919063ffffffff16565b61500e90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561540757600080fd5b505afa15801561541b573d6000803e3d6000fd5b505050506040513d602081101561543157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156154be57600080fd5b505afa1580156154d2573d6000803e3d6000fd5b505050506040513d60208110156154e857600080fd5b8101908080519060200190929190505050101561556d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61561a3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155b957600080fd5b505afa1580156155cd573d6000803e3d6000fd5b505050506040513d60208110156155e357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6156473388888a73ffffffffffffffffffffffffffffffffffffffff16614e13909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156156c957600080fd5b505af11580156156dd573d6000803e3d6000fd5b505050506040513d60608110156156f357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6157588273ffffffffffffffffffffffffffffffffffffffff16615a73565b6157ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061581957805182526020820191506020810190506020830392506157f6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461587b576040519150601f19603f3d011682016040523d82523d6000602084013e615880565b606091505b5091509150816158f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561597e5780806020019051602081101561591757600080fd5b810190808051906020019092919050505061597d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b62602a913960400191505060405180910390fd5b5b50505050565b60008083118290615a30576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156159f55780820151818401526020810190506159da565b50505050905090810190601f168015615a225780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615a3c57fe5b049050809150509392505050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ab557506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220bcff2a0b5703dd8579bace6132dccc3cae8078514c6b24bb7f05af54046a03c264736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615fbe80620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612070565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612253565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506123ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d06124fa565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061250b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107726126ec565b005b61077c612874565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061289a565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129c4565b604051808215151515815260200191505060405180910390f35b610938612f10565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612f39565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134c5565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061362c565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613793565b604051808381526020018281526020019250505060405180910390f35b610bff6140be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140d6565b005b610c8d61423d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614263565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614470565b604051808215151515815260200191505060405180910390f35b610dc161479b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f0000000000000000000000000000000000008152506147c1565b610ec3826148bf565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f4761495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b061495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a30614964565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614b64565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611acd57600080fd5b505afa158015611ae1573d6000803e3d6000fd5b505050506040513d6020811015611af757600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611b3c5781602001602082028038833980820191505090505b5090508381600081518110611b4d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611bb757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611bff57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615f03605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611d5e578082015181840152602081019050611d43565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e8a576000611e8c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611eed57600080fd5b505afa158015611f01573d6000803e3d6000fd5b505050506040513d6020811015611f1757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f49578b611f4c565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611ffb578082015181840152602081019050611fe0565b50505050905090810190601f1680156120285780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561204a57600080fd5b505af115801561205e573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561215e57600080fd5b505afa158015612172573d6000803e3d6000fd5b505050506040513d602081101561218857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561223e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6122478161250b565b91505095945050505050565b61225b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461231c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156124b457600080fd5b505af11580156124c8573d6000803e3d6000fd5b505050506040513d60208110156124de57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561260357600080fd5b505afa158015612617573d6000803e3d6000fd5b505050506040513d602081101561262d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156126e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126f461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128ad8a8989898989613793565b9150915060006128c28a84848b8b8b8b6129c4565b905080612937576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612adc33308a8473ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b600080612aea8c8c30614964565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b9557600080fd5b505af1158015612ba9573d6000803e3d6000fd5b505050506040513d6020811015612bbf57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c7857600080fd5b505af1158015612c8c573d6000803e3d6000fd5b505050506040513d6020811015612ca257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612de557600080fd5b505af1158015612df9573d6000803e3d6000fd5b505050506040513d6060811015612e0f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612ee233828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e8257600080fd5b505afa158015612e96573d6000803e3d6000fd5b505050506040513d6020811015612eac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612fb0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612ff857600080fd5b505afa15801561300c573d6000803e3d6000fd5b505050506040513d602081101561302257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168560028151811061305957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146130ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61311588888373ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561319657600080fd5b505af11580156131aa573d6000803e3d6000fd5b505050506040513d60408110156131c057600080fd5b8101908080519060200190929190805190602001909291905050509150915061321d6040518060400160405280600e81526020017f6d696e746564206f7074696f6e730000000000000000000000000000000000008152506147c1565b600086905060008c9050600085905061326a6040518060400160405280600881526020017f7377617070696e670000000000000000000000000000000000000000000000008152506147c1565b606060006132fc8f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156132b757600080fd5b505afa1580156132cb573d6000803e3d6000fd5b505050506040513d60208110156132e157600080fd5b8101908080519060200190929190505050878f8f888f614b64565b9150915080985061330c89615156565b8861337f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000808f905060008460028151811061339457fe5b602002602001015190506133fe816133f06103e86133e26133bf6003886151f390919063ffffffff16565b6133d46103e8896151f390919063ffffffff16565b61527990919063ffffffff16565b61530190919063ffffffff16565b61534b90919063ffffffff16565b9250505061340b81615395565b6134388686838773ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b50505050505061346986838c73ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a2505050979650505050505050565b6134cd61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461358e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138698b61250b565b905061389833308c8473ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396157600080fd5b505af1158015613975573d6000803e3d6000fd5b505050506040513d602081101561398b57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ac957600080fd5b505af1158015613add573d6000803e3d6000fd5b505050506040513d6040811015613af357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be057600080fd5b505af1158015613bf4573d6000803e3d6000fd5b505050506040513d6020811015613c0a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6257600080fd5b505afa158015613c76573d6000803e3d6000fd5b505050506040513d6020811015613c8c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4357600080fd5b505af1158015613d57573d6000803e3d6000fd5b505050506040513d6020811015613d6d57600080fd5b8101908080519060200190929190505050506000613ea58573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dca57600080fd5b505afa158015613dde573d6000803e3d6000fd5b505050506040513d6020811015613df457600080fd5b8101908080519060200190929190505050613e978773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4d57600080fd5b505afa158015613e61573d6000803e3d6000fd5b505050506040513d6020811015613e7757600080fd5b8101908080519060200190929190505050876151f390919063ffffffff16565b61530190919063ffffffff16565b9050613f543330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ef357600080fd5b505afa158015613f07573d6000803e3d6000fd5b505050506040513d6020811015613f1d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401057600080fd5b505af1158015614024573d6000803e3d6000fd5b505050506040513d606081101561403a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061408d89838773ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140de61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461419f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61426b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461432c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143b2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ebc6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061447e86853061542e565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144ef57600080fd5b505afa158015614503573d6000803e3d6000fd5b505050506040513d602081101561451957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d057600080fd5b505af11580156145e4573d6000803e3d6000fd5b505050506040513d60208110156145fa57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146c857600080fd5b505af11580156146dc573d6000803e3d6000fd5b505050506040513d60408110156146f257600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6148bc816040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156148085780820151818401526020810190506147ed565b50505050905090810190601f1680156148355780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b6149598160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b600033905090565b600080600084116149dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a8a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a2957600080fd5b505afa158015614a3d573d6000803e3d6000fd5b505050506040513d6020811015614a5357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614b0b57600080fd5b505af1158015614b1f573d6000803e3d6000fd5b505050506040513d6040811015614b3557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b60606000614ba66040518060400160405280601181526020017f7377617070696e6720696e7465726e616c0000000000000000000000000000008152506147c1565b8773ffffffffffffffffffffffffffffffffffffffff1685600081518110614bca57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050614cc06040518060400160405280601081526020017f617070726f76696e6720726f75746572000000000000000000000000000000008152506147c1565b8873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d6757600080fd5b505af1158015614d7b573d6000803e3d6000fd5b505050506040513d6020811015614d9157600080fd5b810190808051906020019092919050505050614dac87615395565b8073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614e63578082015181840152602081019050614e48565b505050509050019650505050505050600060405180830381600087803b158015614e8c57600080fd5b505af1158015614ea0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614eca57600080fd5b8101908080516040519392919084640100000000821115614eea57600080fd5b83820191506020820185811115614f0057600080fd5b8251866020820283011164010000000082111715614f1d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614f54578082015181840152602081019050614f39565b505050509050016040525050509250614fa16040518060400160405280600c81526020017f53776170207375636365737300000000000000000000000000000000000000008152506147c1565b6001915050965096945050505050565b6150648363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a9f565b505050565b615150846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a9f565b50505050565b6151f08160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b6000808314156152065760009050615273565b600082840290508284828161521757fe5b041461526e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615ee26021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156152f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061534383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615cea565b905092915050565b600061538d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615db0565b905092915050565b61542b81604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b60008060008085116154a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561552657600080fd5b505afa15801561553a573d6000803e3d6000fd5b505050506040513d602081101561555057600080fd5b810190808051906020019092919050505010156155d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156fb8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561562057600080fd5b505afa158015615634573d6000803e3d6000fd5b505050506040513d602081101561564a57600080fd5b81019080805190602001909291905050506156ed8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156156a357600080fd5b505afa1580156156b7573d6000803e3d6000fd5b505050506040513d60208110156156cd57600080fd5b8101908080519060200190929190505050896151f390919063ffffffff16565b61530190919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561574457600080fd5b505afa158015615758573d6000803e3d6000fd5b505050506040513d602081101561576e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156157fb57600080fd5b505afa15801561580f573d6000803e3d6000fd5b505050506040513d602081101561582557600080fd5b810190808051906020019092919050505010156158aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6159573388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156158f657600080fd5b505afa15801561590a573d6000803e3d6000fd5b505050506040513d602081101561592057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6159843388888a73ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015615a0657600080fd5b505af1158015615a1a573d6000803e3d6000fd5b505050506040513d6060811015615a3057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b615abe8273ffffffffffffffffffffffffffffffffffffffff16615e70565b615b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615b7f5780518252602082019150602081019050602083039250615b5c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615be1576040519150601f19603f3d011682016040523d82523d6000602084013e615be6565b606091505b509150915081615c5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615ce457808060200190516020811015615c7d57600080fd5b8101908080519060200190929190505050615ce3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615f5f602a913960400191505060405180910390fd5b5b50505050565b60008083118290615d96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d5b578082015181840152602081019050615d40565b50505050905090810190601f168015615d885780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615da257fe5b049050809150509392505050565b6000838311158290615e5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615e22578082015181840152602081019050615e07565b50505050905090810190601f168015615e4f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615eb257506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122031eab89ff220da64ffb42b8e25770da6f72a4d536f7036288f4085120408bed664736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612070565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612253565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506123ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d06124fa565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061250b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107726126ec565b005b61077c612874565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061289a565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129c4565b604051808215151515815260200191505060405180910390f35b610938612f10565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612f39565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134c5565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061362c565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613793565b604051808381526020018281526020019250505060405180910390f35b610bff6140be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140d6565b005b610c8d61423d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614263565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614470565b604051808215151515815260200191505060405180910390f35b610dc161479b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f0000000000000000000000000000000000008152506147c1565b610ec3826148bf565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f4761495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b061495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a30614964565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614b64565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611acd57600080fd5b505afa158015611ae1573d6000803e3d6000fd5b505050506040513d6020811015611af757600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611b3c5781602001602082028038833980820191505090505b5090508381600081518110611b4d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611bb757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611bff57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615f03605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611d5e578082015181840152602081019050611d43565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e8a576000611e8c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611eed57600080fd5b505afa158015611f01573d6000803e3d6000fd5b505050506040513d6020811015611f1757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f49578b611f4c565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611ffb578082015181840152602081019050611fe0565b50505050905090810190601f1680156120285780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561204a57600080fd5b505af115801561205e573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561215e57600080fd5b505afa158015612172573d6000803e3d6000fd5b505050506040513d602081101561218857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561223e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6122478161250b565b91505095945050505050565b61225b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461231c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156124b457600080fd5b505af11580156124c8573d6000803e3d6000fd5b505050506040513d60208110156124de57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561260357600080fd5b505afa158015612617573d6000803e3d6000fd5b505050506040513d602081101561262d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156126e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126f461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128ad8a8989898989613793565b9150915060006128c28a84848b8b8b8b6129c4565b905080612937576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612adc33308a8473ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b600080612aea8c8c30614964565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b9557600080fd5b505af1158015612ba9573d6000803e3d6000fd5b505050506040513d6020811015612bbf57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c7857600080fd5b505af1158015612c8c573d6000803e3d6000fd5b505050506040513d6020811015612ca257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612de557600080fd5b505af1158015612df9573d6000803e3d6000fd5b505050506040513d6060811015612e0f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612ee233828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e8257600080fd5b505afa158015612e96573d6000803e3d6000fd5b505050506040513d6020811015612eac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612fb0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612ff857600080fd5b505afa15801561300c573d6000803e3d6000fd5b505050506040513d602081101561302257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168560028151811061305957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146130ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61311588888373ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561319657600080fd5b505af11580156131aa573d6000803e3d6000fd5b505050506040513d60408110156131c057600080fd5b8101908080519060200190929190805190602001909291905050509150915061321d6040518060400160405280600e81526020017f6d696e746564206f7074696f6e730000000000000000000000000000000000008152506147c1565b600086905060008c9050600085905061326a6040518060400160405280600881526020017f7377617070696e670000000000000000000000000000000000000000000000008152506147c1565b606060006132fc8f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156132b757600080fd5b505afa1580156132cb573d6000803e3d6000fd5b505050506040513d60208110156132e157600080fd5b8101908080519060200190929190505050878f8f888f614b64565b9150915080985061330c89615156565b8861337f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000808f905060008460028151811061339457fe5b602002602001015190506133fe816133f06103e86133e26133bf6003886151f390919063ffffffff16565b6133d46103e8896151f390919063ffffffff16565b61527990919063ffffffff16565b61530190919063ffffffff16565b61534b90919063ffffffff16565b9250505061340b81615395565b6134388686838773ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b50505050505061346986838c73ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a2505050979650505050505050565b6134cd61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461358e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138698b61250b565b905061389833308c8473ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396157600080fd5b505af1158015613975573d6000803e3d6000fd5b505050506040513d602081101561398b57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ac957600080fd5b505af1158015613add573d6000803e3d6000fd5b505050506040513d6040811015613af357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be057600080fd5b505af1158015613bf4573d6000803e3d6000fd5b505050506040513d6020811015613c0a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6257600080fd5b505afa158015613c76573d6000803e3d6000fd5b505050506040513d6020811015613c8c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4357600080fd5b505af1158015613d57573d6000803e3d6000fd5b505050506040513d6020811015613d6d57600080fd5b8101908080519060200190929190505050506000613ea58573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dca57600080fd5b505afa158015613dde573d6000803e3d6000fd5b505050506040513d6020811015613df457600080fd5b8101908080519060200190929190505050613e978773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4d57600080fd5b505afa158015613e61573d6000803e3d6000fd5b505050506040513d6020811015613e7757600080fd5b8101908080519060200190929190505050876151f390919063ffffffff16565b61530190919063ffffffff16565b9050613f543330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ef357600080fd5b505afa158015613f07573d6000803e3d6000fd5b505050506040513d6020811015613f1d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401057600080fd5b505af1158015614024573d6000803e3d6000fd5b505050506040513d606081101561403a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061408d89838773ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140de61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461419f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61426b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461432c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143b2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ebc6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061447e86853061542e565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144ef57600080fd5b505afa158015614503573d6000803e3d6000fd5b505050506040513d602081101561451957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d057600080fd5b505af11580156145e4573d6000803e3d6000fd5b505050506040513d60208110156145fa57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146c857600080fd5b505af11580156146dc573d6000803e3d6000fd5b505050506040513d60408110156146f257600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6148bc816040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156148085780820151818401526020810190506147ed565b50505050905090810190601f1680156148355780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b6149598160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b600033905090565b600080600084116149dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a8a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a2957600080fd5b505afa158015614a3d573d6000803e3d6000fd5b505050506040513d6020811015614a5357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614b0b57600080fd5b505af1158015614b1f573d6000803e3d6000fd5b505050506040513d6040811015614b3557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b60606000614ba66040518060400160405280601181526020017f7377617070696e6720696e7465726e616c0000000000000000000000000000008152506147c1565b8773ffffffffffffffffffffffffffffffffffffffff1685600081518110614bca57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050614cc06040518060400160405280601081526020017f617070726f76696e6720726f75746572000000000000000000000000000000008152506147c1565b8873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d6757600080fd5b505af1158015614d7b573d6000803e3d6000fd5b505050506040513d6020811015614d9157600080fd5b810190808051906020019092919050505050614dac87615395565b8073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614e63578082015181840152602081019050614e48565b505050509050019650505050505050600060405180830381600087803b158015614e8c57600080fd5b505af1158015614ea0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614eca57600080fd5b8101908080516040519392919084640100000000821115614eea57600080fd5b83820191506020820185811115614f0057600080fd5b8251866020820283011164010000000082111715614f1d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614f54578082015181840152602081019050614f39565b505050509050016040525050509250614fa16040518060400160405280600c81526020017f53776170207375636365737300000000000000000000000000000000000000008152506147c1565b6001915050965096945050505050565b6150648363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a9f565b505050565b615150846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a9f565b50505050565b6151f08160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b6000808314156152065760009050615273565b600082840290508284828161521757fe5b041461526e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615ee26021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156152f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061534383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615cea565b905092915050565b600061538d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615db0565b905092915050565b61542b81604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b60008060008085116154a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561552657600080fd5b505afa15801561553a573d6000803e3d6000fd5b505050506040513d602081101561555057600080fd5b810190808051906020019092919050505010156155d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156fb8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561562057600080fd5b505afa158015615634573d6000803e3d6000fd5b505050506040513d602081101561564a57600080fd5b81019080805190602001909291905050506156ed8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156156a357600080fd5b505afa1580156156b7573d6000803e3d6000fd5b505050506040513d60208110156156cd57600080fd5b8101908080519060200190929190505050896151f390919063ffffffff16565b61530190919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561574457600080fd5b505afa158015615758573d6000803e3d6000fd5b505050506040513d602081101561576e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156157fb57600080fd5b505afa15801561580f573d6000803e3d6000fd5b505050506040513d602081101561582557600080fd5b810190808051906020019092919050505010156158aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6159573388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156158f657600080fd5b505afa15801561590a573d6000803e3d6000fd5b505050506040513d602081101561592057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6159843388888a73ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015615a0657600080fd5b505af1158015615a1a573d6000803e3d6000fd5b505050506040513d6060811015615a3057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b615abe8273ffffffffffffffffffffffffffffffffffffffff16615e70565b615b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615b7f5780518252602082019150602081019050602083039250615b5c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615be1576040519150601f19603f3d011682016040523d82523d6000602084013e615be6565b606091505b509150915081615c5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615ce457808060200190516020811015615c7d57600080fd5b8101908080519060200190929190505050615ce3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615f5f602a913960400191505060405180910390fd5b5b50505050565b60008083118290615d96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d5b578082015181840152602081019050615d40565b50505050905090810190601f168015615d885780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615da257fe5b049050809150509392505050565b6000838311158290615e5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615e22578082015181840152602081019050615e07565b50505050905090810190601f168015615e4f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615eb257506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122031eab89ff220da64ffb42b8e25770da6f72a4d536f7036288f4085120408bed664736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index 9f94ee05..d4fee150 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -53,6 +53,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { event UpdatedTrader(address indexed from, address indexed newTrader); event UpdatedRegistry(address indexed from, address indexed newRegistry); event UpdatedQuoteToken(address indexed from, address indexed newQuote); + event FlashedShortOption(address indexed from, uint256 quantity); event RolledOptions( address indexed from, @@ -193,7 +194,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { * @param deadline The timestamp for a trade to fail at if not successful. * @return bool Whether the transaction was successful or not. */ - function mintShortOptionsThenSwapToTokens( + /* function mintShortOptionsThenSwapToTokens( IOption optionToken, uint256 amountIn, uint256 amountOutMin, @@ -226,44 +227,44 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Send optionTokens (long options) to the "to" address. IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens return success; - } + } */ /** * @dev Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference. * @notice If the first address in the path is not the redeemToken address, the tx will fail. * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens - * @param optionToken The address of the Option contract. + * @param optionAddress The address of the Option contract. * @param flashLoanQuantity The quantity of options to mint. * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens. * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken. * @param to The address to send the redeemToken proceeds and optionTokens to. * @param deadline The timestamp for a trade to fail at if not successful. - * @return bool Whether the transaction was successful or not. + * @return success bool Whether the transaction was successful or not. */ function flashloanMintShortOptionsThenSwap( address pairAddress, - IOption optionToken, + address optionAddress, uint256 flashLoanQuantity, uint256 amountOutMin, address[] memory path, address to, uint256 deadline - ) public returns (bool) { + ) public returns (bool success) { require(flashLoanQuantity > 0, "ERR_ZERO"); // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. // Mints option and redeem tokens to this contract. - /* address underlyingToken = optionToken.getUnderlyingTokenAddress(); + address underlyingToken = IOption(optionAddress) + .getUnderlyingTokenAddress(); + require(path[2] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); // Mint optionTokens using the underlyingTokens received from UniswapV2 flashloan. // Sends underlyingTokens from this contract and to the optionToken contract, then calls mintOptions. // This contract receives the newly minted option and redeem tokens. - IERC20(underlyingToken).safeTransfer( - address(optionToken), - flashLoanQuantity - ); - (uint256 outputOptions, uint256 outputRedeems) = optionToken + IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity); + (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress) .mintOptions(address(this)); + console.log("minted options"); // Need to pay back the UniswapV2 flash loan by selling the redeemToken, then paying the remainder. @@ -272,50 +273,50 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Reverts if the last address in the path is not the underlyingToken address. // path[0] = redeemToken, path[1] = dai, path[2] = underlyingToken { - require(path[2] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); + address original = to; + address pair = pairAddress; + address underlyingToken_ = underlyingToken; + console.log("swapping"); ( uint256[] memory amounts, - bool success + bool isSuccess ) = _swapExactOptionsForTokens( - optionToken.redeemToken(), + IOption(optionAddress).redeemToken(), outputRedeems, // shortOptionTokens = redeemTokens amountOutMin, path, - msg.sender, + pair, deadline ); + success = isSuccess; // Fail early if the swap failed. + console.log(success); require(success, "ERR_SWAP_FAILED"); - // The remainder is the flash loan amount - amount from selling redeemTokens. - uint256 remainder = flashLoanQuantity > amounts[1] - ? flashLoanQuantity.sub(amounts[1]) - : 0; + uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by selling redeemTokens + { + uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed + uint256 paid = amounts[2]; // quantity of underlying tokens paid + remainder = quantity + .mul(1000) + .add(quantity.mul(3)) + .div(1000) + .sub(paid); + } + + console.log(remainder); // Pull underlyingTokens from the original spender to pay the remainder of the flash loan. - IERC20(underlyingToken).safeTransferFrom(to, msg.sender, remainder); - - // Send optionTokens (long options) to the "spender" address. - IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens - } */ - uint256 quantityWithFee = flashLoanQuantity.mul(1000).add( - flashLoanQuantity.mul(3) - ); - /* uint256 remainder = quantityWithFee > amounts[1] - ? quantityWithFee.sub(amounts[1]) - : 0; */ + IERC20(underlyingToken_).safeTransferFrom( + original, + pair, + remainder + ); + } - address underlyingToken = optionToken.getUnderlyingTokenAddress(); - // Pull underlyingTokens from the original spender to pay the remainder of the flash loan. - IERC20(underlyingToken).safeTransferFrom( - to, - pairAddress, - quantityWithFee.div(1000) - ); - console.log(IERC20(underlyingToken).balanceOf(address(this))); - IERC20(underlyingToken).safeTransfer(pairAddress, flashLoanQuantity); - console.log(IERC20(underlyingToken).balanceOf(pairAddress)); - return true; + // Send optionTokens (long options) to the "original" address. + IERC20(optionAddress).safeTransfer(to, outputOptions); // longOptionTokens + emit FlashedShortOption(msg.sender, outputOptions); } function openFlashShort( @@ -369,6 +370,8 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { bytes calldata data ) external override { (bool success, bytes memory returnData) = address(this).call(data); + console.log("Is Successful?"); + console.logBool(success); require(success, "ERR_UNISWAPV2_CALL_FAIL"); } @@ -647,6 +650,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address to, uint256 deadline ) internal returns (uint256[] memory amounts, bool success) { + console.log("swapping internal"); // Fails early if the token being swapped from is not the optionToken. require(path[0] == optionAddress, "ERR_PATH_OPTION_START"); @@ -654,9 +658,11 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { IUniswapV2Router02 router_ = router; // Approve the uniswap router to be able to transfer options from this contract. + console.log("approving router"); IERC20(optionAddress).approve(address(router_), uint256(-1)); - // Call the Uniswap V2 function to swap optionTokens to quoteTokens. + //console.log("swapping now"); + console.log(amountOutMin); (amounts) = router_.swapExactTokensForTokens( amountIn, amountOutMin, @@ -664,6 +670,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { to, deadline ); + console.log("Swap success"); success = true; } diff --git a/deployments/localhost_31337/OptionFactory.json b/deployments/localhost_31337/OptionFactory.json index 81b0baf4..a4aec87d 100644 --- a/deployments/localhost_31337/OptionFactory.json +++ b/deployments/localhost_31337/OptionFactory.json @@ -200,7 +200,7 @@ "transactionIndex": 0, "gasUsed": "1170529", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000800000000000001000000000000000000000000000000000000020000000000000000000800000000001000000000000000080000400000000000000000000000008000000000000000000000000000000000000000010000000000000000000000000000000020000000000200000000000000000000000000000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6ea549b06021885f1028e685fd208549ab6b207f2056985a73b9828312f12ff8", + "blockHash": "0x8cc0ff5c2dcd252a8b5f7e75d6a93fcd94d03afd0523e9415cd85888096a1be2", "transactionHash": "0x35e324c0cb366f501d58a343c88a89345df4ada5d774ce65d5b7f39805809833", "logs": [ { @@ -215,7 +215,7 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x6ea549b06021885f1028e685fd208549ab6b207f2056985a73b9828312f12ff8" + "blockHash": "0x8cc0ff5c2dcd252a8b5f7e75d6a93fcd94d03afd0523e9415cd85888096a1be2" }, { "transactionIndex": 0, @@ -229,7 +229,7 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0x6ea549b06021885f1028e685fd208549ab6b207f2056985a73b9828312f12ff8" + "blockHash": "0x8cc0ff5c2dcd252a8b5f7e75d6a93fcd94d03afd0523e9415cd85888096a1be2" } ], "blockNumber": 4, @@ -241,7 +241,7 @@ "args": [ "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7" ], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"calculateOptionAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"consData\",\"type\":\"bytes\"}],\"name\":\"cloneConstructor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"deployClone\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deployOptionTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"redeemAddress\",\"type\":\"address\"}],\"name\":\"initRedeemToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionTemplate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"calculateOptionAddress(address,address,uint256,uint256,uint256)\":{\"details\":\"Calculates the option token's address using the five option parameters.\",\"returns\":{\"_0\":\"The address of the option with the parameter arguments.\"}},\"deployClone(address,address,uint256,uint256,uint256)\":{\"details\":\"Deploys a create2 clone of the option template contract.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp for option expiry.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the strike ERC-20 token.\",\"underlyingToken\":\"The address of the underlying ERC-20 token.\"}},\"deployOptionTemplate()\":{\"details\":\"Deploys the bytecode for the Option contract.\"},\"initRedeemToken(address,address)\":{\"details\":\"Only the factory can call the initRedeemToken function to set the redeem token address. This function is only callable by the Registry contract (the owner).\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/applications/factories/OptionFactory.sol\":\"OptionFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/applications/NullCloneConstructor.sol\":{\"keccak256\":\"0x986f08b84ba86c6fc0f98ece380f7c48d231c95bcaab0ea1cd346dc93397def7\",\"urls\":[\"bzz-raw://4c0d8018a1bb734d2d1c047b8d3109ce802875572206c6fcff7fd418233f989d\",\"dweb:/ipfs/QmSJrgfHPjCyQu8MRJUirvepa92ZrEkoy4RPBmTPXargtZ\"]},\"contracts/option/applications/factories/OptionFactory.sol\":{\"keccak256\":\"0x7719a6f6afd8f6174230b87b8ff9e417218b26a45604bbd3ddd7011eef00069b\",\"urls\":[\"bzz-raw://e42d76f3b3c36bd5116c1116151b30e38a3ff375f6e9e9dc7397f0ba563e4932\",\"dweb:/ipfs/QmdjYZZbKZp4YMP9jXLBk8VfofPxGDqpVnFjD9kxW9ADR4\"]},\"contracts/option/interfaces/IFlash.sol\":{\"keccak256\":\"0x7caaea0111eb7c370eb36f59936e916a7998ceb17dd5f754707e9435f1cec133\",\"urls\":[\"bzz-raw://7e432d5aca4a5f5fee04e39b1c5412fda50af319df47f44ef5e7561a60f9ad8b\",\"dweb:/ipfs/QmXfy2RYBgiHRX5JKBXJhfLV3NSgsT4DxLS7jLrqbrMdiG\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IOptionFactory.sol\":{\"keccak256\":\"0x523335d4aa7b9895d0afd9dbc14e3f3356a1d64827a6f90571c08aef54fe5a3c\",\"urls\":[\"bzz-raw://6e59a331ddd34d836f0fd2a25800cf29ccf0a5d8a074ff2aefa4072106f1388d\",\"dweb:/ipfs/QmXMEvdgdhUgprAG2fAX95imL2vdPAfsoi6NemzvbqMQvK\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/libraries/CloneLib.sol\":{\"keccak256\":\"0x982f3d93fc17c4bc21a8bc122482b6e4aae93819bc5bdf6545d9a2a43cc86381\",\"urls\":[\"bzz-raw://559f62da36cca4457d8e2e63493a425f26c8aa4edad053bdfcbc188bd6f36d22\",\"dweb:/ipfs/QmRE1yu1te4hK6eooGie9oinWVyoa9SccNtPN9ma2WyYFR\"]},\"contracts/option/libraries/OptionTemplateLib.sol\":{\"keccak256\":\"0x016a2a2070fde7d3b526b950b118f13a61bfa0e6da3e9e7779ad07cf9a82c37f\",\"urls\":[\"bzz-raw://63c816d66b8287fe6e43bdbde876fdc152bbfd7e57f4e0ac0a9a8962549b218b\",\"dweb:/ipfs/Qmf1ef9k8sjQ4aCrWDmHtBRSJpRGgKsbhCyFzxNhKhqLF3\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Option.sol\":{\"keccak256\":\"0x25d1b63eb6a225b4b99113e08a6ba78eaf7ac6e92d087c15a440ebf7ab085989\",\"urls\":[\"bzz-raw://137f3007937abd8b1bb2ef7fab95c6f833cc4f788135501db64c8cc69a87d13e\",\"dweb:/ipfs/QmYP9WRcGvZkSZheB9TeincSeH6Gm9dQVQMBPh5SjJzWyZ\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50604051620016e5380380620016e58339818101604052602081101561003557600080fd5b8101908080519060200190929190505050600061005661010960201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506101038161011160201b60201c565b50610325565b600033905090565b61011f61010960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610267576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180620016bf6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61138a80620003356000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146102835780638dd7cc90146102cd578063b570eed814610317578063d604a1ef14610321578063f2fde38b146103e357610093565b80632e53926d1461009857806335638b6b1461015a57806352e831dd146101be578063715018a614610279575b600080fd5b610118600480360360a08110156100ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050610427565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bc6004803603604081101561017057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061051e565b005b610277600480360360208110156101d457600080fd5b81019080803590602001906401000000008111156101f157600080fd5b82018360208201111561020357600080fd5b8035906020019184600183028401116401000000008311171561022557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610682565b005b610281610685565b005b61028b61080d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d5610836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031f61085c565b005b6103a1600480360360a081101561033757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061091d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610425600480360360208110156103f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c89565b005b600080610432610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018481526020018381526020018281526020019650505050505050604051602081830303815290604052805190602001209050600061050e600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610ec1565b9050809250505095945050505050565b610526610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663b43bb135826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561066657600080fd5b505af115801561067a573d6000803e3d6000fd5b505050505050565b50565b61068d610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73__$e66ec45a77c89e1b8bb13f01de0ae8794c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a057600080fd5b505af41580156108b4573d6000803e3d6000fd5b505050506040513d60208110156108ca57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000610927610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4552525f4e4f5f4445504c4f5945445f54454d504c415445000000000000000081525060200191505060405180910390fd5b6000610ab7610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140184815260200183815260200182815260200196505050505050506040516020818303038152906040528051906020012090506000610b96600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610eec565b90508073ffffffffffffffffffffffffffffffffffffffff1663d13f90b489898989896040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050600060405180830381600087803b158015610c6357600080fd5b505af1158015610c77573d6000803e3d6000fd5b50505050809250505095945050505050565b610c91610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061132f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b905090565b6000610edc82610ed085610fbe565b80519060200120610fd1565b905092915050565b600033905090565b60006060610ef984610fbe565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610fca3083610fe6565b9050919050565b6000610fde838330611261565b905092915050565b60608060006040519080825280601f01601f19166020018201604052801561101d5781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611061578082015181840152602081019050611046565b50505050905090810190601f16801561108e5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f1916602001820160405280156111495781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b81518110156112595781818151811061120357fe5b602001015160f81c60f81b83606383018151811061121d57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506111ee565b505092915050565b60008060ff60f81b83868660405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401838152602001828152602001945050505050604051602081830303815290604052805190602001209050606081901b60601c915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212206bc5c7af636179796e4d635411de3cbad2f362f9f11cd6a799fe3fc0fb4233ad64736f6c634300060200334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146102835780638dd7cc90146102cd578063b570eed814610317578063d604a1ef14610321578063f2fde38b146103e357610093565b80632e53926d1461009857806335638b6b1461015a57806352e831dd146101be578063715018a614610279575b600080fd5b610118600480360360a08110156100ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050610427565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bc6004803603604081101561017057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061051e565b005b610277600480360360208110156101d457600080fd5b81019080803590602001906401000000008111156101f157600080fd5b82018360208201111561020357600080fd5b8035906020019184600183028401116401000000008311171561022557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610682565b005b610281610685565b005b61028b61080d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d5610836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031f61085c565b005b6103a1600480360360a081101561033757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061091d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610425600480360360208110156103f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c89565b005b600080610432610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018481526020018381526020018281526020019650505050505050604051602081830303815290604052805190602001209050600061050e600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610ec1565b9050809250505095945050505050565b610526610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663b43bb135826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561066657600080fd5b505af115801561067a573d6000803e3d6000fd5b505050505050565b50565b61068d610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73__$e66ec45a77c89e1b8bb13f01de0ae8794c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a057600080fd5b505af41580156108b4573d6000803e3d6000fd5b505050506040513d60208110156108ca57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000610927610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4552525f4e4f5f4445504c4f5945445f54454d504c415445000000000000000081525060200191505060405180910390fd5b6000610ab7610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140184815260200183815260200182815260200196505050505050506040516020818303038152906040528051906020012090506000610b96600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610eec565b90508073ffffffffffffffffffffffffffffffffffffffff1663d13f90b489898989896040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050600060405180830381600087803b158015610c6357600080fd5b505af1158015610c77573d6000803e3d6000fd5b50505050809250505095945050505050565b610c91610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061132f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b905090565b6000610edc82610ed085610fbe565b80519060200120610fd1565b905092915050565b600033905090565b60006060610ef984610fbe565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610fca3083610fe6565b9050919050565b6000610fde838330611261565b905092915050565b60608060006040519080825280601f01601f19166020018201604052801561101d5781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611061578082015181840152602081019050611046565b50505050905090810190601f16801561108e5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f1916602001820160405280156111495781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b81518110156112595781818151811061120357fe5b602001015160f81c60f81b83606383018151811061121d57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506111ee565b505092915050565b60008060ff60f81b83868660405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401838152602001828152602001945050505050604051602081830303815290604052805190602001209050606081901b60601c915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212206bc5c7af636179796e4d635411de3cbad2f362f9f11cd6a799fe3fc0fb4233ad64736f6c63430006020033", @@ -289,7 +289,7 @@ "storageLayout": { "storage": [ { - "astId": 33, + "astId": 8111, "contract": "contracts/option/applications/factories/OptionFactory.sol:OptionFactory", "label": "_owner", "offset": 0, @@ -297,7 +297,7 @@ "type": "t_address" }, { - "astId": 4907, + "astId": 13072, "contract": "contracts/option/applications/factories/OptionFactory.sol:OptionFactory", "label": "optionTemplate", "offset": 0, diff --git a/deployments/localhost_31337/OptionTemplateLib.json b/deployments/localhost_31337/OptionTemplateLib.json index 90cb925e..1a3c7526 100644 --- a/deployments/localhost_31337/OptionTemplateLib.json +++ b/deployments/localhost_31337/OptionTemplateLib.json @@ -7,7 +7,7 @@ "transactionIndex": 0, "gasUsed": "4032692", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xaaca74d231a5a6a63095c6e702e7e7f79f8e25015197f16473a5a8c07c1d67b9", + "blockHash": "0x133d7e848a7bdb676d87eb6e57a259debe6fbf52533d1a47746eb8d6a1845d65", "transactionHash": "0xc866fdda2f3c1258ccd2bdba65fc1a7a4687bcdbac19b59c697ca58b46393965", "logs": [], "blockNumber": 1, @@ -17,7 +17,7 @@ }, "address": "0x7c2C195CD6D34B8F845992d380aADB2730bB9C6F", "args": [], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{\"deployTemplate()\":{\"details\":\"Deploys a clone of the deployed Option.sol contract.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/libraries/OptionTemplateLib.sol\":\"OptionTemplateLib\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/interfaces/IFlash.sol\":{\"keccak256\":\"0x7caaea0111eb7c370eb36f59936e916a7998ceb17dd5f754707e9435f1cec133\",\"urls\":[\"bzz-raw://7e432d5aca4a5f5fee04e39b1c5412fda50af319df47f44ef5e7561a60f9ad8b\",\"dweb:/ipfs/QmXfy2RYBgiHRX5JKBXJhfLV3NSgsT4DxLS7jLrqbrMdiG\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/libraries/OptionTemplateLib.sol\":{\"keccak256\":\"0x016a2a2070fde7d3b526b950b118f13a61bfa0e6da3e9e7779ad07cf9a82c37f\",\"urls\":[\"bzz-raw://63c816d66b8287fe6e43bdbde876fdc152bbfd7e57f4e0ac0a9a8962549b218b\",\"dweb:/ipfs/Qmf1ef9k8sjQ4aCrWDmHtBRSJpRGgKsbhCyFzxNhKhqLF3\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Option.sol\":{\"keccak256\":\"0x25d1b63eb6a225b4b99113e08a6ba78eaf7ac6e92d087c15a440ebf7ab085989\",\"urls\":[\"bzz-raw://137f3007937abd8b1bb2ef7fab95c6f833cc4f788135501db64c8cc69a87d13e\",\"dweb:/ipfs/QmYP9WRcGvZkSZheB9TeincSeH6Gm9dQVQMBPh5SjJzWyZ\"]}},\"version\":1}", "bytecode": "0x61484e610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b614571806102a88339019056fe608060405234801561001057600080fd5b50614551806100206000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c8063787eae301161010f578063a5ea11da116100a2578063c45a015511610071578063c45a015514610b11578063d13f90b414610b5b578063dd62ed3e14610bdd578063fa9ad7c414610c55576101e4565b8063a5ea11da14610984578063a9059cbb14610a49578063b43bb13514610aaf578063b592a13814610af3576101e4565b806395d89b41116100de57806395d89b41146107bf578063a1a4076114610842578063a457c2d71461088c578063a49b41d4146108f2576101e4565b8063787eae30146105cd5780637a4fe3871461068b57806383499805146106a957806387685fb91461070f576101e4565b806325cb5bc011610187578063440f5fd211610156578063440f5fd2146104ae5780634a9d1036146104f85780635e86929d1461051d57806370a0823114610575576101e4565b806325cb5bc0146103bc5780632f310bad146103da578063313ce567146104245780633950935114610448576101e4565b8063095ea7b3116101c3578063095ea7b31461029457806318160ddd146102fa5780631f12b3f81461031857806323b872dd14610336576101e4565b8062fe19fa146101e957806302a5fea21461020757806306fdde0314610211575b600080fd5b6101f1610cb4565b6040518082815260200191505060405180910390f35b61020f610cc0565b005b610219610f3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561025957808201518184015260208101905061023e565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e0600480360360408110156102aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f75565b604051808215151515815260200191505060405180910390f35b610302610f93565b6040518082815260200191505060405180910390f35b610320610f9d565b6040518082815260200191505060405180910390f35b6103a26004803603606081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fa3565b604051808215151515815260200191505060405180910390f35b6103c461107c565b6040518082815260200191505060405180910390f35b6103e2611089565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61042c6110af565b604051808260ff1660ff16815260200191505060405180910390f35b6104946004803603604081101561045e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110b4565b604051808215151515815260200191505060405180910390f35b6104b6611167565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610500611194565b604051808381526020018281526020019250505060405180910390f35b61055f6004803603602081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111a5565b6040518082815260200191505060405180910390f35b6105b76004803603602081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116fe565b6040518082815260200191505060405180910390f35b61066e600480360360608110156105e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561062a57600080fd5b82018360208201111561063c57600080fd5b8035906020019184600183028401116401000000008311171561065e57600080fd5b9091929391929390505050611746565b604051808381526020018281526020019250505060405180910390f35b610693611f87565b6040518082815260200191505060405180910390f35b6106eb600480360360208110156106bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f8d565b60405180848152602001838152602001828152602001935050505060405180910390f35b61071761257b565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b6107c76125fa565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108075780820151818401526020810190506107ec565b50505050905090810190601f1680156108345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61084a612633565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108d8600480360360408110156108a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612660565b604051808215151515815260200191505060405180910390f35b6108fa61272d565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060405180910390f35b61098c612791565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838152602001828152602001965050505050505060405180910390f35b610a9560048036036040811015610a5f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128cc565b604051808215151515815260200191505060405180910390f35b610af160048036036020811015610ac557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128ea565b005b610afb612b0f565b6040518082815260200191505060405180910390f35b610b19612b1c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bdb600480360360a0811015610b7157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612b42565b005b610c3f60048036036040811015610bf357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f71565b6040518082815260200191505060405180910390f35b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ff8565b604051808381526020018281526020019250505060405180910390f35b60006003800154905090565b600b60149054906101000a900460ff16610d42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff021916908315150217905550610f1f600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610e0257600080fd5b505afa158015610e16573d6000803e3d6000fd5b505050506040513d6020811015610e2c57600080fd5b8101908080519060200190929190505050600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610edf57600080fd5b505afa158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b810190808051906020019092919050505061340a565b6001600b60146101000a81548160ff021916908315150217905550565b6040518060400160405280601381526020017f5072696d6974697665205631204f7074696f6e0000000000000000000000000081525081565b6000610f89610f8261345b565b8484613463565b6001905092915050565b6000600254905090565b60095481565b6000610fb084848461365a565b61107184610fbc61345b565b61106c8560405180606001604052806028815260200161443b60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061102261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b600190509392505050565b6000600360040154905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b600061115d6110c161345b565b8461115885600160006110d261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b613463565b6001905092915050565b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600854600954915091509091565b6000600b60149054906101000a900460ff16611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d602081101561133e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156113d057600080fd5b505afa1580156113e4573d6000803e3d6000fd5b505050506040513d60208110156113fa57600080fd5b8101908080519060200190929190505050905060008111611483576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b808210156114f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16639dc29fac30836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561158057600080fd5b505af1158015611594573d6000803e3d6000fd5b505050506115c386828673ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561164057600080fd5b505afa158015611654573d6000803e3d6000fd5b505050506040513d602081101561166a57600080fd5b810190808051906020019092919050505091506116896008548361340a565b3373ffffffffffffffffffffffffffffffffffffffff167f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6826040518082815260200191505060405180910390a2809450505050506001600b60146101000a81548160ff021916908315150217905550919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080600b60149054906101000a900460ff166117cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506117ee613b1b565b611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008611611900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b858173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561197e57600080fd5b505afa158015611992573d6000803e3d6000fd5b505050506040513d60208110156119a857600080fd5b81019080805190602001909291905050501015611a2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b611a5887878373ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b6000858590501115611b38578673ffffffffffffffffffffffffffffffffffffffff16636511d275338888886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611b1f57600080fd5b505af1158015611b33573d6000803e3d6000fd5b505050505b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611bdc57600080fd5b505afa158015611bf0573d6000803e3d6000fd5b505050506040513d6020811015611c0657600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c9857600080fd5b505afa158015611cac573d6000803e3d6000fd5b505050506040513d6020811015611cc257600080fd5b810190808051906020019092919050505090506000611cec60095484613b2b90919063ffffffff16565b90506000611d17611d088b600854613b2b90919063ffffffff16565b84613b2b90919063ffffffff16565b90506000821180611d285750600081115b611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008a8211611dbb57611db6828c613b2b90919063ffffffff16565b611dbe565b60005b90506000611df0600360020154611de2600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000611dfd306116fe565b905081851015611e75576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f535452494b45535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b82811015611eeb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f4f5054494f4e535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b611ef53082613c45565b611eff868861340a565b3373ffffffffffffffffffffffffffffffffffffffff167f7fb8af33a94ca7bd709d59757a015eb48270f350724a5409fd77b579d0b7247d8e87604051808381526020018281526020019250505060405180910390a284819950995050505050505050506001600b60146101000a81548160ff02191690831515021790555094509492505050565b60085481565b6000806000600b60149054906101000a900460ff16612014576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156120ff57600080fd5b505afa158015612113573d6000803e3d6000fd5b505050506040513d602081101561212957600080fd5b810190808051906020019092919050505090506000612147306116fe565b905060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121c857600080fd5b505afa1580156121dc573d6000803e3d6000fd5b505050506040513d60208110156121f257600080fd5b810190808051906020019092919050505090506000612235600380015461222760036002015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000612241613b1b565b61224b578161224d565b835b905060008311801561225f5750600081115b6122d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8181101580156122e15750818510155b612353576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b61235b613b1b565b1561236b5761236a3082613c45565b5b8573ffffffffffffffffffffffffffffffffffffffff16639dc29fac30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156123f257600080fd5b505af1158015612406573d6000803e3d6000fd5b505050506124358b838973ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156124b257600080fd5b505afa1580156124c6573d6000803e3d6000fd5b505050506040513d60208110156124dc57600080fd5b810190808051906020019092919050505094506124fb8560095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f684222b0069d4a2e5e0d986611cc5182d543904c4e4264bf770d4e51faefc822836040518082815260200191505060405180910390a2828183995099509950505050505050506001600b60146101000a81548160ff0219169083151502179055509193909250565b6000806000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925092509250909192565b6040518060400160405280600381526020017f50524d000000000000000000000000000000000000000000000000000000000081525081565b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600061272361266d61345b565b8461271e856040518060600160405280602581526020016144f7602591396001600061269761345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b6001905092915050565b60038060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154905085565b6000806000806000806127a2614331565b60036040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820154815260200160048201548152505090508060000151965080602001519550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945080604001519350806060015192508060800151915050909192939495565b60006128e06128d961345b565b848461365a565b6001905092915050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146129ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f52454445454d5f494e495449414c495a45440000000000000000000081525060200191505060405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d82022efb79096928f354aadac8912185187b551963720c3cf4db45f2b3fea60405160405180910390a350565b6000600360020154905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612c06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612ca8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b60008311612d1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008211612d94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b42811015612e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b33600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815250600360008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030155608082015181600401559050506001600b60146101000a81548160ff0219169083151502179055505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080600b60149054906101000a900460ff1661307d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506130a0613b1b565b613112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156131b657600080fd5b505afa1580156131ca573d6000803e3d6000fd5b505050506040513d60208110156131e057600080fd5b81019080805190602001909291905050509050600061320a60085483613b2b90919063ffffffff16565b9050600061323c60036002015461322e600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b9050600081116132b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1987836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561335d57600080fd5b505af1158015613371573d6000803e3d6000fd5b5050505061337f8683613e09565b61338b8360095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8383604051808381526020018281526020019250505060405180910390a28181945094505050506001600b60146101000a81548160ff021916908315150217905550915091565b81600881905550806009819055507f5a1c3e4cdfd0698a8d6ff240a75a16c8b2f07d2b7579bb89c8065077eda06d5f8282604051808381526020018281526020019250505060405180910390a15050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156134e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806144a96024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561356f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806143d26022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806144846025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061438d6023913960400191505060405180910390fd5b613771838383613fd0565b6137dc816040518060600160405280602681526020016143f4602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061386f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906139c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561398d578082015181840152602081019050613972565b50505050905090810190601f1680156139ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015613a59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b613b168363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613fd5565b505050565b6000426003600401541015905090565b6000613b6d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061391b565b905092915050565b600080831415613b885760009050613bf5565b6000828402905082848281613b9957fe5b0414613bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061441a6021913960400191505060405180910390fd5b809150505b92915050565b6000613c3d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614220565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806144636021913960400191505060405180910390fd5b613cd782600083613fd0565b613d42816040518060600160405280602281526020016143b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613d9981600254613b2b90919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613eac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b613eb860008383613fd0565b613ecd816002546139db90919063ffffffff16565b600281905550613f24816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b613ff48273ffffffffffffffffffffffffffffffffffffffff166142e6565b614066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106140b55780518252602082019150602081019050602083039250614092565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614117576040519150601f19603f3d011682016040523d82523d6000602084013e61411c565b606091505b509150915081614194576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561421a578080602001905160208110156141b357600080fd5b8101908080519060200190929190505050614219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806144cd602a913960400191505060405180910390fd5b5b50505050565b600080831182906142cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614291578082015181840152602081019050614276565b50505050905090810190601f1680156142be5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816142d857fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561432857506000801b8214155b92505050919050565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212200ddee87d0e0d8cdf46c88c878b0350291189424c3a5caca5e3f6ecb64003c56864736f6c63430006020033a26469706673582212206dbead405b0f5ae8aa6ce05b134c2557b7c9ef09655f3f97b6f8ec572fd7f08964736f6c63430006020033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b614571806102a88339019056fe608060405234801561001057600080fd5b50614551806100206000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c8063787eae301161010f578063a5ea11da116100a2578063c45a015511610071578063c45a015514610b11578063d13f90b414610b5b578063dd62ed3e14610bdd578063fa9ad7c414610c55576101e4565b8063a5ea11da14610984578063a9059cbb14610a49578063b43bb13514610aaf578063b592a13814610af3576101e4565b806395d89b41116100de57806395d89b41146107bf578063a1a4076114610842578063a457c2d71461088c578063a49b41d4146108f2576101e4565b8063787eae30146105cd5780637a4fe3871461068b57806383499805146106a957806387685fb91461070f576101e4565b806325cb5bc011610187578063440f5fd211610156578063440f5fd2146104ae5780634a9d1036146104f85780635e86929d1461051d57806370a0823114610575576101e4565b806325cb5bc0146103bc5780632f310bad146103da578063313ce567146104245780633950935114610448576101e4565b8063095ea7b3116101c3578063095ea7b31461029457806318160ddd146102fa5780631f12b3f81461031857806323b872dd14610336576101e4565b8062fe19fa146101e957806302a5fea21461020757806306fdde0314610211575b600080fd5b6101f1610cb4565b6040518082815260200191505060405180910390f35b61020f610cc0565b005b610219610f3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561025957808201518184015260208101905061023e565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e0600480360360408110156102aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f75565b604051808215151515815260200191505060405180910390f35b610302610f93565b6040518082815260200191505060405180910390f35b610320610f9d565b6040518082815260200191505060405180910390f35b6103a26004803603606081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fa3565b604051808215151515815260200191505060405180910390f35b6103c461107c565b6040518082815260200191505060405180910390f35b6103e2611089565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61042c6110af565b604051808260ff1660ff16815260200191505060405180910390f35b6104946004803603604081101561045e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110b4565b604051808215151515815260200191505060405180910390f35b6104b6611167565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610500611194565b604051808381526020018281526020019250505060405180910390f35b61055f6004803603602081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111a5565b6040518082815260200191505060405180910390f35b6105b76004803603602081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116fe565b6040518082815260200191505060405180910390f35b61066e600480360360608110156105e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561062a57600080fd5b82018360208201111561063c57600080fd5b8035906020019184600183028401116401000000008311171561065e57600080fd5b9091929391929390505050611746565b604051808381526020018281526020019250505060405180910390f35b610693611f87565b6040518082815260200191505060405180910390f35b6106eb600480360360208110156106bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f8d565b60405180848152602001838152602001828152602001935050505060405180910390f35b61071761257b565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b6107c76125fa565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108075780820151818401526020810190506107ec565b50505050905090810190601f1680156108345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61084a612633565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108d8600480360360408110156108a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612660565b604051808215151515815260200191505060405180910390f35b6108fa61272d565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060405180910390f35b61098c612791565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838152602001828152602001965050505050505060405180910390f35b610a9560048036036040811015610a5f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128cc565b604051808215151515815260200191505060405180910390f35b610af160048036036020811015610ac557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128ea565b005b610afb612b0f565b6040518082815260200191505060405180910390f35b610b19612b1c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bdb600480360360a0811015610b7157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612b42565b005b610c3f60048036036040811015610bf357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f71565b6040518082815260200191505060405180910390f35b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ff8565b604051808381526020018281526020019250505060405180910390f35b60006003800154905090565b600b60149054906101000a900460ff16610d42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff021916908315150217905550610f1f600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610e0257600080fd5b505afa158015610e16573d6000803e3d6000fd5b505050506040513d6020811015610e2c57600080fd5b8101908080519060200190929190505050600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610edf57600080fd5b505afa158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b810190808051906020019092919050505061340a565b6001600b60146101000a81548160ff021916908315150217905550565b6040518060400160405280601381526020017f5072696d6974697665205631204f7074696f6e0000000000000000000000000081525081565b6000610f89610f8261345b565b8484613463565b6001905092915050565b6000600254905090565b60095481565b6000610fb084848461365a565b61107184610fbc61345b565b61106c8560405180606001604052806028815260200161443b60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061102261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b600190509392505050565b6000600360040154905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b600061115d6110c161345b565b8461115885600160006110d261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b613463565b6001905092915050565b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600854600954915091509091565b6000600b60149054906101000a900460ff16611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d602081101561133e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156113d057600080fd5b505afa1580156113e4573d6000803e3d6000fd5b505050506040513d60208110156113fa57600080fd5b8101908080519060200190929190505050905060008111611483576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b808210156114f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16639dc29fac30836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561158057600080fd5b505af1158015611594573d6000803e3d6000fd5b505050506115c386828673ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561164057600080fd5b505afa158015611654573d6000803e3d6000fd5b505050506040513d602081101561166a57600080fd5b810190808051906020019092919050505091506116896008548361340a565b3373ffffffffffffffffffffffffffffffffffffffff167f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6826040518082815260200191505060405180910390a2809450505050506001600b60146101000a81548160ff021916908315150217905550919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080600b60149054906101000a900460ff166117cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506117ee613b1b565b611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008611611900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b858173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561197e57600080fd5b505afa158015611992573d6000803e3d6000fd5b505050506040513d60208110156119a857600080fd5b81019080805190602001909291905050501015611a2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b611a5887878373ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b6000858590501115611b38578673ffffffffffffffffffffffffffffffffffffffff16636511d275338888886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611b1f57600080fd5b505af1158015611b33573d6000803e3d6000fd5b505050505b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611bdc57600080fd5b505afa158015611bf0573d6000803e3d6000fd5b505050506040513d6020811015611c0657600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c9857600080fd5b505afa158015611cac573d6000803e3d6000fd5b505050506040513d6020811015611cc257600080fd5b810190808051906020019092919050505090506000611cec60095484613b2b90919063ffffffff16565b90506000611d17611d088b600854613b2b90919063ffffffff16565b84613b2b90919063ffffffff16565b90506000821180611d285750600081115b611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008a8211611dbb57611db6828c613b2b90919063ffffffff16565b611dbe565b60005b90506000611df0600360020154611de2600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000611dfd306116fe565b905081851015611e75576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f535452494b45535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b82811015611eeb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f4f5054494f4e535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b611ef53082613c45565b611eff868861340a565b3373ffffffffffffffffffffffffffffffffffffffff167f7fb8af33a94ca7bd709d59757a015eb48270f350724a5409fd77b579d0b7247d8e87604051808381526020018281526020019250505060405180910390a284819950995050505050505050506001600b60146101000a81548160ff02191690831515021790555094509492505050565b60085481565b6000806000600b60149054906101000a900460ff16612014576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156120ff57600080fd5b505afa158015612113573d6000803e3d6000fd5b505050506040513d602081101561212957600080fd5b810190808051906020019092919050505090506000612147306116fe565b905060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121c857600080fd5b505afa1580156121dc573d6000803e3d6000fd5b505050506040513d60208110156121f257600080fd5b810190808051906020019092919050505090506000612235600380015461222760036002015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000612241613b1b565b61224b578161224d565b835b905060008311801561225f5750600081115b6122d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8181101580156122e15750818510155b612353576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b61235b613b1b565b1561236b5761236a3082613c45565b5b8573ffffffffffffffffffffffffffffffffffffffff16639dc29fac30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156123f257600080fd5b505af1158015612406573d6000803e3d6000fd5b505050506124358b838973ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156124b257600080fd5b505afa1580156124c6573d6000803e3d6000fd5b505050506040513d60208110156124dc57600080fd5b810190808051906020019092919050505094506124fb8560095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f684222b0069d4a2e5e0d986611cc5182d543904c4e4264bf770d4e51faefc822836040518082815260200191505060405180910390a2828183995099509950505050505050506001600b60146101000a81548160ff0219169083151502179055509193909250565b6000806000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925092509250909192565b6040518060400160405280600381526020017f50524d000000000000000000000000000000000000000000000000000000000081525081565b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600061272361266d61345b565b8461271e856040518060600160405280602581526020016144f7602591396001600061269761345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b6001905092915050565b60038060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154905085565b6000806000806000806127a2614331565b60036040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820154815260200160048201548152505090508060000151965080602001519550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945080604001519350806060015192508060800151915050909192939495565b60006128e06128d961345b565b848461365a565b6001905092915050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146129ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f52454445454d5f494e495449414c495a45440000000000000000000081525060200191505060405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d82022efb79096928f354aadac8912185187b551963720c3cf4db45f2b3fea60405160405180910390a350565b6000600360020154905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612c06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612ca8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b60008311612d1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008211612d94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b42811015612e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b33600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815250600360008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030155608082015181600401559050506001600b60146101000a81548160ff0219169083151502179055505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080600b60149054906101000a900460ff1661307d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506130a0613b1b565b613112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156131b657600080fd5b505afa1580156131ca573d6000803e3d6000fd5b505050506040513d60208110156131e057600080fd5b81019080805190602001909291905050509050600061320a60085483613b2b90919063ffffffff16565b9050600061323c60036002015461322e600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b9050600081116132b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1987836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561335d57600080fd5b505af1158015613371573d6000803e3d6000fd5b5050505061337f8683613e09565b61338b8360095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8383604051808381526020018281526020019250505060405180910390a28181945094505050506001600b60146101000a81548160ff021916908315150217905550915091565b81600881905550806009819055507f5a1c3e4cdfd0698a8d6ff240a75a16c8b2f07d2b7579bb89c8065077eda06d5f8282604051808381526020018281526020019250505060405180910390a15050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156134e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806144a96024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561356f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806143d26022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806144846025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061438d6023913960400191505060405180910390fd5b613771838383613fd0565b6137dc816040518060600160405280602681526020016143f4602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061386f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906139c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561398d578082015181840152602081019050613972565b50505050905090810190601f1680156139ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015613a59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b613b168363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613fd5565b505050565b6000426003600401541015905090565b6000613b6d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061391b565b905092915050565b600080831415613b885760009050613bf5565b6000828402905082848281613b9957fe5b0414613bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061441a6021913960400191505060405180910390fd5b809150505b92915050565b6000613c3d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614220565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806144636021913960400191505060405180910390fd5b613cd782600083613fd0565b613d42816040518060600160405280602281526020016143b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613d9981600254613b2b90919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613eac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b613eb860008383613fd0565b613ecd816002546139db90919063ffffffff16565b600281905550613f24816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b613ff48273ffffffffffffffffffffffffffffffffffffffff166142e6565b614066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106140b55780518252602082019150602081019050602083039250614092565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614117576040519150601f19603f3d011682016040523d82523d6000602084013e61411c565b606091505b509150915081614194576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561421a578080602001905160208110156141b357600080fd5b8101908080519060200190929190505050614219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806144cd602a913960400191505060405180910390fd5b5b50505050565b600080831182906142cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614291578082015181840152602081019050614276565b50505050905090810190601f1680156142be5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816142d857fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561432857506000801b8214155b92505050919050565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212200ddee87d0e0d8cdf46c88c878b0350291189424c3a5caca5e3f6ecb64003c56864736f6c63430006020033a26469706673582212206dbead405b0f5ae8aa6ce05b134c2557b7c9ef09655f3f97b6f8ec572fd7f08964736f6c63430006020033", diff --git a/deployments/localhost_31337/RedeemFactory.json b/deployments/localhost_31337/RedeemFactory.json index 2b6f32f0..465675f2 100644 --- a/deployments/localhost_31337/RedeemFactory.json +++ b/deployments/localhost_31337/RedeemFactory.json @@ -123,7 +123,7 @@ "transactionIndex": 0, "gasUsed": "852141", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000001000000000400000000000000000000000000022000000000000000000800000000001000000000000000080000400000000000000000000000008000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x48bbaf5fb4dd9122d3371790ad0fa5bbcaf3c8af8cfb7d177a5bee8cb63621ff", + "blockHash": "0xe6660c26b8f3ce704f308587080061165cb4182f2dadfdc67f200d10251a72ee", "transactionHash": "0xdf07c4ef6bed622d905a3c285bf9f59c85cd8f1c22d23249f629239bc1acbaa8", "logs": [ { @@ -138,7 +138,7 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x48bbaf5fb4dd9122d3371790ad0fa5bbcaf3c8af8cfb7d177a5bee8cb63621ff" + "blockHash": "0xe6660c26b8f3ce704f308587080061165cb4182f2dadfdc67f200d10251a72ee" }, { "transactionIndex": 0, @@ -152,7 +152,7 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0x48bbaf5fb4dd9122d3371790ad0fa5bbcaf3c8af8cfb7d177a5bee8cb63621ff" + "blockHash": "0xe6660c26b8f3ce704f308587080061165cb4182f2dadfdc67f200d10251a72ee" } ], "blockNumber": 5, @@ -164,7 +164,7 @@ "args": [ "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7" ], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"consData\",\"type\":\"bytes\"}],\"name\":\"cloneConstructor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionToken\",\"type\":\"address\"}],\"name\":\"deployClone\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deployRedeemTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemTemplate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"deployClone(address)\":{\"details\":\"Deploys a cloned instance of the template Redeem contract.\",\"params\":{\"optionToken\":\"The address of the option token which this redeem clone will be paired with.\"},\"returns\":{\"_0\":\"redeemAddress The address of the deployed Redeem token clone.\"}},\"deployRedeemTemplate()\":{\"details\":\"Deploys the full bytecode of the Redeem contract to be used as a template for clones.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/applications/factories/RedeemFactory.sol\":\"RedeemFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/applications/NullCloneConstructor.sol\":{\"keccak256\":\"0x986f08b84ba86c6fc0f98ece380f7c48d231c95bcaab0ea1cd346dc93397def7\",\"urls\":[\"bzz-raw://4c0d8018a1bb734d2d1c047b8d3109ce802875572206c6fcff7fd418233f989d\",\"dweb:/ipfs/QmSJrgfHPjCyQu8MRJUirvepa92ZrEkoy4RPBmTPXargtZ\"]},\"contracts/option/applications/factories/RedeemFactory.sol\":{\"keccak256\":\"0xf98b63c21122483ede3f062b9561be991f61b32f36b721b462d3ac3a0c550e95\",\"urls\":[\"bzz-raw://8543c89e929ea4eb33a40c4d4cea3d1b7c27ec0bfc903d8e5fced98a438e0226\",\"dweb:/ipfs/QmNaKchRQJCqnA2oyZvbt9JJyY6wRR5oRexgTusYKxAyqc\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/interfaces/IRedeemFactory.sol\":{\"keccak256\":\"0xe08632c1198fa61a3848da09b11fd427f3fedfc1c1e3b8176e3ce2055e7ae208\",\"urls\":[\"bzz-raw://563f70356a74c1e98a4b90c96848082914292d758271cb529e10abd53cd88960\",\"dweb:/ipfs/QmRD4esxBckRUmERKuamJBPLTz7ukGcQj1PRzyQZNm5uo5\"]},\"contracts/option/libraries/CloneLib.sol\":{\"keccak256\":\"0x982f3d93fc17c4bc21a8bc122482b6e4aae93819bc5bdf6545d9a2a43cc86381\",\"urls\":[\"bzz-raw://559f62da36cca4457d8e2e63493a425f26c8aa4edad053bdfcbc188bd6f36d22\",\"dweb:/ipfs/QmRE1yu1te4hK6eooGie9oinWVyoa9SccNtPN9ma2WyYFR\"]},\"contracts/option/libraries/RedeemTemplateLib.sol\":{\"keccak256\":\"0x32d84298d723ba5276fab8128c26fe0855c62e5145ca2575a56e236e10c94398\",\"urls\":[\"bzz-raw://7c72dafc9e05d048224c1041ed2b424e5843e6d7412a0e82f734d38129b00457\",\"dweb:/ipfs/QmXkGKwoyhGCvtNZW2sCpWFn7uCTLnq1j6xqYUcNzTU3bU\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Redeem.sol\":{\"keccak256\":\"0x1057014625bc86d3b02faa35824d283d5baa6ae14b59a4561b0b27d342173090\",\"urls\":[\"bzz-raw://b51f63b92eb53fd5ed6cb48f66609a259f34d95af2c7796049951f667e405a4d\",\"dweb:/ipfs/QmWdT3TbmVrvPkLJw2DYLWecnoNabZ2CAQLnDLpHDPPn1o\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161111c38038061111c8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600061005461010760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506101018161010f60201b60201c565b50610322565b600033905090565b61011d61010760201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146101de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610264576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806110f66026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610dc5806103316000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146101515780639951c8af1461019b578063f2fde38b146101e5578063fe8d6396146102295761007d565b80631458ab4a1461008257806352e831dd1461008c578063715018a614610147575b600080fd5b61008a6102ad565b005b610145600480360360208110156100a257600080fd5b81019080803590602001906401000000008111156100bf57600080fd5b8201836020820111156100d157600080fd5b803590602001918460018302840111640100000000831117156100f357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061036e565b005b61014f610371565b005b6101596104f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a3610522565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610227600480360360208110156101fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610548565b005b61026b6004803603602081101561023f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610755565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b73__$9d5e8c0708ade2d55359313f562ebf5c4c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f157600080fd5b505af4158015610305573d6000803e3d6000fd5b505050506040513d602081101561031b57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b50565b6103796109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461043a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6105506109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610611576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610697576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061075f6109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600061082a6109de565b6108326104f9565b84604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401935050505060405160208183030381529060405280519060200120905060006108f8600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610a09565b90508073ffffffffffffffffffffffffffffffffffffffff1663485cc95561091e6104f9565b866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b505050508092505050919050565b600033905090565b60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b905090565b60006060610a1684610adb565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ad3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610ae73083610aee565b9050919050565b60608060006040519080825280601f01601f191660200182016040528015610b255781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015610b69578082015181840152602081019050610b4e565b50505050905090810190601f168015610b965780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f191660200182016040528015610c515781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b8151811015610d6157818181518110610d0b57fe5b602001015160f81c60f81b836063830181518110610d2557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610cf6565b50509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122056de3fe6d076c1320c7cff7d8ae33f9b2dbd3b3e6bd70282bf7aea822759c45e64736f6c634300060200334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146101515780639951c8af1461019b578063f2fde38b146101e5578063fe8d6396146102295761007d565b80631458ab4a1461008257806352e831dd1461008c578063715018a614610147575b600080fd5b61008a6102ad565b005b610145600480360360208110156100a257600080fd5b81019080803590602001906401000000008111156100bf57600080fd5b8201836020820111156100d157600080fd5b803590602001918460018302840111640100000000831117156100f357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061036e565b005b61014f610371565b005b6101596104f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a3610522565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610227600480360360208110156101fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610548565b005b61026b6004803603602081101561023f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610755565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b73__$9d5e8c0708ade2d55359313f562ebf5c4c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f157600080fd5b505af4158015610305573d6000803e3d6000fd5b505050506040513d602081101561031b57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b50565b6103796109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461043a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6105506109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610611576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610697576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061075f6109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600061082a6109de565b6108326104f9565b84604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401935050505060405160208183030381529060405280519060200120905060006108f8600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610a09565b90508073ffffffffffffffffffffffffffffffffffffffff1663485cc95561091e6104f9565b866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b505050508092505050919050565b600033905090565b60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b905090565b60006060610a1684610adb565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ad3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610ae73083610aee565b9050919050565b60608060006040519080825280601f01601f191660200182016040528015610b255781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015610b69578082015181840152602081019050610b4e565b50505050905090810190601f168015610b965780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f191660200182016040528015610c515781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b8151811015610d6157818181518110610d0b57fe5b602001015160f81c60f81b836063830181518110610d2557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610cf6565b50509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122056de3fe6d076c1320c7cff7d8ae33f9b2dbd3b3e6bd70282bf7aea822759c45e64736f6c63430006020033", @@ -202,7 +202,7 @@ "storageLayout": { "storage": [ { - "astId": 33, + "astId": 8111, "contract": "contracts/option/applications/factories/RedeemFactory.sol:RedeemFactory", "label": "_owner", "offset": 0, @@ -210,7 +210,7 @@ "type": "t_address" }, { - "astId": 5086, + "astId": 13251, "contract": "contracts/option/applications/factories/RedeemFactory.sol:RedeemFactory", "label": "redeemTemplate", "offset": 0, diff --git a/deployments/localhost_31337/RedeemTemplateLib.json b/deployments/localhost_31337/RedeemTemplateLib.json index ae51a923..62d67bd2 100644 --- a/deployments/localhost_31337/RedeemTemplateLib.json +++ b/deployments/localhost_31337/RedeemTemplateLib.json @@ -7,7 +7,7 @@ "transactionIndex": 0, "gasUsed": "1610382", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe7428b107dda6e33ffb2053aa6c0ba52da0050e2919f6aa0088d56633d0d92c4", + "blockHash": "0x90ada4e203680bf89b71cc5cf894ead4c60854307f897efff6328800a5489349", "transactionHash": "0xd62feceac146592f2ea4dd3e2e02936386b62e4c960a41c70252da64e8561dd4", "logs": [], "blockNumber": 2, @@ -17,7 +17,7 @@ }, "address": "0x8858eeB3DfffA017D4BCE9801D340D36Cf895CCf", "args": [], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{\"deployTemplate()\":{\"details\":\"Deploys a clone of the deployed Redeem.sol contract.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/libraries/RedeemTemplateLib.sol\":\"RedeemTemplateLib\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/libraries/RedeemTemplateLib.sol\":{\"keccak256\":\"0x32d84298d723ba5276fab8128c26fe0855c62e5145ca2575a56e236e10c94398\",\"urls\":[\"bzz-raw://7c72dafc9e05d048224c1041ed2b424e5843e6d7412a0e82f734d38129b00457\",\"dweb:/ipfs/QmXkGKwoyhGCvtNZW2sCpWFn7uCTLnq1j6xqYUcNzTU3bU\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Redeem.sol\":{\"keccak256\":\"0x1057014625bc86d3b02faa35824d283d5baa6ae14b59a4561b0b27d342173090\",\"urls\":[\"bzz-raw://b51f63b92eb53fd5ed6cb48f66609a259f34d95af2c7796049951f667e405a4d\",\"dweb:/ipfs/QmWdT3TbmVrvPkLJw2DYLWecnoNabZ2CAQLnDLpHDPPn1o\"]}},\"version\":1}", "bytecode": "0x611c45610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b611968806102a88339019056fe608060405234801561001057600080fd5b50611948806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063485cc95511610097578063a457c2d711610066578063a457c2d714610541578063a9059cbb146105a7578063c45a01551461060d578063dd62ed3e1461065757610100565b8063485cc955146103b457806370a082311461041857806395d89b41146104705780639dc29fac146104f357610100565b80632bab754b116100d35780632bab754b14610292578063313ce567146102dc578063395093511461030057806340c10f191461036657610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ee57806323b872dd1461020c575b600080fd5b61010d6106cf565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610708565b604051808215151515815260200191505060405180910390f35b6101f6610726565b6040518082815260200191505060405180910390f35b6102786004803603606081101561022257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610730565b604051808215151515815260200191505060405180910390f35b61029a610809565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102e461082f565b604051808260ff1660ff16815260200191505060405180910390f35b61034c6004803603604081101561031657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610834565b604051808215151515815260200191505060405180910390f35b6103b26004803603604081101561037c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108e7565b005b610416600480360360408110156103ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109b8565b005b61045a6004803603602081101561042e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b02565b6040518082815260200191505060405180910390f35b610478610b4a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b857808201518184015260208101905061049d565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61053f6004803603604081101561050957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b83565b005b61058d6004803603604081101561055757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c54565b604051808215151515815260200191505060405180910390f35b6105f3600480360360408110156105bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d21565b604051808215151515815260200191505060405180910390f35b610615610d3f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106b96004803603604081101561066d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d65565b6040518082815260200191505060405180910390f35b6040518060400160405280601381526020017f5072696d69746976652056312052656465656d0000000000000000000000000081525081565b600061071c610715610dec565b8484610df4565b6001905092915050565b6000600254905090565b600061073d848484610feb565b6107fe84610749610dec565b6107f98560405180606001604052806028815260200161185c60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107af610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b600190509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b60006108dd610841610dec565b846108d88560016000610852610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b610df4565b6001905092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b6109b482826113f4565b5050565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040518060400160405280600381526020017f52444d000000000000000000000000000000000000000000000000000000000081525081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b610c5082826115bb565b5050565b6000610d17610c61610dec565b84610d12856040518060600160405280602581526020016118ee6025913960016000610c8b610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b6001905092915050565b6000610d35610d2e610dec565b8484610feb565b6001905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806118ca6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806118146022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611071576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806118a56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806117cf6023913960400191505060405180910390fd5b61110283838361177f565b61116d81604051806060016040528060268152602001611836602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611200816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611359576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561131e578082015181840152602081019050611303565b50505050905090810190601f16801561134b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156113ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6114a36000838361177f565b6114b88160025461136c90919063ffffffff16565b60028190555061150f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118846021913960400191505060405180910390fd5b61164d8260008361177f565b6116b8816040518060600160405280602281526020016117f2602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061170f8160025461178490919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60006117c683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112ac565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fac7fa7b952186f8a18d776694bf28c0fedda6e4747c77cc4a8c2122833e598b64736f6c63430006020033a264697066735822122093b28d57b7ab1cda534fa8ed47da5ba7b6ac18c770e41052d0813b903b7a654e64736f6c63430006020033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b611968806102a88339019056fe608060405234801561001057600080fd5b50611948806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063485cc95511610097578063a457c2d711610066578063a457c2d714610541578063a9059cbb146105a7578063c45a01551461060d578063dd62ed3e1461065757610100565b8063485cc955146103b457806370a082311461041857806395d89b41146104705780639dc29fac146104f357610100565b80632bab754b116100d35780632bab754b14610292578063313ce567146102dc578063395093511461030057806340c10f191461036657610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ee57806323b872dd1461020c575b600080fd5b61010d6106cf565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610708565b604051808215151515815260200191505060405180910390f35b6101f6610726565b6040518082815260200191505060405180910390f35b6102786004803603606081101561022257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610730565b604051808215151515815260200191505060405180910390f35b61029a610809565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102e461082f565b604051808260ff1660ff16815260200191505060405180910390f35b61034c6004803603604081101561031657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610834565b604051808215151515815260200191505060405180910390f35b6103b26004803603604081101561037c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108e7565b005b610416600480360360408110156103ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109b8565b005b61045a6004803603602081101561042e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b02565b6040518082815260200191505060405180910390f35b610478610b4a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b857808201518184015260208101905061049d565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61053f6004803603604081101561050957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b83565b005b61058d6004803603604081101561055757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c54565b604051808215151515815260200191505060405180910390f35b6105f3600480360360408110156105bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d21565b604051808215151515815260200191505060405180910390f35b610615610d3f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106b96004803603604081101561066d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d65565b6040518082815260200191505060405180910390f35b6040518060400160405280601381526020017f5072696d69746976652056312052656465656d0000000000000000000000000081525081565b600061071c610715610dec565b8484610df4565b6001905092915050565b6000600254905090565b600061073d848484610feb565b6107fe84610749610dec565b6107f98560405180606001604052806028815260200161185c60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107af610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b600190509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b60006108dd610841610dec565b846108d88560016000610852610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b610df4565b6001905092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b6109b482826113f4565b5050565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040518060400160405280600381526020017f52444d000000000000000000000000000000000000000000000000000000000081525081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b610c5082826115bb565b5050565b6000610d17610c61610dec565b84610d12856040518060600160405280602581526020016118ee6025913960016000610c8b610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b6001905092915050565b6000610d35610d2e610dec565b8484610feb565b6001905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806118ca6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806118146022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611071576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806118a56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806117cf6023913960400191505060405180910390fd5b61110283838361177f565b61116d81604051806060016040528060268152602001611836602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611200816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611359576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561131e578082015181840152602081019050611303565b50505050905090810190601f16801561134b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156113ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6114a36000838361177f565b6114b88160025461136c90919063ffffffff16565b60028190555061150f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118846021913960400191505060405180910390fd5b61164d8260008361177f565b6116b8816040518060600160405280602281526020016117f2602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061170f8160025461178490919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60006117c683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112ac565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fac7fa7b952186f8a18d776694bf28c0fedda6e4747c77cc4a8c2122833e598b64736f6c63430006020033a264697066735822122093b28d57b7ab1cda534fa8ed47da5ba7b6ac18c770e41052d0813b903b7a654e64736f6c63430006020033", diff --git a/deployments/localhost_31337/Registry.json b/deployments/localhost_31337/Registry.json index 98e587f7..854d2a63 100644 --- a/deployments/localhost_31337/Registry.json +++ b/deployments/localhost_31337/Registry.json @@ -531,7 +531,7 @@ "transactionIndex": 0, "gasUsed": "2143856", "logsBloom": "0x00000000000000000000000000000008000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000080000400400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0cd01fda7bb0e0f0b760f27c5f21135d1bf0eed3b6e53d4e53563bd39df17bfc", + "blockHash": "0xb03efbf260c8ea5c3179d66ccd310165c4c9a9fdffa9b66f8414bc29a3140f51", "transactionHash": "0xae6c4ee82196f6c674b63d14686b1f4dd596f4c4ba52cfa00c39e28405acac9d", "logs": [ { @@ -546,7 +546,7 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x0cd01fda7bb0e0f0b760f27c5f21135d1bf0eed3b6e53d4e53563bd39df17bfc" + "blockHash": "0xb03efbf260c8ea5c3179d66ccd310165c4c9a9fdffa9b66f8414bc29a3140f51" }, { "transactionIndex": 0, @@ -560,7 +560,7 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0x0cd01fda7bb0e0f0b760f27c5f21135d1bf0eed3b6e53d4e53563bd39df17bfc" + "blockHash": "0xb03efbf260c8ea5c3179d66ccd310165c4c9a9fdffa9b66f8414bc29a3140f51" } ], "blockNumber": 3, @@ -570,7 +570,7 @@ }, "address": "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7", "args": [], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"redeemAddress\",\"type\":\"address\"}],\"name\":\"DeployedOptionClone\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"UnverifiedExpiry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"UnverifiedToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionFactory_\",\"type\":\"address\"}],\"name\":\"UpdatedOptionFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"redeemFactory_\",\"type\":\"address\"}],\"name\":\"UpdatedRedeemFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"VerifiedExpiry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"VerifiedToken\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allOptionClones\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"calculateOptionAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"deployOption\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllOptionClonesLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"getOptionAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"isVerifiedExpiry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"isVerifiedOption\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"isVerifiedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseDeployments\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionFactory_\",\"type\":\"address\"}],\"name\":\"setOptionFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemFactory_\",\"type\":\"address\"}],\"name\":\"setRedeemFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseDeployments\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"unverifyExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"unverifyToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"verifyExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"verifyToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"calculateOptionAddress(address,address,uint256,uint256,uint256)\":{\"details\":\"Calculates the option address deployed with create2 using the parameter arguments.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp of the option's expiration date.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the ERC-20 strike token.\",\"underlyingToken\":\"The address of the ERC-20 underlying token.\"},\"returns\":{\"_0\":\"The address of the option with the parameter arguments.\"}},\"deployOption(address,address,uint256,uint256,uint256)\":{\"details\":\"Deploys an option contract clone with create2.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp of the option's expiration date.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the ERC-20 strike token.\",\"underlyingToken\":\"The address of the ERC-20 underlying token.\"},\"returns\":{\"_0\":\"The address of the deployed option clone.\"}},\"getAllOptionClonesLength()\":{\"details\":\"Returns the length of the allOptionClones address array.\"},\"getOptionAddress(address,address,uint256,uint256,uint256)\":{\"details\":\"Gets the option address and returns address zero if not yet deployed.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp of the option's expiration date.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the ERC-20 strike token.\",\"underlyingToken\":\"The address of the ERC-20 underlying token.\"},\"returns\":{\"_0\":\"The address of the option with the parameter arguments.\"}},\"isVerifiedExpiry(uint256)\":{\"details\":\"Checks the verifiedExpiries private mapping and returns verification status of token.\",\"returns\":{\"_0\":\"bool Verified or not verified.\"}},\"isVerifiedOption(address)\":{\"details\":\"Checks an option address to see if it has verified assets and expiry time.\",\"params\":{\"optionAddress\":\"The address of the option token.\"},\"returns\":{\"_0\":\"bool If the option has verified underlying and strike tokens, and expiry time.\"}},\"isVerifiedToken(address)\":{\"details\":\"Checks the verifiedTokens private mapping and returns verification status of token.\",\"returns\":{\"_0\":\"bool Verified or not verified.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pauseDeployments()\":{\"details\":\"Pauses the deployOption function.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setOptionFactory(address)\":{\"details\":\"Sets the option factory contract to use for deploying clones.\",\"params\":{\"optionFactory_\":\"The address of the option factory.\"}},\"setRedeemFactory(address)\":{\"details\":\"Sets the redeem factory contract to use for deploying clones.\",\"params\":{\"redeemFactory_\":\"The address of the redeem factory.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpauseDeployments()\":{\"details\":\"Unpauses the deployOption function.\"},\"unverifyExpiry(uint256)\":{\"details\":\"Sets an expiry timestamp's verification status to false.\"},\"unverifyToken(address)\":{\"details\":\"Sets a verified token's verification status to false.\"},\"verifyExpiry(uint256)\":{\"details\":\"Sets an expiry timestamp's verification status to true.\"},\"verifyToken(address)\":{\"details\":\"Sets an ERC-20 token verification status to true.\"}}},\"userdoc\":{\"methods\":{\"getOptionAddress(address,address,uint256,uint256,uint256)\":{\"notice\":\"Will calculate the option address using the parameter arguments. Checks the code size of the address to see if the contract has been deployed yet. If contract has not been deployed, returns address zero.\"},\"unverifyExpiry(uint256)\":{\"notice\":\"A mapping of standardized, \\\"verified\\\", timestamps for the options.\"},\"verifyExpiry(uint256)\":{\"notice\":\"A mapping of standardized, \\\"verified\\\", timestamps for the options.\"},\"verifyToken(address)\":{\"notice\":\"A \\\"verified\\\" token is a standard ERC-20 token that we have tested with the option contract. An example of an \\\"unverified\\\" token is a non-standard ERC-20 token which has not been tested.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/option/applications/Registry.sol\":\"Registry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x0336d64bd695c5d8bb962fd3dacb3d26f52879b19e75472d7dea9f91f7add79a\",\"urls\":[\"bzz-raw://d709c1de86475b74fa4f614458e868213f8e5b13eed8b29b465793cd97e5c0f5\",\"dweb:/ipfs/QmYVgazum1VVeDoJYYmKhAJ1mcuTy8vidb2iFEMWcVdSeY\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/option/applications/Registry.sol\":{\"keccak256\":\"0x027242dd1913c0695475b055ed09b2ed557f7a76c4030d6df46b07ed4f8d67f3\",\"urls\":[\"bzz-raw://f11ace92d4cd469f7163cb43c52449367d4cf2f1c0e597730713fae96bf06eef\",\"dweb:/ipfs/QmawRj3FvvqmpZ2SognNin6spiJUK5fcioYDkJouxrMz9z\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IOptionFactory.sol\":{\"keccak256\":\"0x523335d4aa7b9895d0afd9dbc14e3f3356a1d64827a6f90571c08aef54fe5a3c\",\"urls\":[\"bzz-raw://6e59a331ddd34d836f0fd2a25800cf29ccf0a5d8a074ff2aefa4072106f1388d\",\"dweb:/ipfs/QmXMEvdgdhUgprAG2fAX95imL2vdPAfsoi6NemzvbqMQvK\"]},\"contracts/option/interfaces/IRedeemFactory.sol\":{\"keccak256\":\"0xe08632c1198fa61a3848da09b11fd427f3fedfc1c1e3b8176e3ce2055e7ae208\",\"urls\":[\"bzz-raw://563f70356a74c1e98a4b90c96848082914292d758271cb529e10abd53cd88960\",\"dweb:/ipfs/QmRD4esxBckRUmERKuamJBPLTz7ukGcQj1PRzyQZNm5uo5\"]},\"contracts/option/interfaces/IRegistry.sol\":{\"keccak256\":\"0x02aeb84e8b748674bc31707899158885066923f203e7a3a58cee3c68a49ec96f\",\"urls\":[\"bzz-raw://78dd4aa316f8b50ed595437e8a1ec1e519384c89bd605b9aa9194f3b98543a43\",\"dweb:/ipfs/QmXvrc8JwQCkFHBTwoGjV7xCUcNN8Ed15QES9tKWsjuUAz\"]}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506000620000246200010e60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35060008060146101000a81548160ff0219169083151502179055506001600060156101000a81548160ff02191690831515021790555062000108336200011660201b60201c565b6200032e565b600033905090565b620001266200010e60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620001e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000270576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180620028706026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b612532806200033e6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638da5cb5b116100b8578063b000e9ec1161007c578063b000e9ec146105d7578063b3461c8714610699578063c7a988ac146106e3578063e4ec108c14610701578063f2fde38b14610745578063fce4ae3a1461078957610142565b80638da5cb5b146103f95780639180928f1461044357806392160076146105055780639788973414610549578063aaf15bb51461059357610142565b80635c975abb1161010a5780635c975abb146102e15780636189a4d31461030357806366f1976d14610371578063715018a61461037b5780637f53abde146103855780638229d851146103b357610142565b80631027b219146101475780632e53926d146101a357806339c00f41146102655780633d11c796146102935780634130276b1461029d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107e5565b604051808215151515815260200191505060405180910390f35b610223600480360360a08110156101b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061083b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102916004803603602081101561027b57600080fd5b8101908080359060200190929190505050610973565b005b61029b610aa2565b005b6102df600480360360208110156102b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b75565b005b6102e9610d7f565b604051808215151515815260200191505060405180910390f35b61032f6004803603602081101561031957600080fd5b8101908080359060200190929190505050610d95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610379610dd1565b005b610383610ea4565b005b6103b16004803603602081101561039b57600080fd5b810190808035906020019092919050505061102c565b005b6103df600480360360208110156103c957600080fd5b81019080803590602001909291905050506111d1565b604051808215151515815260200191505060405180910390f35b6104016111fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c3600480360360a081101561045957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611224565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105476004803603602081101561051b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a1a565b005b610551611b6a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105d5600480360360208110156105a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b90565b005b610657600480360360a08110156105ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611ce0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106a1611d28565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb611d4e565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d5b565b005b6107876004803603602081101561075b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ec2565b005b6107cb6004803603602081101561079f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120cf565b604051808215151515815260200191505060405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e53926d88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561092957600080fd5b505afa15801561093d573d6000803e3d6000fd5b505050506040513d602081101561095357600080fd5b810190808051906020019092919050505090508091505095945050505050565b61097b6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f928f06bc62edcabae2855ccfad4a2f103f1516665607048ed17a208d755713f9816040518082815260200191505060405180910390a150565b610aaa6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610b736122b4565b565b610b7d6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ce1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fb48a62163a7d747c16a177c1eb529841e700a0bb4a1e787d7d293eaaf7716d4d60405160405180910390a250565b60008060149054906101000a900460ff16905090565b60058181548110610da257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610dd96122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610ea26123bc565b565b610eac6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6110346122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b4281101561116b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f455850495245445f54494d455354414d50000000000000000000000081525060200191505060405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f01a8c23c3824519cd8b455f3e637b99e97249d2e06ab99d93f43d60d163fb5bf816040518082815260200191505060405180910390a150565b60006004600083815260200190815260200160002060009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060159054906101000a900460ff166112a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060156101000a81548160ff021916908315150217905550600060149054906101000a900460ff1615611344576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600084116113ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008311611430576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b428210156114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156115b25750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b611624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d604a1ef88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561171357600080fd5b505af1158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe8d6396836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156117f357600080fd5b505af1158015611807573d6000803e3d6000fd5b505050506040513d602081101561181d57600080fd5b810190808051906020019092919050505090506005829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166335638b6b83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fdb19f143ae8e015bc96c062e81a1c69f2e1568dfba82c18947239515a0b8725b60405160405180910390a481925050506001600060156101000a81548160ff02191690831515021790555095945050505050565b611a226122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ae3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f4f32895401ed84629e6727059ffe5f8d2f637bc6c325630ba6054007ceb95c2c60405160405180910390a250565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611b986122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167feec46c83ee301290575f8c7bb5428480c127f0c54263c00f30465050f4495a8e60405160405180910390a250565b600080611cf0878787878761083b565b90506000611cfd826124c6565b905060008163ffffffff161115611d18578192505050611d1f565b6000925050505b95945050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600580549050905090565b611d636122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611e24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fe9769d9a414671453740fdb9cc92922655391134bd1beec930a2203bd45a67c060405160405180910390a250565b611eca6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612011576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806124d76026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082905060008173ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561211d57600080fd5b505afa158015612131573d6000803e3d6000fd5b505050506040513d602081101561214757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d60208110156121cc57600080fd5b8101908080519060200190929190505050905060008373ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561222757600080fd5b505afa15801561223b573d6000803e3d6000fd5b505050506040513d602081101561225157600080fd5b81019080805190602001909291905050509050600061226f846107e5565b9050600061227c846107e5565b90506000612289846111d1565b90508280156122955750815b801561229e5750805b975050505050505050919050565b600033905090565b600060149054906101000a900460ff16612336576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6123796122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff161561243f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124836122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600080823b90508091505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122018888278084f33bcfed0ffea843d71474802d7d3a7183dda4dd402fd74264a0e64736f6c634300060200334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c80638da5cb5b116100b8578063b000e9ec1161007c578063b000e9ec146105d7578063b3461c8714610699578063c7a988ac146106e3578063e4ec108c14610701578063f2fde38b14610745578063fce4ae3a1461078957610142565b80638da5cb5b146103f95780639180928f1461044357806392160076146105055780639788973414610549578063aaf15bb51461059357610142565b80635c975abb1161010a5780635c975abb146102e15780636189a4d31461030357806366f1976d14610371578063715018a61461037b5780637f53abde146103855780638229d851146103b357610142565b80631027b219146101475780632e53926d146101a357806339c00f41146102655780633d11c796146102935780634130276b1461029d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107e5565b604051808215151515815260200191505060405180910390f35b610223600480360360a08110156101b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061083b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102916004803603602081101561027b57600080fd5b8101908080359060200190929190505050610973565b005b61029b610aa2565b005b6102df600480360360208110156102b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b75565b005b6102e9610d7f565b604051808215151515815260200191505060405180910390f35b61032f6004803603602081101561031957600080fd5b8101908080359060200190929190505050610d95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610379610dd1565b005b610383610ea4565b005b6103b16004803603602081101561039b57600080fd5b810190808035906020019092919050505061102c565b005b6103df600480360360208110156103c957600080fd5b81019080803590602001909291905050506111d1565b604051808215151515815260200191505060405180910390f35b6104016111fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c3600480360360a081101561045957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611224565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105476004803603602081101561051b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a1a565b005b610551611b6a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105d5600480360360208110156105a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b90565b005b610657600480360360a08110156105ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611ce0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106a1611d28565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb611d4e565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d5b565b005b6107876004803603602081101561075b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ec2565b005b6107cb6004803603602081101561079f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120cf565b604051808215151515815260200191505060405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e53926d88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561092957600080fd5b505afa15801561093d573d6000803e3d6000fd5b505050506040513d602081101561095357600080fd5b810190808051906020019092919050505090508091505095945050505050565b61097b6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f928f06bc62edcabae2855ccfad4a2f103f1516665607048ed17a208d755713f9816040518082815260200191505060405180910390a150565b610aaa6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610b736122b4565b565b610b7d6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ce1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fb48a62163a7d747c16a177c1eb529841e700a0bb4a1e787d7d293eaaf7716d4d60405160405180910390a250565b60008060149054906101000a900460ff16905090565b60058181548110610da257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610dd96122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610ea26123bc565b565b610eac6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6110346122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b4281101561116b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f455850495245445f54494d455354414d50000000000000000000000081525060200191505060405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f01a8c23c3824519cd8b455f3e637b99e97249d2e06ab99d93f43d60d163fb5bf816040518082815260200191505060405180910390a150565b60006004600083815260200190815260200160002060009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060159054906101000a900460ff166112a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060156101000a81548160ff021916908315150217905550600060149054906101000a900460ff1615611344576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600084116113ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008311611430576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b428210156114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156115b25750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b611624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d604a1ef88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561171357600080fd5b505af1158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe8d6396836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156117f357600080fd5b505af1158015611807573d6000803e3d6000fd5b505050506040513d602081101561181d57600080fd5b810190808051906020019092919050505090506005829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166335638b6b83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fdb19f143ae8e015bc96c062e81a1c69f2e1568dfba82c18947239515a0b8725b60405160405180910390a481925050506001600060156101000a81548160ff02191690831515021790555095945050505050565b611a226122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ae3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f4f32895401ed84629e6727059ffe5f8d2f637bc6c325630ba6054007ceb95c2c60405160405180910390a250565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611b986122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167feec46c83ee301290575f8c7bb5428480c127f0c54263c00f30465050f4495a8e60405160405180910390a250565b600080611cf0878787878761083b565b90506000611cfd826124c6565b905060008163ffffffff161115611d18578192505050611d1f565b6000925050505b95945050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600580549050905090565b611d636122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611e24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fe9769d9a414671453740fdb9cc92922655391134bd1beec930a2203bd45a67c060405160405180910390a250565b611eca6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612011576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806124d76026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082905060008173ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561211d57600080fd5b505afa158015612131573d6000803e3d6000fd5b505050506040513d602081101561214757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d60208110156121cc57600080fd5b8101908080519060200190929190505050905060008373ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561222757600080fd5b505afa15801561223b573d6000803e3d6000fd5b505050506040513d602081101561225157600080fd5b81019080805190602001909291905050509050600061226f846107e5565b9050600061227c846107e5565b90506000612289846111d1565b90508280156122955750815b801561229e5750805b975050505050505050919050565b600033905090565b600060149054906101000a900460ff16612336576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6123796122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff161561243f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124836122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600080823b90508091505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122018888278084f33bcfed0ffea843d71474802d7d3a7183dda4dd402fd74264a0e64736f6c63430006020033", @@ -702,7 +702,7 @@ "storageLayout": { "storage": [ { - "astId": 33, + "astId": 8111, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "_owner", "offset": 0, @@ -710,7 +710,7 @@ "type": "t_address" }, { - "astId": 1281, + "astId": 9359, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "_paused", "offset": 20, @@ -718,7 +718,7 @@ "type": "t_bool" }, { - "astId": 1351, + "astId": 9429, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "_notEntered", "offset": 21, @@ -726,7 +726,7 @@ "type": "t_bool" }, { - "astId": 4384, + "astId": 12549, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "optionFactory", "offset": 0, @@ -734,7 +734,7 @@ "type": "t_address" }, { - "astId": 4387, + "astId": 12552, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "redeemFactory", "offset": 0, @@ -742,7 +742,7 @@ "type": "t_address" }, { - "astId": 4391, + "astId": 12556, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "verifiedTokens", "offset": 0, @@ -750,7 +750,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 4395, + "astId": 12560, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "verifiedExpiries", "offset": 0, @@ -758,7 +758,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 4398, + "astId": 12563, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "allOptionClones", "offset": 0, diff --git a/deployments/localhost_31337/TestERC20.json b/deployments/localhost_31337/TestERC20.json index 9f72b571..7d4770c3 100644 --- a/deployments/localhost_31337/TestERC20.json +++ b/deployments/localhost_31337/TestERC20.json @@ -323,7 +323,7 @@ "transactionIndex": 0, "gasUsed": "1244188", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000010000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000020000000800000000000000000000000010080000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0ddf099d4e3ec1d4996cd9dd44e0d739fedd031cd73f110cb720d4a28acf2d97", + "blockHash": "0xd672fd51816d9880557b3f752845b7e52f7ec5761d7e24fcb6ca568c30f1b9f8", "transactionHash": "0x9a323140f1bace890e55c6d658d8d87748486eba4b06f62786cb9b78db58309a", "logs": [ { @@ -338,7 +338,7 @@ ], "data": "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000", "logIndex": 0, - "blockHash": "0x0ddf099d4e3ec1d4996cd9dd44e0d739fedd031cd73f110cb720d4a28acf2d97" + "blockHash": "0xd672fd51816d9880557b3f752845b7e52f7ec5761d7e24fcb6ca568c30f1b9f8" } ], "blockNumber": 8, @@ -352,7 +352,7 @@ "Ether", "10000000000000000000000" ], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"details\":\"Function to mint tokens\",\"params\":{\"to\":\"The address that will receive the minted tokens.\",\"value\":\"The amount of tokens to mint.\"},\"returns\":{\"_0\":\"A boolean that indicates if the operation was successful.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/test/tokens/TestERC20.sol\":\"TestERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"contracts/test/tokens/TestERC20.sol\":{\"keccak256\":\"0x9741e48a659e66a7615f2e8c8a93d7c8324866f178b926a53c396367c7c9f799\",\"urls\":[\"bzz-raw://7254e0de762562621113c1951978e291e9a5832565da9ab8df7857bbd0b0f657\",\"dweb:/ipfs/QmdA1Y2hRW21QTGdhWDZ2pdMfrhrjADTZhexqgK9HpCJPZ\"]}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200189938038062001899833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919050505082828160039080519060200190620001dc9291906200049b565b508060049080519060200190620001f59291906200049b565b506012600560006101000a81548160ff021916908360ff16021790555050506200022633826200022f60201b60201c565b5050506200054a565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620002d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b620002e7600083836200040d60201b60201c565b62000303816002546200041260201b62000fb41790919060201c565b60028190555062000361816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546200041260201b62000fb41790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60008082840190508381101562000491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004de57805160ff19168380011785556200050f565b828001600101855582156200050f579182015b828111156200050e578251825591602001919060010190620004f1565b5b5090506200051e919062000522565b5090565b6200054791905b808211156200054357600081600090555060010162000529565b5090565b90565b61133f806200055a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220aae222bc33195deeb2b44af7f5d04f03ff98f96bfefb7d6b2624f159b9f175c564736f6c63430006020033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220aae222bc33195deeb2b44af7f5d04f03ff98f96bfefb7d6b2624f159b9f175c564736f6c63430006020033", @@ -409,7 +409,7 @@ "storageLayout": { "storage": [ { - "astId": 336, + "astId": 8414, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_balances", "offset": 0, @@ -417,7 +417,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 342, + "astId": 8420, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_allowances", "offset": 0, @@ -425,7 +425,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 344, + "astId": 8422, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_totalSupply", "offset": 0, @@ -433,7 +433,7 @@ "type": "t_uint256" }, { - "astId": 346, + "astId": 8424, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_name", "offset": 0, @@ -441,7 +441,7 @@ "type": "t_string_storage" }, { - "astId": 348, + "astId": 8426, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_symbol", "offset": 0, @@ -449,7 +449,7 @@ "type": "t_string_storage" }, { - "astId": 350, + "astId": 8428, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_decimals", "offset": 0, diff --git a/deployments/localhost_31337/Trader.json b/deployments/localhost_31337/Trader.json index 47727c91..4cb8be52 100644 --- a/deployments/localhost_31337/Trader.json +++ b/deployments/localhost_31337/Trader.json @@ -344,7 +344,7 @@ "transactionIndex": 0, "gasUsed": "2285903", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x43254a9eecac99b9f0e86217ed2ea8ca74f732f74f0c6e3144de10be7dbb7461", + "blockHash": "0x43b54cd3c83c42f3328d6f2db44adc9490139cc87894aff405757556164b7e20", "transactionHash": "0x5144fd4404c382fe2531c628feefc55b9e642dc60b7a65f447d573a2e6ec435f", "logs": [], "blockNumber": 11, @@ -356,7 +356,7 @@ "args": [ "0xc4905364b78a742ccce7B890A89514061E47068D" ], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"TraderClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outUnderlyings\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inStrikes\",\"type\":\"uint256\"}],\"name\":\"TraderExercise\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputOptions\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputRedeems\",\"type\":\"uint256\"}],\"name\":\"TraderMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inRedeems\",\"type\":\"uint256\"}],\"name\":\"TraderRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"TraderUnwind\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"closeQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeClose\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"exerciseQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExercise\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"unwindQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeUnwind\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"safeClose(address,uint256,address)\":{\"details\":\"Burn optionTokens and redeemTokens to withdraw underlyingTokens.\",\"params\":{\"closeQuantity\":\"Quantity of optionTokens to burn. (Implictly will burn the strike ratio quantity of redeemTokens).\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address.\"}},\"safeExercise(address,uint256,address)\":{\"details\":\"Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\",\"params\":{\"exerciseQuantity\":\"Quantity of optionTokens to exercise.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address.\"}},\"safeMint(address,uint256,address)\":{\"details\":\"Mint options at a 1:1 ratio with deposited underlying tokens.\",\"params\":{\"mintQuantity\":\"Quantity of options to mint and underlyingToken to deposit.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The newly minted options and redeems are sent to the receiver address.\"}},\"safeRedeem(address,uint256,address)\":{\"details\":\"Burns redeemTokens to withdraw available strikeTokens.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The strikeTokens are sent to the receiver address.\",\"redeemQuantity\":\"redeemQuantity of redeemTokens to burn.\"}},\"safeUnwind(address,uint256,address)\":{\"details\":\"Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens and redeemTokens are sent to the receiver address.\",\"unwindQuantity\":\"Quantity of option tokens used to calculate the amount of redeem tokens to burn.\"}}}},\"userdoc\":{\"methods\":{\"safeClose(address,uint256,address)\":{\"notice\":\"The redeemTokens to burn is equal to the optionTokens * strike ratio. inOptions = inRedeems / strike ratio = outUnderlyings\"},\"safeExercise(address,uint256,address)\":{\"notice\":\"Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\"},\"safeMint(address,uint256,address)\":{\"notice\":\"Also mints redeems at a strike ratio to the deposited underlyings. Warning: Calls msg.sender with safeTransferFrom.\"},\"safeRedeem(address,uint256,address)\":{\"notice\":\"inRedeems = outStrikes.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/option/extensions/Trader.sol\":\"Trader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/option/extensions/Trader.sol\":{\"keccak256\":\"0xcd6d24d50e76af7ace0d1b82e042fc0ada30c743f055988ca4e907a97a249b22\",\"urls\":[\"bzz-raw://cd7338a7a86d27b182f75cc8b5fcd88d8ea0b711581b0b9b9ec3eb9b5127de82\",\"dweb:/ipfs/QmeTux1AZ2Bqvk5frWotp28HLmnBpVqHkXyydYNNxeMFEv\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/ITrader.sol\":{\"keccak256\":\"0xb8f9e6d923e556e137a606c76e9adf8fd07375c7ff0650f4a7932adc950df44f\",\"urls\":[\"bzz-raw://ef82aa3d081c12e307f45334cffd8916a27c5c7db62c2b44ce9663633a8c385b\",\"dweb:/ipfs/QmQLsKZomP19HAAXKpLshhXiZhrusbf9yoZhy8tJDffVvS\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506040516128cc3803806128cc8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061281d806100af6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063087b063214610067578063154fa089146100f057806320e469d6146101805780633fc8cef314610209578063a1d8778f14610253578063b8a6bb3b146102d5575b600080fd5b6100d36004803603606081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610365565b604051808381526020018281526020019250505060405180910390f35b61015c6004803603606081101561010657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ac565b60405180848152602001838152602001828152602001935050505060405180910390f35b6101ec6004803603606081101561019657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105f6565b604051808381526020018281526020019250505060405180910390f35b61021161073d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102bf6004803603606081101561026957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610763565b6040518082815260200191505060405180910390f35b610341600480360360608110156102eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610899565b60405180848152602001838152602001828152602001935050505060405180910390f35b6000806000809054906101000a900460ff166103e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806104118787876109e3565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f453315713d2b83893ec1df8cf529328bf25e4fe72b6c4d880edb03243e80119b8885604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b60008060008060009054906101000a900460ff16610532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080600061055c8989896110be565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd0c7e26bb5b37129e4f53759eb48fc9e0c4bafd336a94f6b87c5ce9f139183e5846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff1661067a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806106a28787876116a1565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f58fb17601901d5509bf49bedd00d55850ef2ebff3adb67a5f517b86eed08a0c88484604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff166107e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061080d8585856118a1565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd75e50ef6162896bf5efc868c48b0c44d04ab08196d3e2b4c3aba5062c5ce94d836040518082815260200191505060405180910390a38091505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008060009054906101000a900460ff1661091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806000610949898989611c3b565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f602dc153bc8f9d064b879f6bc973338b7c009689b9cacc58a250c3fb3da51808846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008411610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ada57600080fd5b505afa158015610aee573d6000803e3d6000fd5b505050506040513d6020811015610b0457600080fd5b81019080805190602001909291905050501015610b89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000610caf8673ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015610bd457600080fd5b505afa158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b8101908080519060200190929190505050610ca18873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5757600080fd5b505afa158015610c6b573d6000803e3d6000fd5b505050506040513d6020811015610c8157600080fd5b81019080805190602001909291905050508861228390919063ffffffff16565b61230990919063ffffffff16565b9050808673ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf857600080fd5b505afa158015610d0c573d6000803e3d6000fd5b505050506040513d6020811015610d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610daf57600080fd5b505afa158015610dc3573d6000803e3d6000fd5b505050506040513d6020811015610dd957600080fd5b81019080805190602001909291905050501015610e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b610f0b3387838973ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610eaa57600080fd5b505afa158015610ebe573d6000803e3d6000fd5b505050506040513d6020811015610ed457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b610f383387878973ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008673ffffffffffffffffffffffffffffffffffffffff1663787eae30868860006040519080825280601f01601f191660200182016040528015610f8c5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611014578082015181840152602081019050610ff9565b50505050905090810190601f1680156110415780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b15801561106157600080fd5b505af1158015611075573d6000803e3d6000fd5b505050506040513d604081101561108b57600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508181935093505050935093915050565b6000806000808511611138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b428673ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561117f57600080fd5b505afa158015611193573d6000803e3d6000fd5b505050506040513d60208110156111a957600080fd5b81019080805190602001909291905050501061122d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006113538773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561127857600080fd5b505afa15801561128c573d6000803e3d6000fd5b505050506040513d60208110156112a257600080fd5b81019080805190602001909291905050506113458973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112fb57600080fd5b505afa15801561130f573d6000803e3d6000fd5b505050506040513d602081101561132557600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139c57600080fd5b505afa1580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561145357600080fd5b505afa158015611467573d6000803e3d6000fd5b505050506040513d602081101561147d57600080fd5b81019080805190602001909291905050501015611502576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6115af3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154e57600080fd5b505afa158015611562573d6000803e3d6000fd5b505050506040513d602081101561157857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561163157600080fd5b505af1158015611645573d6000803e3d6000fd5b505050506040513d606081101561165b57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000806000841161171a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6117c73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561176657600080fd5b505afa15801561177a573d6000803e3d6000fd5b505050506040513d602081101561179057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561184857600080fd5b505af115801561185c573d6000803e3d6000fd5b505050506040513d604081101561187257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6000808311611918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b828473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195f57600080fd5b505afa158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b81019080805190602001909291905050501015611ac5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611b723385858773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b1157600080fd5b505afa158015611b25573d6000803e3d6000fd5b505050506040513d6020811015611b3b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008473ffffffffffffffffffffffffffffffffffffffff16635e86929d846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611bf357600080fd5b505af1158015611c07573d6000803e3d6000fd5b505050506040513d6020811015611c1d57600080fd5b81019080805190602001909291905050509050809150509392505050565b6000806000808511611cb5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d3357600080fd5b505afa158015611d47573d6000803e3d6000fd5b505050506040513d6020811015611d5d57600080fd5b81019080805190602001909291905050501015611de2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611f088773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b8101908080519060200190929190505050611efa8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d6020811015611eda57600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d6020811015611f7b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561200857600080fd5b505afa15801561201c573d6000803e3d6000fd5b505050506040513d602081101561203257600080fd5b810190808051906020019092919050505010156120b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6121643388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561210357600080fd5b505afa158015612117573d6000803e3d6000fd5b505050506040513d602081101561212d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6121913388888a73ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561221357600080fd5b505af1158015612227573d6000803e3d6000fd5b505050506040513d606081101561223d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000808314156122965760009050612303565b60008284029050828482816122a757fe5b04146122fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061279d6021913960400191505060405180910390fd5b809150505b92915050565b600061234b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612440565b905092915050565b61243a846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612506565b50505050565b600080831182906124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156124b1578082015181840152602081019050612496565b50505050905090810190601f1680156124de5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816124f857fe5b049050809150509392505050565b6125258273ffffffffffffffffffffffffffffffffffffffff16612751565b612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106125e657805182526020820191506020810190506020830392506125c3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612648576040519150601f19603f3d011682016040523d82523d6000602084013e61264d565b606091505b5091509150816126c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561274b578080602001905160208110156126e457600080fd5b810190808051906020019092919050505061274a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806127be602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561279357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122053b598daeae8cb5287a7abf09921a29be70407f0204e7a824c66416f86ff7a1664736f6c63430006020033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063087b063214610067578063154fa089146100f057806320e469d6146101805780633fc8cef314610209578063a1d8778f14610253578063b8a6bb3b146102d5575b600080fd5b6100d36004803603606081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610365565b604051808381526020018281526020019250505060405180910390f35b61015c6004803603606081101561010657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ac565b60405180848152602001838152602001828152602001935050505060405180910390f35b6101ec6004803603606081101561019657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105f6565b604051808381526020018281526020019250505060405180910390f35b61021161073d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102bf6004803603606081101561026957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610763565b6040518082815260200191505060405180910390f35b610341600480360360608110156102eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610899565b60405180848152602001838152602001828152602001935050505060405180910390f35b6000806000809054906101000a900460ff166103e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806104118787876109e3565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f453315713d2b83893ec1df8cf529328bf25e4fe72b6c4d880edb03243e80119b8885604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b60008060008060009054906101000a900460ff16610532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080600061055c8989896110be565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd0c7e26bb5b37129e4f53759eb48fc9e0c4bafd336a94f6b87c5ce9f139183e5846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff1661067a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806106a28787876116a1565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f58fb17601901d5509bf49bedd00d55850ef2ebff3adb67a5f517b86eed08a0c88484604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff166107e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061080d8585856118a1565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd75e50ef6162896bf5efc868c48b0c44d04ab08196d3e2b4c3aba5062c5ce94d836040518082815260200191505060405180910390a38091505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008060009054906101000a900460ff1661091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806000610949898989611c3b565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f602dc153bc8f9d064b879f6bc973338b7c009689b9cacc58a250c3fb3da51808846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008411610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ada57600080fd5b505afa158015610aee573d6000803e3d6000fd5b505050506040513d6020811015610b0457600080fd5b81019080805190602001909291905050501015610b89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000610caf8673ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015610bd457600080fd5b505afa158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b8101908080519060200190929190505050610ca18873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5757600080fd5b505afa158015610c6b573d6000803e3d6000fd5b505050506040513d6020811015610c8157600080fd5b81019080805190602001909291905050508861228390919063ffffffff16565b61230990919063ffffffff16565b9050808673ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf857600080fd5b505afa158015610d0c573d6000803e3d6000fd5b505050506040513d6020811015610d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610daf57600080fd5b505afa158015610dc3573d6000803e3d6000fd5b505050506040513d6020811015610dd957600080fd5b81019080805190602001909291905050501015610e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b610f0b3387838973ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610eaa57600080fd5b505afa158015610ebe573d6000803e3d6000fd5b505050506040513d6020811015610ed457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b610f383387878973ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008673ffffffffffffffffffffffffffffffffffffffff1663787eae30868860006040519080825280601f01601f191660200182016040528015610f8c5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611014578082015181840152602081019050610ff9565b50505050905090810190601f1680156110415780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b15801561106157600080fd5b505af1158015611075573d6000803e3d6000fd5b505050506040513d604081101561108b57600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508181935093505050935093915050565b6000806000808511611138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b428673ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561117f57600080fd5b505afa158015611193573d6000803e3d6000fd5b505050506040513d60208110156111a957600080fd5b81019080805190602001909291905050501061122d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006113538773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561127857600080fd5b505afa15801561128c573d6000803e3d6000fd5b505050506040513d60208110156112a257600080fd5b81019080805190602001909291905050506113458973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112fb57600080fd5b505afa15801561130f573d6000803e3d6000fd5b505050506040513d602081101561132557600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139c57600080fd5b505afa1580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561145357600080fd5b505afa158015611467573d6000803e3d6000fd5b505050506040513d602081101561147d57600080fd5b81019080805190602001909291905050501015611502576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6115af3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154e57600080fd5b505afa158015611562573d6000803e3d6000fd5b505050506040513d602081101561157857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561163157600080fd5b505af1158015611645573d6000803e3d6000fd5b505050506040513d606081101561165b57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000806000841161171a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6117c73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561176657600080fd5b505afa15801561177a573d6000803e3d6000fd5b505050506040513d602081101561179057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561184857600080fd5b505af115801561185c573d6000803e3d6000fd5b505050506040513d604081101561187257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6000808311611918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b828473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195f57600080fd5b505afa158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b81019080805190602001909291905050501015611ac5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611b723385858773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b1157600080fd5b505afa158015611b25573d6000803e3d6000fd5b505050506040513d6020811015611b3b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008473ffffffffffffffffffffffffffffffffffffffff16635e86929d846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611bf357600080fd5b505af1158015611c07573d6000803e3d6000fd5b505050506040513d6020811015611c1d57600080fd5b81019080805190602001909291905050509050809150509392505050565b6000806000808511611cb5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d3357600080fd5b505afa158015611d47573d6000803e3d6000fd5b505050506040513d6020811015611d5d57600080fd5b81019080805190602001909291905050501015611de2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611f088773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b8101908080519060200190929190505050611efa8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d6020811015611eda57600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d6020811015611f7b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561200857600080fd5b505afa15801561201c573d6000803e3d6000fd5b505050506040513d602081101561203257600080fd5b810190808051906020019092919050505010156120b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6121643388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561210357600080fd5b505afa158015612117573d6000803e3d6000fd5b505050506040513d602081101561212d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6121913388888a73ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561221357600080fd5b505af1158015612227573d6000803e3d6000fd5b505050506040513d606081101561223d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000808314156122965760009050612303565b60008284029050828482816122a757fe5b04146122fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061279d6021913960400191505060405180910390fd5b809150505b92915050565b600061234b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612440565b905092915050565b61243a846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612506565b50505050565b600080831182906124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156124b1578082015181840152602081019050612496565b50505050905090810190601f1680156124de5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816124f857fe5b049050809150509392505050565b6125258273ffffffffffffffffffffffffffffffffffffffff16612751565b612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106125e657805182526020820191506020810190506020830392506125c3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612648576040519150601f19603f3d011682016040523d82523d6000602084013e61264d565b606091505b5091509150816126c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561274b578080602001905160208110156126e457600080fd5b810190808051906020019092919050505061274a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806127be602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561279357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122053b598daeae8cb5287a7abf09921a29be70407f0204e7a824c66416f86ff7a1664736f6c63430006020033", @@ -423,7 +423,7 @@ "storageLayout": { "storage": [ { - "astId": 1351, + "astId": 9429, "contract": "contracts/option/extensions/Trader.sol:Trader", "label": "_notEntered", "offset": 0, @@ -431,7 +431,7 @@ "type": "t_bool" }, { - "astId": 5176, + "astId": 13341, "contract": "contracts/option/extensions/Trader.sol:Trader", "label": "weth", "offset": 1, diff --git a/deployments/localhost_31337/USDC.json b/deployments/localhost_31337/USDC.json index de676271..6b17384b 100644 --- a/deployments/localhost_31337/USDC.json +++ b/deployments/localhost_31337/USDC.json @@ -323,7 +323,7 @@ "transactionIndex": 0, "gasUsed": "1244260", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010080000000000000000000000000000000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1775d4b61821147902abd6f61f18c91c2d80185ab5cbc25277a4bcb5029505d3", + "blockHash": "0xec62780627e1f8a369b097cc3de2d262e5fb939d9b59aee6e6ddcea0243ed3ce", "transactionHash": "0xa9ab77e52076fa39f827a76d711e6f45e8e8d2640af6d24b7d1ded23930a05a9", "logs": [ { @@ -338,7 +338,7 @@ ], "data": "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000", "logIndex": 0, - "blockHash": "0x1775d4b61821147902abd6f61f18c91c2d80185ab5cbc25277a4bcb5029505d3" + "blockHash": "0xec62780627e1f8a369b097cc3de2d262e5fb939d9b59aee6e6ddcea0243ed3ce" } ], "blockNumber": 9, @@ -352,7 +352,7 @@ "Stablecoin", "10000000000000000000000" ], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"details\":\"Function to mint tokens\",\"params\":{\"to\":\"The address that will receive the minted tokens.\",\"value\":\"The amount of tokens to mint.\"},\"returns\":{\"_0\":\"A boolean that indicates if the operation was successful.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/test/tokens/USDC.sol\":\"USDC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"contracts/test/tokens/USDC.sol\":{\"keccak256\":\"0xf0de4f0b4604da9288a488ee768e19b523c52cd66186313a5274b67a6057c29b\",\"urls\":[\"bzz-raw://f690c6fd1e0680e4785832eacc7a0dc0245d042d9b8a50873feb7e1c7c92360d\",\"dweb:/ipfs/QmZpzzk5iVwBHR8wKZA5Hqk1TNKFp4m5Wx2qC2wgNDT3yt\"]}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200189938038062001899833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919050505082828160039080519060200190620001dc9291906200049b565b508060049080519060200190620001f59291906200049b565b506012600560006101000a81548160ff021916908360ff16021790555050506200022633826200022f60201b60201c565b5050506200054a565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620002d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b620002e7600083836200040d60201b60201c565b62000303816002546200041260201b62000fb41790919060201c565b60028190555062000361816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546200041260201b62000fb41790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60008082840190508381101562000491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004de57805160ff19168380011785556200050f565b828001600101855582156200050f579182015b828111156200050e578251825591602001919060010190620004f1565b5b5090506200051e919062000522565b5090565b6200054791905b808211156200054357600081600090555060010162000529565b5090565b90565b61133f806200055a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ead707f49c84c141b066b6af793c81a83b66f209561a87d30dffae0c79952f9364736f6c63430006020033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ead707f49c84c141b066b6af793c81a83b66f209561a87d30dffae0c79952f9364736f6c63430006020033", @@ -409,7 +409,7 @@ "storageLayout": { "storage": [ { - "astId": 336, + "astId": 8414, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_balances", "offset": 0, @@ -417,7 +417,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 342, + "astId": 8420, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_allowances", "offset": 0, @@ -425,7 +425,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 344, + "astId": 8422, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_totalSupply", "offset": 0, @@ -433,7 +433,7 @@ "type": "t_uint256" }, { - "astId": 346, + "astId": 8424, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_name", "offset": 0, @@ -441,7 +441,7 @@ "type": "t_string_storage" }, { - "astId": 348, + "astId": 8426, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_symbol", "offset": 0, @@ -449,7 +449,7 @@ "type": "t_string_storage" }, { - "astId": 350, + "astId": 8428, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_decimals", "offset": 0, diff --git a/deployments/localhost_31337/UniswapConnector.json b/deployments/localhost_31337/UniswapConnector.json index f670532b..51ea8767 100644 --- a/deployments/localhost_31337/UniswapConnector.json +++ b/deployments/localhost_31337/UniswapConnector.json @@ -5,6 +5,25 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + } + ], + "name": "FlashedShortOption", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -297,8 +316,13 @@ { "inputs": [ { - "internalType": "contract IOption", - "name": "optionToken", + "internalType": "address", + "name": "pairAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "optionAddress", "type": "address" }, { @@ -331,7 +355,7 @@ "outputs": [ { "internalType": "bool", - "name": "", + "name": "success", "type": "bool" } ], @@ -486,50 +510,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "mintShortOptionsThenSwapToTokens", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -869,15 +849,15 @@ "from": "0xc783df8a850f42e7F7e57013759C285caa701eB6", "contractAddress": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0", "transactionIndex": 0, - "gasUsed": "4934071", + "gasUsed": "5328417", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000080000400000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000010000000020000000000000000000080000000000000000000000000000000000000000000000", - "blockHash": "0xfd2c4c34a72c0378617649cfa9461bc8c5d78022951bf5c51304059c9f3548f8", - "transactionHash": "0xcdf1439708ccc3d4a2fc8e9a0a499d1a36286935186bd6f3f0ce2d67b196e442", + "blockHash": "0x18a13ee4e2f833c919e01308fc93f7a564f2fc9defdbfe56edc384b1efcf1c65", + "transactionHash": "0xf3c639218211d4a4d2ccd32b14ddf0bb5ff9102149f953b88bce01e4c95a499e", "logs": [ { "transactionIndex": 0, "blockNumber": 13, - "transactionHash": "0xcdf1439708ccc3d4a2fc8e9a0a499d1a36286935186bd6f3f0ce2d67b196e442", + "transactionHash": "0xf3c639218211d4a4d2ccd32b14ddf0bb5ff9102149f953b88bce01e4c95a499e", "address": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", @@ -886,20 +866,20 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0xfd2c4c34a72c0378617649cfa9461bc8c5d78022951bf5c51304059c9f3548f8" + "blockHash": "0x18a13ee4e2f833c919e01308fc93f7a564f2fc9defdbfe56edc384b1efcf1c65" } ], "blockNumber": 13, - "cumulativeGasUsed": "4934071", + "cumulativeGasUsed": "5328417", "status": 1, "byzantium": true }, "address": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0", "args": [], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", - "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"quoteToken\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionMarketFrom\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionMarketTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"name\":\"RolledOptionLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionFrom\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"RolledOptions\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newFactory\",\"type\":\"address\"}],\"name\":\"UpdatedFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newQuote\",\"type\":\"address\"}],\"name\":\"UpdatedQuoteToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRegistry\",\"type\":\"address\"}],\"name\":\"UpdatedRegistry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"UpdatedRouter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTrader\",\"type\":\"address\"}],\"name\":\"UpdatedTrader\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityQuoteTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuantityQuoteTokens\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityWithUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"deployUniswapMarket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"flashLoanQuantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"flashloanMintShortOptionsThenSwap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxDeadline\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"getUniswapMarketForOption\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"getUniswapMarketForSeries\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"quoteToken_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintShortOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"}],\"name\":\"openFlashShort\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quoteToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityThenCloseOptions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rollFromOption\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rollToOption\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rollQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"rollOption\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rollFromOption\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rollToOption\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"rollOptionLiquidity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router02\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"}],\"name\":\"setFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"quoteToken_\",\"type\":\"address\"}],\"name\":\"setQuoteToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"}],\"name\":\"setTrader\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trader\",\"outputs\":[{\"internalType\":\"contract ITrader\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV2Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Adds liquidity to an option<>quote token pair by minting optionTokens with underlyingTokens.\",\"params\":{\"deadline\":\"The timestamp to expire a pending transaction.\",\"minQuantityOptions\":\"The minimum quantity of optionTokens expected to provide liquidity with.\",\"minQuantityQuoteTokens\":\"The minimum quantity of quoteTokens expected to provide liquidity with.\",\"optionAddress\":\"The address of the optionToken to mint then provide liquidity for.\",\"quantityOptions\":\"The quantity of underlyingTokens to use to mint optionTokens.\",\"quantityQuoteTokens\":\"The quantity of quoteTokens to add with optionTokens to the Uniswap V2 Pair.\",\"to\":\"The address that receives UNI-V2 shares.\"}},\"deployUniswapMarket(address)\":{\"details\":\"Creats a Uniswap pair for option<>quote tokens.\",\"params\":{\"optionAddress\":\"The address of the option to deploy a Uniswap V2 Pair for with the quoteToken.\"}},\"flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference.\",\"params\":{\"amountOutMin\":\"The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"flashLoanQuantity\":\"The quantity of options to mint.\",\"optionToken\":\"The address of the Option contract.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\",\"to\":\"The address to send the redeemToken proceeds and optionTokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not.\"}},\"getMaxDeadline()\":{\"details\":\"The maxmium deadline available for each trade.\"},\"getUniswapMarketForOption(address)\":{\"details\":\"Gets a Uniswap Pair address for an option token and quote token.\",\"params\":{\"optionAddress\":\"The address of the option to get a Uniswap V2 Pair address for (with quoteToken).\"}},\"getUniswapMarketForSeries(address,address,uint256,uint256,uint256)\":{\"details\":\"Gets a Uniswap Pair address for the corresponding option parameters.\"},\"mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints options using underlyingTokens provided by user, then swaps on Uniswap V2. Combines Primitive \\\"mintOptions\\\" function with Uniswap V2 Router \\\"swapExactTokensForTokens\\\" function.\",\"params\":{\"amountIn\":\"The quantity of options to mint and then sell.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the optionTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Oracle-less Primitive option.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\",\"to\":\"The address to send the optionToken proceeds and redeem tokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not.\"}},\"mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens.\",\"params\":{\"amountIn\":\"The quantity of options to mint.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the redeemTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Option contract.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\",\"to\":\"The address to send the redeemToken proceeds and optionTokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines Uniswap V2 Router \\\"removeLiquidity\\\" function with Primitive \\\"closeOptions\\\" function.\",\"params\":{\"amountAMin\":\"The minimum quantity of optionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction.\",\"liquidity\":\"The quantity of liquidity tokens to pull from msg.sender and burn.\",\"optionAddress\":\"The address of the option that will be closed from burned UNI-V2 liquidity shares.\",\"to\":\"The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"rollOption(address,address,uint256,address)\":{\"details\":\"Closes an option position and opens a new one using the freed underlyingTokens.\",\"params\":{\"receiver\":\"The address that receives newly minted option and redeem tokens.\",\"rollFromOption\":\"The optionToken to close.\",\"rollQuantity\":\"The quantity of underlyingTokens to receive from closed options then use to mint new options.\",\"rollToOption\":\"The optionToken to mint.\"}},\"rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines \\\"removeLiquidityThenCloseOptions\\\" function with \\\"addLiquidityWithUnderlying\\\" fuction.\",\"params\":{\"amountAMin\":\"The minimum quantity of optionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction.\",\"liquidity\":\"The quantity of UNI-V2 shares to roll from the first Uniswap pool.\",\"rollFromOption\":\"The optionToken address to close a UNI-V2 position.\",\"rollToOption\":\"The optionToken address to open a UNI-V2 position.\",\"to\":\"The address that receives the UNI-V2 shares that have been rolled.\"}},\"setFactory(address)\":{\"details\":\"Sets the Uniswap V2 Factory address to use.\"},\"setQuoteToken(address)\":{\"details\":\"Sets the designated stablecoin to use (paired token in Uniswap pools).\"},\"setRegistry(address)\":{\"details\":\"Sets the Primitive V1 Registry address to use.\"},\"setRouter(address)\":{\"details\":\"Sets the Uniswap V2 Router address to use.\"},\"setTrader(address)\":{\"details\":\"Sets the Primitive V1 Trader address to use.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{\"addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \\\"to\\\" address. underlyingToken -> optionToken -> UNI-V2.\"},\"flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the redeemToken address, the tx will fail. underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\"},\"mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken.\"},\"mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the redeemToken address, the tx will fail. underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\"},\"removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender. Then closes the optionTokens and withdraws underlyingTokens to the \\\"to\\\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \\\"to\\\" address. UNI-V2 -> optionToken -> underlyingToken.\"},\"rollOption(address,address,uint256,address)\":{\"notice\":\"Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver. rollFromOption -> underlyingToken -> rollToOption.\"},\"rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair. UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/Uniswap/UniswapConnector.sol\":\"UniswapConnector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\":{\"keccak256\":\"0xdb17a1fb73e261e736ae8862be2d9a32964fc4b3741f48980f5cdc9d92b99a96\",\"urls\":[\"bzz-raw://468dab23a95d9d9b7d6ce74008d45eef3de2f137ede604e6be6c5e7d0121c5e9\",\"dweb:/ipfs/QmcXwjTfp6tCRgf1KsNQyUAtrqKhiaN6fbaHVGr22eficP\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\":{\"keccak256\":\"0xe5905c0989cf5a865ed9bb7b9252536ca011c5b744017a82a7d4443b9c00a891\",\"urls\":[\"bzz-raw://5d2a90a0a796491507462a3da18c3f8819721d571572d765a2207c35bf0a0389\",\"dweb:/ipfs/Qmf9ACYiT3qzjgsYuhm866FBdiBpRMXAPpQhSFbgqcyhHt\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\",\"urls\":[\"bzz-raw://85d5ad2dd23ee127f40907a12865a1e8cb5828814f6f2480285e1827dd72dedf\",\"dweb:/ipfs/QmayKQWJgWmr46DqWseADyUanmqxh662hPNdAkdHRjiQQH\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\":{\"keccak256\":\"0x8a3c5c449d4b7cd76513ed6995f4b86e4a86f222c770f8442f5fc128ce29b4d2\",\"urls\":[\"bzz-raw://1df63ca373dafae3bd0ee7fe70f890a1dc7c45ed869c01de68413e0e97ff9deb\",\"dweb:/ipfs/QmefJgEYGUL8KX7kQKYTrDweF8GB7yjy3nw5Bmqzryg7PG\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\":{\"keccak256\":\"0x744e30c133bd0f7ca9e7163433cf6d72f45c6bb1508c2c9c02f1a6db796ae59d\",\"urls\":[\"bzz-raw://9bf2f4454ad63d4cff03a0630e787d9e8a9deed80aec89682cd8ad6379d9ef8c\",\"dweb:/ipfs/Qme51hQNR2wpax7ooUadhtqLtXm8ffeVVYyubLkTT4wMCG\"]},\"contracts/connectors/Uniswap/UniswapConnector.sol\":{\"keccak256\":\"0x2b39d70b82cc6ea285d1cde55cc1ec3c810e3007569c292311ddb8d2e5e1d558\",\"urls\":[\"bzz-raw://f2db8f18b3ba7df3c33a4bd9c63af64e5f90a5bef8f2c37c28926d1870aec0f1\",\"dweb:/ipfs/QmWFtH33ZMqybrrgkmDoRGDAaU7x9by28nQSTpme8c6q8c\"]},\"contracts/connectors/WETH/IWethConnector.sol\":{\"keccak256\":\"0x59b34612bacc0cbaf89c320bd3bd3fd7111c4c173a3001a2d16ce194639dead2\",\"urls\":[\"bzz-raw://454a27a471fb727b18fdb5485baa8909ac6b7ed2f761241661f14a782779e79e\",\"dweb:/ipfs/QmRtmmum24bxuCSEs7dEtjUipEyiwpF59aiQX1hZRzdZm7\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IRegistry.sol\":{\"keccak256\":\"0x02aeb84e8b748674bc31707899158885066923f203e7a3a58cee3c68a49ec96f\",\"urls\":[\"bzz-raw://78dd4aa316f8b50ed595437e8a1ec1e519384c89bd605b9aa9194f3b98543a43\",\"dweb:/ipfs/QmXvrc8JwQCkFHBTwoGjV7xCUcNN8Ed15QES9tKWsjuUAz\"]},\"contracts/option/interfaces/ITrader.sol\":{\"keccak256\":\"0xb8f9e6d923e556e137a606c76e9adf8fd07375c7ff0650f4a7932adc950df44f\",\"urls\":[\"bzz-raw://ef82aa3d081c12e307f45334cffd8916a27c5c7db62c2b44ce9663633a8c385b\",\"dweb:/ipfs/QmQLsKZomP19HAAXKpLshhXiZhrusbf9yoZhy8tJDffVvS\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b61580f80620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638ac32329116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610dae578063f2fde38b14610df8578063f441e35014610e3c578063f887ea4014610ee2576101c4565b8063acc7943814610c79578063ad5c464814610d20578063c0d7865514610d6a576101c4565b806395f0ae76116100d357806395f0ae7614610995578063a6bc18f914610ac3578063a91ee0dc14610b07578063aa08e4b614610b4b576101c4565b80638ac32329146107d95780638d2a1cf11461089d5780638da5cb5b1461094b576101c4565b806351b8498f116101665780636bd64c3a116101405780636bd64c3a146106e35780636d4542bd14610701578063715018a6146107855780637b1039991461078f576101c4565b806351b8498f146105595780635bb478081461061b5780636af255d71461065f576101c4565b80631cfb886d116101a25780631cfb886d14610384578063217a4b70146103c85780632ea4fbb41461041257806338bd2aaa14610501576101c4565b806310d1e85c146101c95780631459457a146102765780631758078b1461033a575b600080fd5b610274600480360360808110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184600183028401116401000000008311171561026457600080fd5b9091929391929390505050610f2c565b005b610338600480360360a081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611021565b005b610342611664565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c66004803603602081101561039a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168a565b005b6103d06117f1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e7600480360360c081101561042857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611817565b604051808215151515815260200191505060405180910390f35b6105576004803603606081101561051757600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ae565b005b6105d9600480360360a081101561056f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611d2a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61065d6004803603602081101561063157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f0d565b005b6106a16004803603602081101561067557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612074565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb6121b4565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121c5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078d6123a6565b005b61079761252e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610883600480360360e08110156107ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612554565b604051808215151515815260200191505060405180910390f35b610931600480360360e08110156108b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061267e565b604051808215151515815260200191505060405180910390f35b610953612bca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aa9600480360360c08110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109fc57600080fd5b820183602082011115610a0e57600080fd5b80359060200191846020830284011164010000000083111715610a3057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612bf3565b604051808215151515815260200191505060405180910390f35b610b0560048036036020811015610ad957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d4e565b005b610b4960048036036020811015610b1d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612eb5565b005b610c5f600480360360c0811015610b6157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610bb257600080fd5b820183602082011115610bc457600080fd5b80359060200191846020830284011164010000000083111715610be657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061301c565b604051808215151515815260200191505060405180910390f35b610d03600480360360c0811015610c8f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613485565b604051808381526020018281526020019250505060405180910390f35b610d28613db0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dac60048036036020811015610d8057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613dc8565b005b610db6613f2f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e3a60048036036020811015610e0e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613f55565b005b610ec860048036036080811015610e5257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614162565b604051808215151515815260200191505060405180910390f35b610eea61448d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610f9b576040519150601f19603f3d011682016040523d82523d6000602084013e610fa0565b606091505b509150915081611018576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f5345435552455f4c4f414e5f43414c4c5f4641494c0000000000000081525060200191505060405180910390fd5b50505050505050565b6110296144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611272576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611336576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116926144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611753576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006118278a8a306144bb565b91509150600061187c8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6146bb565b915050806118f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61199d86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561193d57600080fd5b505afa158015611951573d6000803e3d6000fd5b505050506040513d602081101561196757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f657600080fd5b505afa158015611a0a573d6000803e3d6000fd5b505050506040513d6020811015611a2057600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7b57600080fd5b505afa158015611a8f573d6000803e3d6000fd5b505050506040513d6020811015611aa557600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611baf57600080fd5b505afa158015611bc3573d6000803e3d6000fd5b505050506040513d6020811015611bd957600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611c1e5781602001602082028038833980820191505090505b5090508381600081518110611c2f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611c9957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611ce157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611e1857600080fd5b505afa158015611e2c573d6000803e3d6000fd5b505050506040513d6020811015611e4257600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ef8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b611f01816121c5565b91505095945050505050565b611f156144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561216e57600080fd5b505af1158015612182573d6000803e3d6000fd5b505050506040513d602081101561219857600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156122bd57600080fd5b505afa1580156122d1573d6000803e3d6000fd5b505050506040513d60208110156122e757600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561239d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6123ae6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461246f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006125678a8989898989613485565b91509150600061257c8a84848b8b8b8b61267e565b9050806125f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612701576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061279633308a8473ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000806127a48c8c306144bb565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561284f57600080fd5b505af1158015612863573d6000803e3d6000fd5b505050506040513d602081101561287957600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561293257600080fd5b505af1158015612946573d6000803e3d6000fd5b505050506040513d602081101561295c57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612a9f57600080fd5b505af1158015612ab3573d6000803e3d6000fd5b505050506040513d6060811015612ac957600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612b9c33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3c57600080fd5b505afa158015612b50573d6000803e3d6000fd5b505050506040513d6020811015612b6657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612c038989306144bb565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c4f57600080fd5b505afa158015612c63573d6000803e3d6000fd5b505050506040513d6020811015612c7957600080fd5b810190808051906020019092919050505090506000612c9c82848b8b8b8b6146bb565b91505080612d12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612d3d87858d73ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b809450505050509695505050505050565b612d566144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612e17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b612ebd6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612f7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b6000808611613093576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156130db57600080fd5b505afa1580156130ef573d6000803e3d6000fd5b505050506040513d602081101561310557600080fd5b8101908080519060200190929190505050905061314388888373ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156131c457600080fd5b505af11580156131d8573d6000803e3d6000fd5b505050506040513d60408110156131ee57600080fd5b810190808051906020019092919080519060200190929190505050915091508273ffffffffffffffffffffffffffffffffffffffff168760028151811061323157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146132c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b606060006133548c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330f57600080fd5b505afa158015613323573d6000803e3d6000fd5b505050506040513d602081101561333957600080fd5b8101908080519060200190929190505050848c8c338c6146bb565b91509150806133cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000826001815181106133da57fe5b60200260200101518c116133ef576000613417565b613416836001815181106133ff57fe5b60200260200101518d614bea90919063ffffffff16565b5b90506134468933838973ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b61347189868f73ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b505050600193505050509695505050505050565b600080600060149054906101000a900460ff1661350a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000899050600061355b8b6121c5565b905061358a33308c8473ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561365357600080fd5b505af1158015613667573d6000803e3d6000fd5b505050506040513d602081101561367d57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156137bb57600080fd5b505af11580156137cf573d6000803e3d6000fd5b505050506040513d60408110156137e557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138d257600080fd5b505af11580156138e6573d6000803e3d6000fd5b505050506040513d60208110156138fc57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561395457600080fd5b505afa158015613968573d6000803e3d6000fd5b505050506040513d602081101561397e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a3557600080fd5b505af1158015613a49573d6000803e3d6000fd5b505050506040513d6020811015613a5f57600080fd5b8101908080519060200190929190505050506000613b978573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613abc57600080fd5b505afa158015613ad0573d6000803e3d6000fd5b505050506040513d6020811015613ae657600080fd5b8101908080519060200190929190505050613b898773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b3f57600080fd5b505afa158015613b53573d6000803e3d6000fd5b505050506040513d6020811015613b6957600080fd5b810190808051906020019092919050505087614c3490919063ffffffff16565b614cba90919063ffffffff16565b9050613c463330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613be557600080fd5b505afa158015613bf9573d6000803e3d6000fd5b505050506040513d6020811015613c0f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613d0257600080fd5b505af1158015613d16573d6000803e3d6000fd5b505050506040513d6060811015613d2c57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050613d7f89838773ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b613dd06144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613e91576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b613f5d6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461401e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156140a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806157696026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614170868530614d04565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156141e157600080fd5b505afa1580156141f5573d6000803e3d6000fd5b505050506040513d602081101561420b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156142c257600080fd5b505af11580156142d6573d6000803e3d6000fd5b505050506040513d60208110156142ec57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156143ba57600080fd5b505af11580156143ce573d6000803e3d6000fd5b505050506040513d60408110156143e457600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b60008060008411614534576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6145e13386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561458057600080fd5b505afa158015614594573d6000803e3d6000fd5b505050506040513d60208110156145aa57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561466257600080fd5b505af1158015614676573d6000803e3d6000fd5b505050506040513d604081101561468c57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106146e357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614774576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561484257600080fd5b505af1158015614856573d6000803e3d6000fd5b505050506040513d602081101561486c57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561493557808201518184015260208101905061491a565b505050509050019650505050505050600060405180830381600087803b15801561495e57600080fd5b505af1158015614972573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561499c57600080fd5b81019080805160405193929190846401000000008211156149bc57600080fd5b838201915060208201858111156149d257600080fd5b82518660208202830111640100000000821117156149ef57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614a26578082015181840152602081019050614a0b565b5050505090500160405250505092506001915050965096945050505050565b614af88363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061534c565b505050565b614be4846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061534c565b50505050565b6000614c2c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615597565b905092915050565b600080831415614c475760009050614cb4565b6000828402905082848281614c5857fe5b0414614caf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061578f6021913960400191505060405180910390fd5b809150505b92915050565b6000614cfc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615657565b905092915050565b6000806000808511614d7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614dfc57600080fd5b505afa158015614e10573d6000803e3d6000fd5b505050506040513d6020811015614e2657600080fd5b81019080805190602001909291905050501015614eab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000614fd18773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015614ef657600080fd5b505afa158015614f0a573d6000803e3d6000fd5b505050506040513d6020811015614f2057600080fd5b8101908080519060200190929190505050614fc38973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f7957600080fd5b505afa158015614f8d573d6000803e3d6000fd5b505050506040513d6020811015614fa357600080fd5b810190808051906020019092919050505089614c3490919063ffffffff16565b614cba90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561501a57600080fd5b505afa15801561502e573d6000803e3d6000fd5b505050506040513d602081101561504457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156150d157600080fd5b505afa1580156150e5573d6000803e3d6000fd5b505050506040513d60208110156150fb57600080fd5b81019080805190602001909291905050501015615180576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61522d3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156151cc57600080fd5b505afa1580156151e0573d6000803e3d6000fd5b505050506040513d60208110156151f657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b61525a3388888a73ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156152dc57600080fd5b505af11580156152f0573d6000803e3d6000fd5b505050506040513d606081101561530657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b61536b8273ffffffffffffffffffffffffffffffffffffffff1661571d565b6153dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061542c5780518252602082019150602081019050602083039250615409565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461548e576040519150601f19603f3d011682016040523d82523d6000602084013e615493565b606091505b50915091508161550b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156155915780806020019051602081101561552a57600080fd5b8101908080519060200190929190505050615590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806157b0602a913960400191505060405180910390fd5b5b50505050565b6000838311158290615644576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156156095780820151818401526020810190506155ee565b50505050905090810190601f1680156156365780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290615703576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156156c85780820151818401526020810190506156ad565b50505050905090810190601f1680156156f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161570f57fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561575f57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220c281387a18b9cadbfb4c7dc289d6c36d99e4e0cad4e5a565e630d1362bd1beda64736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638ac32329116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610dae578063f2fde38b14610df8578063f441e35014610e3c578063f887ea4014610ee2576101c4565b8063acc7943814610c79578063ad5c464814610d20578063c0d7865514610d6a576101c4565b806395f0ae76116100d357806395f0ae7614610995578063a6bc18f914610ac3578063a91ee0dc14610b07578063aa08e4b614610b4b576101c4565b80638ac32329146107d95780638d2a1cf11461089d5780638da5cb5b1461094b576101c4565b806351b8498f116101665780636bd64c3a116101405780636bd64c3a146106e35780636d4542bd14610701578063715018a6146107855780637b1039991461078f576101c4565b806351b8498f146105595780635bb478081461061b5780636af255d71461065f576101c4565b80631cfb886d116101a25780631cfb886d14610384578063217a4b70146103c85780632ea4fbb41461041257806338bd2aaa14610501576101c4565b806310d1e85c146101c95780631459457a146102765780631758078b1461033a575b600080fd5b610274600480360360808110156101df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561023057600080fd5b82018360208201111561024257600080fd5b8035906020019184600183028401116401000000008311171561026457600080fd5b9091929391929390505050610f2c565b005b610338600480360360a081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611021565b005b610342611664565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103c66004803603602081101561039a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168a565b005b6103d06117f1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e7600480360360c081101561042857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611817565b604051808215151515815260200191505060405180910390f35b6105576004803603606081101561051757600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ae565b005b6105d9600480360360a081101561056f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611d2a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61065d6004803603602081101561063157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f0d565b005b6106a16004803603602081101561067557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612074565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb6121b4565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121c5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61078d6123a6565b005b61079761252e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610883600480360360e08110156107ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612554565b604051808215151515815260200191505060405180910390f35b610931600480360360e08110156108b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061267e565b604051808215151515815260200191505060405180910390f35b610953612bca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aa9600480360360c08110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109fc57600080fd5b820183602082011115610a0e57600080fd5b80359060200191846020830284011164010000000083111715610a3057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612bf3565b604051808215151515815260200191505060405180910390f35b610b0560048036036020811015610ad957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d4e565b005b610b4960048036036020811015610b1d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612eb5565b005b610c5f600480360360c0811015610b6157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610bb257600080fd5b820183602082011115610bc457600080fd5b80359060200191846020830284011164010000000083111715610be657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061301c565b604051808215151515815260200191505060405180910390f35b610d03600480360360c0811015610c8f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613485565b604051808381526020018281526020019250505060405180910390f35b610d28613db0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dac60048036036020811015610d8057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613dc8565b005b610db6613f2f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e3a60048036036020811015610e0e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613f55565b005b610ec860048036036080811015610e5257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614162565b604051808215151515815260200191505060405180910390f35b610eea61448d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610f9b576040519150601f19603f3d011682016040523d82523d6000602084013e610fa0565b606091505b509150915081611018576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f5345435552455f4c4f414e5f43414c4c5f4641494c0000000000000081525060200191505060405180910390fd5b50505050505050565b6110296144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611272576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611336576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116926144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611753576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006118278a8a306144bb565b91509150600061187c8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6146bb565b915050806118f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61199d86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561193d57600080fd5b505afa158015611951573d6000803e3d6000fd5b505050506040513d602081101561196757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f657600080fd5b505afa158015611a0a573d6000803e3d6000fd5b505050506040513d6020811015611a2057600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7b57600080fd5b505afa158015611a8f573d6000803e3d6000fd5b505050506040513d6020811015611aa557600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611baf57600080fd5b505afa158015611bc3573d6000803e3d6000fd5b505050506040513d6020811015611bd957600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611c1e5781602001602082028038833980820191505090505b5090508381600081518110611c2f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611c9957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611ce157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611e1857600080fd5b505afa158015611e2c573d6000803e3d6000fd5b505050506040513d6020811015611e4257600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ef8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b611f01816121c5565b91505095945050505050565b611f156144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561216e57600080fd5b505af1158015612182573d6000803e3d6000fd5b505050506040513d602081101561219857600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156122bd57600080fd5b505afa1580156122d1573d6000803e3d6000fd5b505050506040513d60208110156122e757600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561239d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6123ae6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461246f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006125678a8989898989613485565b91509150600061257c8a84848b8b8b8b61267e565b9050806125f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612701576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061279633308a8473ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000806127a48c8c306144bb565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561284f57600080fd5b505af1158015612863573d6000803e3d6000fd5b505050506040513d602081101561287957600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561293257600080fd5b505af1158015612946573d6000803e3d6000fd5b505050506040513d602081101561295c57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612a9f57600080fd5b505af1158015612ab3573d6000803e3d6000fd5b505050506040513d6060811015612ac957600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612b9c33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3c57600080fd5b505afa158015612b50573d6000803e3d6000fd5b505050506040513d6020811015612b6657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612c038989306144bb565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c4f57600080fd5b505afa158015612c63573d6000803e3d6000fd5b505050506040513d6020811015612c7957600080fd5b810190808051906020019092919050505090506000612c9c82848b8b8b8b6146bb565b91505080612d12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612d3d87858d73ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b809450505050509695505050505050565b612d566144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612e17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b612ebd6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612f7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b6000808611613093576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156130db57600080fd5b505afa1580156130ef573d6000803e3d6000fd5b505050506040513d602081101561310557600080fd5b8101908080519060200190929190505050905061314388888373ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156131c457600080fd5b505af11580156131d8573d6000803e3d6000fd5b505050506040513d60408110156131ee57600080fd5b810190808051906020019092919080519060200190929190505050915091508273ffffffffffffffffffffffffffffffffffffffff168760028151811061323157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146132c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b606060006133548c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330f57600080fd5b505afa158015613323573d6000803e3d6000fd5b505050506040513d602081101561333957600080fd5b8101908080519060200190929190505050848c8c338c6146bb565b91509150806133cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000826001815181106133da57fe5b60200260200101518c116133ef576000613417565b613416836001815181106133ff57fe5b60200260200101518d614bea90919063ffffffff16565b5b90506134468933838973ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b61347189868f73ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b505050600193505050509695505050505050565b600080600060149054906101000a900460ff1661350a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000899050600061355b8b6121c5565b905061358a33308c8473ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561365357600080fd5b505af1158015613667573d6000803e3d6000fd5b505050506040513d602081101561367d57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156137bb57600080fd5b505af11580156137cf573d6000803e3d6000fd5b505050506040513d60408110156137e557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138d257600080fd5b505af11580156138e6573d6000803e3d6000fd5b505050506040513d60208110156138fc57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561395457600080fd5b505afa158015613968573d6000803e3d6000fd5b505050506040513d602081101561397e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a3557600080fd5b505af1158015613a49573d6000803e3d6000fd5b505050506040513d6020811015613a5f57600080fd5b8101908080519060200190929190505050506000613b978573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613abc57600080fd5b505afa158015613ad0573d6000803e3d6000fd5b505050506040513d6020811015613ae657600080fd5b8101908080519060200190929190505050613b898773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b3f57600080fd5b505afa158015613b53573d6000803e3d6000fd5b505050506040513d6020811015613b6957600080fd5b810190808051906020019092919050505087614c3490919063ffffffff16565b614cba90919063ffffffff16565b9050613c463330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613be557600080fd5b505afa158015613bf9573d6000803e3d6000fd5b505050506040513d6020811015613c0f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613d0257600080fd5b505af1158015613d16573d6000803e3d6000fd5b505050506040513d6060811015613d2c57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050613d7f89838773ffffffffffffffffffffffffffffffffffffffff16614a459092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b613dd06144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613e91576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b613f5d6144b3565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461401e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156140a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806157696026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614170868530614d04565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156141e157600080fd5b505afa1580156141f5573d6000803e3d6000fd5b505050506040513d602081101561420b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156142c257600080fd5b505af11580156142d6573d6000803e3d6000fd5b505050506040513d60208110156142ec57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156143ba57600080fd5b505af11580156143ce573d6000803e3d6000fd5b505050506040513d60408110156143e457600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b60008060008411614534576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6145e13386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561458057600080fd5b505afa158015614594573d6000803e3d6000fd5b505050506040513d60208110156145aa57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561466257600080fd5b505af1158015614676573d6000803e3d6000fd5b505050506040513d604081101561468c57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106146e357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614774576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561484257600080fd5b505af1158015614856573d6000803e3d6000fd5b505050506040513d602081101561486c57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561493557808201518184015260208101905061491a565b505050509050019650505050505050600060405180830381600087803b15801561495e57600080fd5b505af1158015614972573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561499c57600080fd5b81019080805160405193929190846401000000008211156149bc57600080fd5b838201915060208201858111156149d257600080fd5b82518660208202830111640100000000821117156149ef57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614a26578082015181840152602081019050614a0b565b5050505090500160405250505092506001915050965096945050505050565b614af88363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061534c565b505050565b614be4846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061534c565b50505050565b6000614c2c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615597565b905092915050565b600080831415614c475760009050614cb4565b6000828402905082848281614c5857fe5b0414614caf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061578f6021913960400191505060405180910390fd5b809150505b92915050565b6000614cfc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615657565b905092915050565b6000806000808511614d7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015614dfc57600080fd5b505afa158015614e10573d6000803e3d6000fd5b505050506040513d6020811015614e2657600080fd5b81019080805190602001909291905050501015614eab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000614fd18773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015614ef657600080fd5b505afa158015614f0a573d6000803e3d6000fd5b505050506040513d6020811015614f2057600080fd5b8101908080519060200190929190505050614fc38973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f7957600080fd5b505afa158015614f8d573d6000803e3d6000fd5b505050506040513d6020811015614fa357600080fd5b810190808051906020019092919050505089614c3490919063ffffffff16565b614cba90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561501a57600080fd5b505afa15801561502e573d6000803e3d6000fd5b505050506040513d602081101561504457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156150d157600080fd5b505afa1580156150e5573d6000803e3d6000fd5b505050506040513d60208110156150fb57600080fd5b81019080805190602001909291905050501015615180576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61522d3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156151cc57600080fd5b505afa1580156151e0573d6000803e3d6000fd5b505050506040513d60208110156151f657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b61525a3388888a73ffffffffffffffffffffffffffffffffffffffff16614afd909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156152dc57600080fd5b505af11580156152f0573d6000803e3d6000fd5b505050506040513d606081101561530657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b61536b8273ffffffffffffffffffffffffffffffffffffffff1661571d565b6153dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061542c5780518252602082019150602081019050602083039250615409565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461548e576040519150601f19603f3d011682016040523d82523d6000602084013e615493565b606091505b50915091508161550b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156155915780806020019051602081101561552a57600080fd5b8101908080519060200190929190505050615590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806157b0602a913960400191505060405180910390fd5b5b50505050565b6000838311158290615644576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156156095780820151818401526020810190506155ee565b50505050905090810190601f1680156156365780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290615703576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156156c85780820151818401526020810190506156ad565b50505050905090810190601f1680156156f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161570f57fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561575f57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220c281387a18b9cadbfb4c7dc289d6c36d99e4e0cad4e5a565e630d1362bd1beda64736f6c63430006020033", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"FlashedShortOption\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"quoteToken\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionMarketFrom\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionMarketTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"name\":\"RolledOptionLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionFrom\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionTo\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"RolledOptions\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newFactory\",\"type\":\"address\"}],\"name\":\"UpdatedFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newQuote\",\"type\":\"address\"}],\"name\":\"UpdatedQuoteToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRegistry\",\"type\":\"address\"}],\"name\":\"UpdatedRegistry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"UpdatedRouter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTrader\",\"type\":\"address\"}],\"name\":\"UpdatedTrader\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityQuoteTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minQuantityQuoteTokens\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityWithUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"deployUniswapMarket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pairAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"flashLoanQuantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"flashloanMintShortOptionsThenSwap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxDeadline\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"getUniswapMarketForOption\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"getUniswapMarketForSeries\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"quoteToken_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"}],\"name\":\"openFlashShort\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quoteToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityThenCloseOptions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rollFromOption\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rollToOption\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rollQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"rollOption\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rollFromOption\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rollToOption\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"rollOptionLiquidity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router02\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"}],\"name\":\"setFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"quoteToken_\",\"type\":\"address\"}],\"name\":\"setQuoteToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"}],\"name\":\"setTrader\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trader\",\"outputs\":[{\"internalType\":\"contract ITrader\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV2Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Adds liquidity to an option<>quote token pair by minting optionTokens with underlyingTokens.\",\"params\":{\"deadline\":\"The timestamp to expire a pending transaction.\",\"minQuantityOptions\":\"The minimum quantity of optionTokens expected to provide liquidity with.\",\"minQuantityQuoteTokens\":\"The minimum quantity of quoteTokens expected to provide liquidity with.\",\"optionAddress\":\"The address of the optionToken to mint then provide liquidity for.\",\"quantityOptions\":\"The quantity of underlyingTokens to use to mint optionTokens.\",\"quantityQuoteTokens\":\"The quantity of quoteTokens to add with optionTokens to the Uniswap V2 Pair.\",\"to\":\"The address that receives UNI-V2 shares.\"}},\"deployUniswapMarket(address)\":{\"details\":\"Creats a Uniswap pair for option<>quote tokens.\",\"params\":{\"optionAddress\":\"The address of the option to deploy a Uniswap V2 Pair for with the quoteToken.\"}},\"flashloanMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference.\",\"params\":{\"amountOutMin\":\"The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"flashLoanQuantity\":\"The quantity of options to mint.\",\"optionAddress\":\"The address of the Option contract.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\",\"to\":\"The address to send the redeemToken proceeds and optionTokens to.\"},\"returns\":{\"success\":\"bool Whether the transaction was successful or not.\"}},\"getMaxDeadline()\":{\"details\":\"The maxmium deadline available for each trade.\"},\"getUniswapMarketForOption(address)\":{\"details\":\"Gets a Uniswap Pair address for an option token and quote token.\",\"params\":{\"optionAddress\":\"The address of the option to get a Uniswap V2 Pair address for (with quoteToken).\"}},\"getUniswapMarketForSeries(address,address,uint256,uint256,uint256)\":{\"details\":\"Gets a Uniswap Pair address for the corresponding option parameters.\"},\"mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints options using underlyingTokens provided by user, then swaps on Uniswap V2. Combines Primitive \\\"mintOptions\\\" function with Uniswap V2 Router \\\"swapExactTokensForTokens\\\" function.\",\"params\":{\"amountIn\":\"The quantity of options to mint and then sell.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the optionTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Oracle-less Primitive option.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\",\"to\":\"The address to send the optionToken proceeds and redeem tokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines Uniswap V2 Router \\\"removeLiquidity\\\" function with Primitive \\\"closeOptions\\\" function.\",\"params\":{\"amountAMin\":\"The minimum quantity of optionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction.\",\"liquidity\":\"The quantity of liquidity tokens to pull from msg.sender and burn.\",\"optionAddress\":\"The address of the option that will be closed from burned UNI-V2 liquidity shares.\",\"to\":\"The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"rollOption(address,address,uint256,address)\":{\"details\":\"Closes an option position and opens a new one using the freed underlyingTokens.\",\"params\":{\"receiver\":\"The address that receives newly minted option and redeem tokens.\",\"rollFromOption\":\"The optionToken to close.\",\"rollQuantity\":\"The quantity of underlyingTokens to receive from closed options then use to mint new options.\",\"rollToOption\":\"The optionToken to mint.\"}},\"rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines \\\"removeLiquidityThenCloseOptions\\\" function with \\\"addLiquidityWithUnderlying\\\" fuction.\",\"params\":{\"amountAMin\":\"The minimum quantity of optionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction.\",\"liquidity\":\"The quantity of UNI-V2 shares to roll from the first Uniswap pool.\",\"rollFromOption\":\"The optionToken address to close a UNI-V2 position.\",\"rollToOption\":\"The optionToken address to open a UNI-V2 position.\",\"to\":\"The address that receives the UNI-V2 shares that have been rolled.\"}},\"setFactory(address)\":{\"details\":\"Sets the Uniswap V2 Factory address to use.\"},\"setQuoteToken(address)\":{\"details\":\"Sets the designated stablecoin to use (paired token in Uniswap pools).\"},\"setRegistry(address)\":{\"details\":\"Sets the Primitive V1 Registry address to use.\"},\"setRouter(address)\":{\"details\":\"Sets the Uniswap V2 Router address to use.\"},\"setTrader(address)\":{\"details\":\"Sets the Primitive V1 Trader address to use.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{\"addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \\\"to\\\" address. underlyingToken -> optionToken -> UNI-V2.\"},\"flashloanMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the redeemToken address, the tx will fail. underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\"},\"mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken.\"},\"removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender. Then closes the optionTokens and withdraws underlyingTokens to the \\\"to\\\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \\\"to\\\" address. UNI-V2 -> optionToken -> underlyingToken.\"},\"rollOption(address,address,uint256,address)\":{\"notice\":\"Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver. rollFromOption -> underlyingToken -> rollToOption.\"},\"rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair. UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/Uniswap/UniswapConnector.sol\":\"UniswapConnector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@nomiclabs/buidler/console.sol\":{\"keccak256\":\"0x863a67996ca631927d3f3b889ee8a05caeccce16a32d05e83bb0c91f153643db\",\"urls\":[\"bzz-raw://39841ea1271a71ae087741c27ebd477254612527587fdd9872e12d28c4225cbf\",\"dweb:/ipfs/QmdcrXiPLBSfMcshFHwXU8iBYkSVTn4rSvUCiPnPD28Uhj\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\":{\"keccak256\":\"0xdb17a1fb73e261e736ae8862be2d9a32964fc4b3741f48980f5cdc9d92b99a96\",\"urls\":[\"bzz-raw://468dab23a95d9d9b7d6ce74008d45eef3de2f137ede604e6be6c5e7d0121c5e9\",\"dweb:/ipfs/QmcXwjTfp6tCRgf1KsNQyUAtrqKhiaN6fbaHVGr22eficP\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\":{\"keccak256\":\"0xe5905c0989cf5a865ed9bb7b9252536ca011c5b744017a82a7d4443b9c00a891\",\"urls\":[\"bzz-raw://5d2a90a0a796491507462a3da18c3f8819721d571572d765a2207c35bf0a0389\",\"dweb:/ipfs/Qmf9ACYiT3qzjgsYuhm866FBdiBpRMXAPpQhSFbgqcyhHt\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\",\"urls\":[\"bzz-raw://85d5ad2dd23ee127f40907a12865a1e8cb5828814f6f2480285e1827dd72dedf\",\"dweb:/ipfs/QmayKQWJgWmr46DqWseADyUanmqxh662hPNdAkdHRjiQQH\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\":{\"keccak256\":\"0x8a3c5c449d4b7cd76513ed6995f4b86e4a86f222c770f8442f5fc128ce29b4d2\",\"urls\":[\"bzz-raw://1df63ca373dafae3bd0ee7fe70f890a1dc7c45ed869c01de68413e0e97ff9deb\",\"dweb:/ipfs/QmefJgEYGUL8KX7kQKYTrDweF8GB7yjy3nw5Bmqzryg7PG\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\":{\"keccak256\":\"0x744e30c133bd0f7ca9e7163433cf6d72f45c6bb1508c2c9c02f1a6db796ae59d\",\"urls\":[\"bzz-raw://9bf2f4454ad63d4cff03a0630e787d9e8a9deed80aec89682cd8ad6379d9ef8c\",\"dweb:/ipfs/Qme51hQNR2wpax7ooUadhtqLtXm8ffeVVYyubLkTT4wMCG\"]},\"contracts/connectors/Uniswap/UniswapConnector.sol\":{\"keccak256\":\"0xd5d485d622904667f2428eabda727cfa5c374d35fd5929afe74bc2e4f673bd9f\",\"urls\":[\"bzz-raw://d1fedbe0632b1e6de9c9b8ecf962e7e1af4242edf03c7946c230f6fee9fe9095\",\"dweb:/ipfs/QmWTS3bsWGf348wTJsQ9Cuvts2MURNSfDghftyfYMdFey9\"]},\"contracts/connectors/WETH/IWethConnector.sol\":{\"keccak256\":\"0x59b34612bacc0cbaf89c320bd3bd3fd7111c4c173a3001a2d16ce194639dead2\",\"urls\":[\"bzz-raw://454a27a471fb727b18fdb5485baa8909ac6b7ed2f761241661f14a782779e79e\",\"dweb:/ipfs/QmRtmmum24bxuCSEs7dEtjUipEyiwpF59aiQX1hZRzdZm7\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IRegistry.sol\":{\"keccak256\":\"0x02aeb84e8b748674bc31707899158885066923f203e7a3a58cee3c68a49ec96f\",\"urls\":[\"bzz-raw://78dd4aa316f8b50ed595437e8a1ec1e519384c89bd605b9aa9194f3b98543a43\",\"dweb:/ipfs/QmXvrc8JwQCkFHBTwoGjV7xCUcNN8Ed15QES9tKWsjuUAz\"]},\"contracts/option/interfaces/ITrader.sol\":{\"keccak256\":\"0xb8f9e6d923e556e137a606c76e9adf8fd07375c7ff0650f4a7932adc950df44f\",\"urls\":[\"bzz-raw://ef82aa3d081c12e307f45334cffd8916a27c5c7db62c2b44ce9663633a8c385b\",\"dweb:/ipfs/QmQLsKZomP19HAAXKpLshhXiZhrusbf9yoZhy8tJDffVvS\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615f3980620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612070565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612253565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506123ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d06124fa565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061250b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107726126ec565b005b61077c612874565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061289a565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129c4565b604051808215151515815260200191505060405180910390f35b610938612f10565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612f39565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134c5565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061362c565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613793565b604051808381526020018281526020019250505060405180910390f35b610bff6140be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140d6565b005b610c8d61423d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614263565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614470565b604051808215151515815260200191505060405180910390f35b610dc161479b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f0000000000000000000000000000000000008152506147c1565b610ec3826148bf565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f4761495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b061495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a30614964565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614b64565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611acd57600080fd5b505afa158015611ae1573d6000803e3d6000fd5b505050506040513d6020811015611af757600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611b3c5781602001602082028038833980820191505090505b5090508381600081518110611b4d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611bb757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611bff57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615e7e605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611d5e578082015181840152602081019050611d43565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e8a576000611e8c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611eed57600080fd5b505afa158015611f01573d6000803e3d6000fd5b505050506040513d6020811015611f1757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f49578b611f4c565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611ffb578082015181840152602081019050611fe0565b50505050905090810190601f1680156120285780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561204a57600080fd5b505af115801561205e573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561215e57600080fd5b505afa158015612172573d6000803e3d6000fd5b505050506040513d602081101561218857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561223e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6122478161250b565b91505095945050505050565b61225b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461231c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156124b457600080fd5b505af11580156124c8573d6000803e3d6000fd5b505050506040513d60208110156124de57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561260357600080fd5b505afa158015612617573d6000803e3d6000fd5b505050506040513d602081101561262d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156126e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126f461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128ad8a8989898989613793565b9150915060006128c28a84848b8b8b8b6129c4565b905080612937576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612adc33308a8473ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b600080612aea8c8c30614964565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b9557600080fd5b505af1158015612ba9573d6000803e3d6000fd5b505050506040513d6020811015612bbf57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c7857600080fd5b505af1158015612c8c573d6000803e3d6000fd5b505050506040513d6020811015612ca257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612de557600080fd5b505af1158015612df9573d6000803e3d6000fd5b505050506040513d6060811015612e0f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612ee233828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e8257600080fd5b505afa158015612e96573d6000803e3d6000fd5b505050506040513d6020811015612eac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612fb0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612ff857600080fd5b505afa15801561300c573d6000803e3d6000fd5b505050506040513d602081101561302257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168560028151811061305957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146130ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61311588888373ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561319657600080fd5b505af11580156131aa573d6000803e3d6000fd5b505050506040513d60408110156131c057600080fd5b8101908080519060200190929190805190602001909291905050509150915061321d6040518060400160405280600e81526020017f6d696e746564206f7074696f6e730000000000000000000000000000000000008152506147c1565b600086905060008c9050600085905061326a6040518060400160405280600881526020017f7377617070696e670000000000000000000000000000000000000000000000008152506147c1565b606060006132fc8f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156132b757600080fd5b505afa1580156132cb573d6000803e3d6000fd5b505050506040513d60208110156132e157600080fd5b8101908080519060200190929190505050878f8f888f614b64565b9150915080985061330c896150d1565b8861337f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000808f905060008460028151811061339457fe5b602002602001015190506133fe816133f06103e86133e26133bf60038861516e90919063ffffffff16565b6133d46103e88961516e90919063ffffffff16565b6151f490919063ffffffff16565b61527c90919063ffffffff16565b6152c690919063ffffffff16565b9250505061340b81615310565b6134388686838773ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b50505050505061346986838c73ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a2505050979650505050505050565b6134cd61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461358e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138698b61250b565b905061389833308c8473ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396157600080fd5b505af1158015613975573d6000803e3d6000fd5b505050506040513d602081101561398b57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ac957600080fd5b505af1158015613add573d6000803e3d6000fd5b505050506040513d6040811015613af357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be057600080fd5b505af1158015613bf4573d6000803e3d6000fd5b505050506040513d6020811015613c0a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6257600080fd5b505afa158015613c76573d6000803e3d6000fd5b505050506040513d6020811015613c8c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4357600080fd5b505af1158015613d57573d6000803e3d6000fd5b505050506040513d6020811015613d6d57600080fd5b8101908080519060200190929190505050506000613ea58573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dca57600080fd5b505afa158015613dde573d6000803e3d6000fd5b505050506040513d6020811015613df457600080fd5b8101908080519060200190929190505050613e978773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4d57600080fd5b505afa158015613e61573d6000803e3d6000fd5b505050506040513d6020811015613e7757600080fd5b81019080805190602001909291905050508761516e90919063ffffffff16565b61527c90919063ffffffff16565b9050613f543330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ef357600080fd5b505afa158015613f07573d6000803e3d6000fd5b505050506040513d6020811015613f1d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401057600080fd5b505af1158015614024573d6000803e3d6000fd5b505050506040513d606081101561403a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061408d89838773ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140de61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461419f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61426b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461432c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143b2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615e376026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061447e8685306153a9565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144ef57600080fd5b505afa158015614503573d6000803e3d6000fd5b505050506040513d602081101561451957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d057600080fd5b505af11580156145e4573d6000803e3d6000fd5b505050506040513d60208110156145fa57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146c857600080fd5b505af11580156146dc573d6000803e3d6000fd5b505050506040513d60408110156146f257600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6148bc816040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156148085780820151818401526020810190506147ed565b50505050905090810190601f1680156148355780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159f1565b50565b6149598160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159f1565b50565b600033905090565b600080600084116149dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a8a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a2957600080fd5b505afa158015614a3d573d6000803e3d6000fd5b505050506040513d6020811015614a5357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614b0b57600080fd5b505af1158015614b1f573d6000803e3d6000fd5b505050506040513d6040811015614b3557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b8c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614ceb57600080fd5b505af1158015614cff573d6000803e3d6000fd5b505050506040513d6020811015614d1557600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614dde578082015181840152602081019050614dc3565b505050509050019650505050505050600060405180830381600087803b158015614e0757600080fd5b505af1158015614e1b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614e4557600080fd5b8101908080516040519392919084640100000000821115614e6557600080fd5b83820191506020820185811115614e7b57600080fd5b8251866020820283011164010000000082111715614e9857600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614ecf578082015181840152602081019050614eb4565b50505050905001604052505050925060019150614f206040518060400160405280600c81526020017f53776170207375636365737300000000000000000000000000000000000000008152506147c1565b50965096945050505050565b614fdf8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a1a565b505050565b6150cb846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a1a565b50505050565b61516b8160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159f1565b50565b60008083141561518157600090506151ee565b600082840290508284828161519257fe5b04146151e9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615e5d6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015615272576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006152be83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615c65565b905092915050565b600061530883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615d2b565b905092915050565b6153a681604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159f1565b50565b6000806000808511615423576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156154a157600080fd5b505afa1580156154b5573d6000803e3d6000fd5b505050506040513d60208110156154cb57600080fd5b81019080805190602001909291905050501015615550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156768773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561559b57600080fd5b505afa1580156155af573d6000803e3d6000fd5b505050506040513d60208110156155c557600080fd5b81019080805190602001909291905050506156688973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561561e57600080fd5b505afa158015615632573d6000803e3d6000fd5b505050506040513d602081101561564857600080fd5b81019080805190602001909291905050508961516e90919063ffffffff16565b61527c90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156156bf57600080fd5b505afa1580156156d3573d6000803e3d6000fd5b505050506040513d60208110156156e957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561577657600080fd5b505afa15801561578a573d6000803e3d6000fd5b505050506040513d60208110156157a057600080fd5b81019080805190602001909291905050501015615825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6158d23388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561587157600080fd5b505afa158015615885573d6000803e3d6000fd5b505050506040513d602081101561589b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b6158ff3388888a73ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561598157600080fd5b505af1158015615995573d6000803e3d6000fd5b505050506040513d60608110156159ab57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b615a398273ffffffffffffffffffffffffffffffffffffffff16615deb565b615aab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615afa5780518252602082019150602081019050602083039250615ad7565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615b5c576040519150601f19603f3d011682016040523d82523d6000602084013e615b61565b606091505b509150915081615bd9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615c5f57808060200190516020811015615bf857600080fd5b8101908080519060200190929190505050615c5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615eda602a913960400191505060405180910390fd5b5b50505050565b60008083118290615d11576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615cd6578082015181840152602081019050615cbb565b50505050905090810190601f168015615d035780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615d1d57fe5b049050809150509392505050565b6000838311158290615dd8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d9d578082015181840152602081019050615d82565b50505050905090810190601f168015615dca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615e2d57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220160ad69a1f2c39f14a44c03f73316595f51ac1f9d503576f2bab980a6ff524a564736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612070565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612253565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506123ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d06124fa565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061250b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107726126ec565b005b61077c612874565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061289a565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129c4565b604051808215151515815260200191505060405180910390f35b610938612f10565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612f39565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134c5565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061362c565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613793565b604051808381526020018281526020019250505060405180910390f35b610bff6140be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140d6565b005b610c8d61423d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614263565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614470565b604051808215151515815260200191505060405180910390f35b610dc161479b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f0000000000000000000000000000000000008152506147c1565b610ec3826148bf565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f4761495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b061495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a30614964565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614b64565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611acd57600080fd5b505afa158015611ae1573d6000803e3d6000fd5b505050506040513d6020811015611af757600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611b3c5781602001602082028038833980820191505090505b5090508381600081518110611b4d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611bb757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611bff57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615e7e605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611d5e578082015181840152602081019050611d43565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e8a576000611e8c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611eed57600080fd5b505afa158015611f01573d6000803e3d6000fd5b505050506040513d6020811015611f1757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f49578b611f4c565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611ffb578082015181840152602081019050611fe0565b50505050905090810190601f1680156120285780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561204a57600080fd5b505af115801561205e573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561215e57600080fd5b505afa158015612172573d6000803e3d6000fd5b505050506040513d602081101561218857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561223e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6122478161250b565b91505095945050505050565b61225b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461231c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156124b457600080fd5b505af11580156124c8573d6000803e3d6000fd5b505050506040513d60208110156124de57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561260357600080fd5b505afa158015612617573d6000803e3d6000fd5b505050506040513d602081101561262d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156126e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126f461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128ad8a8989898989613793565b9150915060006128c28a84848b8b8b8b6129c4565b905080612937576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612adc33308a8473ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b600080612aea8c8c30614964565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b9557600080fd5b505af1158015612ba9573d6000803e3d6000fd5b505050506040513d6020811015612bbf57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c7857600080fd5b505af1158015612c8c573d6000803e3d6000fd5b505050506040513d6020811015612ca257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612de557600080fd5b505af1158015612df9573d6000803e3d6000fd5b505050506040513d6060811015612e0f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612ee233828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e8257600080fd5b505afa158015612e96573d6000803e3d6000fd5b505050506040513d6020811015612eac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612fb0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612ff857600080fd5b505afa15801561300c573d6000803e3d6000fd5b505050506040513d602081101561302257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168560028151811061305957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146130ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61311588888373ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561319657600080fd5b505af11580156131aa573d6000803e3d6000fd5b505050506040513d60408110156131c057600080fd5b8101908080519060200190929190805190602001909291905050509150915061321d6040518060400160405280600e81526020017f6d696e746564206f7074696f6e730000000000000000000000000000000000008152506147c1565b600086905060008c9050600085905061326a6040518060400160405280600881526020017f7377617070696e670000000000000000000000000000000000000000000000008152506147c1565b606060006132fc8f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156132b757600080fd5b505afa1580156132cb573d6000803e3d6000fd5b505050506040513d60208110156132e157600080fd5b8101908080519060200190929190505050878f8f888f614b64565b9150915080985061330c896150d1565b8861337f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000808f905060008460028151811061339457fe5b602002602001015190506133fe816133f06103e86133e26133bf60038861516e90919063ffffffff16565b6133d46103e88961516e90919063ffffffff16565b6151f490919063ffffffff16565b61527c90919063ffffffff16565b6152c690919063ffffffff16565b9250505061340b81615310565b6134388686838773ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b50505050505061346986838c73ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a2505050979650505050505050565b6134cd61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461358e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138698b61250b565b905061389833308c8473ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396157600080fd5b505af1158015613975573d6000803e3d6000fd5b505050506040513d602081101561398b57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ac957600080fd5b505af1158015613add573d6000803e3d6000fd5b505050506040513d6040811015613af357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be057600080fd5b505af1158015613bf4573d6000803e3d6000fd5b505050506040513d6020811015613c0a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6257600080fd5b505afa158015613c76573d6000803e3d6000fd5b505050506040513d6020811015613c8c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4357600080fd5b505af1158015613d57573d6000803e3d6000fd5b505050506040513d6020811015613d6d57600080fd5b8101908080519060200190929190505050506000613ea58573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dca57600080fd5b505afa158015613dde573d6000803e3d6000fd5b505050506040513d6020811015613df457600080fd5b8101908080519060200190929190505050613e978773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4d57600080fd5b505afa158015613e61573d6000803e3d6000fd5b505050506040513d6020811015613e7757600080fd5b81019080805190602001909291905050508761516e90919063ffffffff16565b61527c90919063ffffffff16565b9050613f543330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ef357600080fd5b505afa158015613f07573d6000803e3d6000fd5b505050506040513d6020811015613f1d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401057600080fd5b505af1158015614024573d6000803e3d6000fd5b505050506040513d606081101561403a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061408d89838773ffffffffffffffffffffffffffffffffffffffff16614f2c9092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140de61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461419f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61426b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461432c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143b2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615e376026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061447e8685306153a9565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144ef57600080fd5b505afa158015614503573d6000803e3d6000fd5b505050506040513d602081101561451957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d057600080fd5b505af11580156145e4573d6000803e3d6000fd5b505050506040513d60208110156145fa57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146c857600080fd5b505af11580156146dc573d6000803e3d6000fd5b505050506040513d60408110156146f257600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6148bc816040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156148085780820151818401526020810190506147ed565b50505050905090810190601f1680156148355780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159f1565b50565b6149598160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159f1565b50565b600033905090565b600080600084116149dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a8a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a2957600080fd5b505afa158015614a3d573d6000803e3d6000fd5b505050506040513d6020811015614a5357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614b0b57600080fd5b505af1158015614b1f573d6000803e3d6000fd5b505050506040513d6040811015614b3557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b8c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614ceb57600080fd5b505af1158015614cff573d6000803e3d6000fd5b505050506040513d6020811015614d1557600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614dde578082015181840152602081019050614dc3565b505050509050019650505050505050600060405180830381600087803b158015614e0757600080fd5b505af1158015614e1b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614e4557600080fd5b8101908080516040519392919084640100000000821115614e6557600080fd5b83820191506020820185811115614e7b57600080fd5b8251866020820283011164010000000082111715614e9857600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614ecf578082015181840152602081019050614eb4565b50505050905001604052505050925060019150614f206040518060400160405280600c81526020017f53776170207375636365737300000000000000000000000000000000000000008152506147c1565b50965096945050505050565b614fdf8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a1a565b505050565b6150cb846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a1a565b50505050565b61516b8160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159f1565b50565b60008083141561518157600090506151ee565b600082840290508284828161519257fe5b04146151e9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615e5d6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015615272576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006152be83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615c65565b905092915050565b600061530883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615d2b565b905092915050565b6153a681604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159f1565b50565b6000806000808511615423576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156154a157600080fd5b505afa1580156154b5573d6000803e3d6000fd5b505050506040513d60208110156154cb57600080fd5b81019080805190602001909291905050501015615550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156768773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561559b57600080fd5b505afa1580156155af573d6000803e3d6000fd5b505050506040513d60208110156155c557600080fd5b81019080805190602001909291905050506156688973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561561e57600080fd5b505afa158015615632573d6000803e3d6000fd5b505050506040513d602081101561564857600080fd5b81019080805190602001909291905050508961516e90919063ffffffff16565b61527c90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156156bf57600080fd5b505afa1580156156d3573d6000803e3d6000fd5b505050506040513d60208110156156e957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561577657600080fd5b505afa15801561578a573d6000803e3d6000fd5b505050506040513d60208110156157a057600080fd5b81019080805190602001909291905050501015615825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6158d23388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561587157600080fd5b505afa158015615885573d6000803e3d6000fd5b505050506040513d602081101561589b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b6158ff3388888a73ffffffffffffffffffffffffffffffffffffffff16614fe4909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561598157600080fd5b505af1158015615995573d6000803e3d6000fd5b505050506040513d60608110156159ab57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b615a398273ffffffffffffffffffffffffffffffffffffffff16615deb565b615aab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615afa5780518252602082019150602081019050602083039250615ad7565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615b5c576040519150601f19603f3d011682016040523d82523d6000602084013e615b61565b606091505b509150915081615bd9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615c5f57808060200190516020811015615bf857600080fd5b8101908080519060200190929190505050615c5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615eda602a913960400191505060405180910390fd5b5b50505050565b60008083118290615d11576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615cd6578082015181840152602081019050615cbb565b50505050905090810190601f168015615d035780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615d1d57fe5b049050809150509392505050565b6000838311158290615dd8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d9d578082015181840152602081019050615d82565b50505050905090810190601f168015615dca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615e2d57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220160ad69a1f2c39f14a44c03f73316595f51ac1f9d503576f2bab980a6ff524a564736f6c63430006020033", "devdoc": { "methods": { "addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)": { @@ -920,18 +900,18 @@ "optionAddress": "The address of the option to deploy a Uniswap V2 Pair for with the quoteToken." } }, - "flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)": { + "flashloanMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address,uint256)": { "details": "Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference.", "params": { "amountOutMin": "The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens.", "deadline": "The timestamp for a trade to fail at if not successful.", "flashLoanQuantity": "The quantity of options to mint.", - "optionToken": "The address of the Option contract.", + "optionAddress": "The address of the Option contract.", "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.", "to": "The address to send the redeemToken proceeds and optionTokens to." }, "returns": { - "_0": "bool Whether the transaction was successful or not." + "success": "bool Whether the transaction was successful or not." } }, "getMaxDeadline()": { @@ -960,20 +940,6 @@ "_0": "bool Whether the transaction was successful or not." } }, - "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { - "details": "Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens.", - "params": { - "amountIn": "The quantity of options to mint.", - "amountOutMin": "The minimum quantity of tokens to receive in exchange for the redeemTokens.", - "deadline": "The timestamp for a trade to fail at if not successful.", - "optionToken": "The address of the Option contract.", - "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.", - "to": "The address to send the redeemToken proceeds and optionTokens to." - }, - "returns": { - "_0": "bool Whether the transaction was successful or not." - } - }, "owner()": { "details": "Returns the address of the current owner." }, @@ -1037,15 +1003,12 @@ "addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)": { "notice": "Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address. underlyingToken -> optionToken -> UNI-V2." }, - "flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)": { + "flashloanMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address,uint256)": { "notice": "If the first address in the path is not the redeemToken address, the tx will fail. underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens" }, "mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { "notice": "If the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken." }, - "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { - "notice": "If the first address in the path is not the redeemToken address, the tx will fail. underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens" - }, "removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)": { "notice": "Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender. Then closes the optionTokens and withdraws underlyingTokens to the \"to\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address. UNI-V2 -> optionToken -> underlyingToken." }, @@ -1060,7 +1023,7 @@ "storageLayout": { "storage": [ { - "astId": 33, + "astId": 8111, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "_owner", "offset": 0, @@ -1068,7 +1031,7 @@ "type": "t_address" }, { - "astId": 1351, + "astId": 9429, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "_notEntered", "offset": 20, @@ -1076,39 +1039,39 @@ "type": "t_bool" }, { - "astId": 2139, + "astId": 10218, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "router", "offset": 0, "slot": "1", - "type": "t_contract(IUniswapV2Router02)2092" + "type": "t_contract(IUniswapV2Router02)10170" }, { - "astId": 2141, + "astId": 10220, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "factory", "offset": 0, "slot": "2", - "type": "t_contract(IUniswapV2Factory)1454" + "type": "t_contract(IUniswapV2Factory)9532" }, { - "astId": 2143, + "astId": 10222, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "trader", "offset": 0, "slot": "3", - "type": "t_contract(ITrader)5867" + "type": "t_contract(ITrader)14032" }, { - "astId": 2145, + "astId": 10224, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "registry", "offset": 0, "slot": "4", - "type": "t_contract(IRegistry)5795" + "type": "t_contract(IRegistry)13960" }, { - "astId": 2147, + "astId": 10226, "contract": "contracts/connectors/Uniswap/UniswapConnector.sol:UniswapConnector", "label": "quoteToken", "offset": 0, @@ -1127,22 +1090,22 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IRegistry)5795": { + "t_contract(IRegistry)13960": { "encoding": "inplace", "label": "contract IRegistry", "numberOfBytes": "20" }, - "t_contract(ITrader)5867": { + "t_contract(ITrader)14032": { "encoding": "inplace", "label": "contract ITrader", "numberOfBytes": "20" }, - "t_contract(IUniswapV2Factory)1454": { + "t_contract(IUniswapV2Factory)9532": { "encoding": "inplace", "label": "contract IUniswapV2Factory", "numberOfBytes": "20" }, - "t_contract(IUniswapV2Router02)2092": { + "t_contract(IUniswapV2Router02)10170": { "encoding": "inplace", "label": "contract IUniswapV2Router02", "numberOfBytes": "20" @@ -1151,7 +1114,7 @@ }, "gasEstimates": { "creation": { - "codeDepositCost": "4508600", + "codeDepositCost": "4875400", "executionCost": "infinite", "totalCost": "infinite" }, @@ -1160,28 +1123,27 @@ "addLiquidityWithUnderlying(address,uint256,uint256,uint256,uint256,address,uint256)": "infinite", "deployUniswapMarket(address)": "infinite", "factory()": "1097", - "flashloanMintShortOptionsThenSwap(address,uint256,uint256,address[],address,uint256)": "infinite", - "getMaxDeadline()": "276", + "flashloanMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address,uint256)": "infinite", + "getMaxDeadline()": "298", "getUniswapMarketForOption(address)": "infinite", "getUniswapMarketForSeries(address,address,uint256,uint256,uint256)": "infinite", - "initialize(address,address,address,address,address)": "111582", + "initialize(address,address,address,address,address)": "111559", "mintOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": "infinite", - "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": "infinite", "openFlashShort(uint256,uint256,address)": "infinite", - "owner()": "1151", - "quoteToken()": "1121", - "registry()": "1164", + "owner()": "1106", + "quoteToken()": "1165", + "registry()": "1099", "removeLiquidityThenCloseOptions(address,uint256,uint256,uint256,address,uint256)": "infinite", - "renounceOwnership()": "24386", + "renounceOwnership()": "24408", "rollOption(address,address,uint256,address)": "infinite", "rollOptionLiquidity(address,address,uint256,uint256,uint256,address,uint256)": "infinite", "router()": "1163", - "setFactory(address)": "23618", - "setQuoteToken(address)": "23596", - "setRegistry(address)": "23639", + "setFactory(address)": "23640", + "setQuoteToken(address)": "23640", + "setRegistry(address)": "23661", "setRouter(address)": "23639", - "setTrader(address)": "23617", - "trader()": "1144", + "setTrader(address)": "23639", + "trader()": "1121", "transferOwnership(address)": "infinite", "uniswapV2Call(address,uint256,uint256,bytes)": "infinite" }, diff --git a/deployments/localhost_31337/WETH9.json b/deployments/localhost_31337/WETH9.json index 1f2c7bc1..cad7cbf3 100644 --- a/deployments/localhost_31337/WETH9.json +++ b/deployments/localhost_31337/WETH9.json @@ -288,7 +288,7 @@ "transactionIndex": 0, "gasUsed": "822038", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x71a98b95eb2567e832229e338bf393391ca6c462a662b8e3cdc22bbf644fc251", + "blockHash": "0x2718dccfb924333270747711ddeb0823a7d6c338cc058865b84cc9d76974ba81", "transactionHash": "0x5683b95314e826648df4758029a91920413fda9c4b7c5d2db6fb69000f16d4a8", "logs": [], "blockNumber": 10, @@ -298,7 +298,7 @@ }, "address": "0xc4905364b78a742ccce7B890A89514061E47068D", "args": [], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/test/tokens/WETH9.sol\":\"WETH9\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/test/tokens/WETH9.sol\":{\"keccak256\":\"0xe836e93e3411a8154743c003d1b6db6206715da771396b0c33a721d9460282c5\",\"urls\":[\"bzz-raw://74f9355ec14ee91917d4f9e810d23b059143fa3663da1ef65fed6e32b76e542e\",\"dweb:/ipfs/QmcWsXm2NXj7fhvYbghf1UBTr9dMTYqxmeLmDa5WaJ2S4r\"]}},\"version\":1}", "bytecode": "0x60806040526040518060400160405280600d81526020017f57726170706564204574686572000000000000000000000000000000000000008152506000908051906020019061004f9291906100ca565b506040518060400160405280600481526020017f57455448000000000000000000000000000000000000000000000000000000008152506001908051906020019061009b9291906100ca565b506012600260006101000a81548160ff021916908360ff1602179055503480156100c457600080fd5b5061016f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010b57805160ff1916838001178555610139565b82800160010185558215610139579182015b8281111561013857825182559160200191906001019061011d565b5b509050610146919061014a565b5090565b61016c91905b80821115610168576000816000905550600101610150565b5090565b90565b610cad8061017e6000396000f3fe60806040526004361061009c5760003560e01c8063313ce56711610064578063313ce5671461029d57806370a08231146102ce57806395d89b4114610333578063a9059cbb146103c3578063d0e30db014610436578063dd62ed3e146104405761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd146101a457806323b872dd146101cf5780632e1a7d4d14610262575b600080fd5b3480156100ad57600080fd5b506100b66104c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013d57600080fd5b5061018a6004803603604081101561015457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610563565b604051808215151515815260200191505060405180910390f35b3480156101b057600080fd5b506101b9610655565b6040518082815260200191505060405180910390f35b3480156101db57600080fd5b50610248600480360360608110156101f257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061065d565b604051808215151515815260200191505060405180910390f35b34801561026e57600080fd5b5061029b6004803603602081101561028557600080fd5b81019080803590602001909291905050506109a6565b005b3480156102a957600080fd5b506102b2610ad7565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102da57600080fd5b5061031d600480360360208110156102f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aea565b6040518082815260200191505060405180910390f35b34801561033f57600080fd5b50610348610b02565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561038857808201518184015260208101905061036d565b50505050905090810190601f1680156103b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103cf57600080fd5b5061041c600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba0565b604051808215151515815260200191505060405180910390f35b61043e610bb5565b005b34801561044c57600080fd5b506104af6004803603604081101561046357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c52565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055b5780601f106105305761010080835404028352916020019161055b565b820191906000526020600020905b81548152906001019060200180831161053e57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600047905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156106ab57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561078357507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b1561089c5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561081157600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109f257600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a85573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b985780601f10610b6d57610100808354040283529160200191610b98565b820191906000526020600020905b815481529060010190602001808311610b7b57829003601f168201915b505050505081565b6000610bad33848461065d565b905092915050565b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b600460205281600052604060002060205280600052604060002060009150915050548156fea2646970667358221220b1531d4fa8175ba03f5c001ae8e1a56591401c91b92bbc0e6c69d7dbd19ce87f64736f6c63430006020033", "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063313ce56711610064578063313ce5671461029d57806370a08231146102ce57806395d89b4114610333578063a9059cbb146103c3578063d0e30db014610436578063dd62ed3e146104405761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd146101a457806323b872dd146101cf5780632e1a7d4d14610262575b600080fd5b3480156100ad57600080fd5b506100b66104c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013d57600080fd5b5061018a6004803603604081101561015457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610563565b604051808215151515815260200191505060405180910390f35b3480156101b057600080fd5b506101b9610655565b6040518082815260200191505060405180910390f35b3480156101db57600080fd5b50610248600480360360608110156101f257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061065d565b604051808215151515815260200191505060405180910390f35b34801561026e57600080fd5b5061029b6004803603602081101561028557600080fd5b81019080803590602001909291905050506109a6565b005b3480156102a957600080fd5b506102b2610ad7565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102da57600080fd5b5061031d600480360360208110156102f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aea565b6040518082815260200191505060405180910390f35b34801561033f57600080fd5b50610348610b02565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561038857808201518184015260208101905061036d565b50505050905090810190601f1680156103b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103cf57600080fd5b5061041c600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba0565b604051808215151515815260200191505060405180910390f35b61043e610bb5565b005b34801561044c57600080fd5b506104af6004803603604081101561046357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c52565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055b5780601f106105305761010080835404028352916020019161055b565b820191906000526020600020905b81548152906001019060200180831161053e57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600047905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156106ab57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561078357507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b1561089c5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561081157600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109f257600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a85573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b985780601f10610b6d57610100808354040283529160200191610b98565b820191906000526020600020905b815481529060010190602001808311610b7b57829003601f168201915b505050505081565b6000610bad33848461065d565b905092915050565b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b600460205281600052604060002060205280600052604060002060009150915050548156fea2646970667358221220b1531d4fa8175ba03f5c001ae8e1a56591401c91b92bbc0e6c69d7dbd19ce87f64736f6c63430006020033", @@ -311,7 +311,7 @@ "storageLayout": { "storage": [ { - "astId": 8875, + "astId": 17040, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "name", "offset": 0, @@ -319,7 +319,7 @@ "type": "t_string_storage" }, { - "astId": 8878, + "astId": 17043, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "symbol", "offset": 0, @@ -327,7 +327,7 @@ "type": "t_string_storage" }, { - "astId": 8881, + "astId": 17046, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "decimals", "offset": 0, @@ -335,7 +335,7 @@ "type": "t_uint8" }, { - "astId": 8913, + "astId": 17078, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "balanceOf", "offset": 0, @@ -343,7 +343,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 8919, + "astId": 17084, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "allowance", "offset": 0, diff --git a/deployments/localhost_31337/WethConnector.json b/deployments/localhost_31337/WethConnector.json index 7e02286f..a37837b5 100644 --- a/deployments/localhost_31337/WethConnector.json +++ b/deployments/localhost_31337/WethConnector.json @@ -372,7 +372,7 @@ "transactionIndex": 0, "gasUsed": "3122425", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x83ac85d1fc5a4c4b69a2c08fcabdc245b7b8644f67ed72129c362379c5a1ef84", + "blockHash": "0xb0dba9241fc0f683b13961865944a40a6934db0fc654d14830d2fcfb2577418d", "transactionHash": "0xde9fd61e65f00e00f6a08dd9d7aedcfc0d672bfab6f4a41d5e66d67f50fdcc45", "logs": [], "blockNumber": 12, @@ -384,7 +384,7 @@ "args": [ "0xc4905364b78a742ccce7B890A89514061E47068D" ], - "solcInputHash": "0x77c729f7b7542bdf01907eafc05bbfe2edb18d58d4e2fa1dd3902e0fa48359e4", + "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"WethConnectorClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outUnderlyings\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inStrikes\",\"type\":\"uint256\"}],\"name\":\"WethConnectorExercise\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputOptions\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputRedeems\",\"type\":\"uint256\"}],\"name\":\"WethConnectorMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inRedeems\",\"type\":\"uint256\"}],\"name\":\"WethConnectorRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"WethConnectorUnwind\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"closeQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeCloseForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"exerciseQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExerciseForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExerciseWithETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeMintWithETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeRedeemForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"unwindQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeUnwindForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"details\":\"Since the WethConnector contract is responsible for converting between ethers and WETH, the contract is initialized with the address for WETH.\"},\"safeCloseForETH(address,uint256,address)\":{\"details\":\"Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\",\"params\":{\"closeQuantity\":\"Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address.\"}},\"safeExerciseForETH(address,uint256,address)\":{\"details\":\"Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\",\"params\":{\"exerciseQuantity\":\"Quantity of optionTokens to exercise.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address.\"}},\"safeExerciseWithETH(address,address)\":{\"details\":\"Swaps msg.value of strikeTokens (ethers) to underlyingTokens. Uses the strike ratio as the exchange rate. Strike ratio = base / quote. Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address.\"}},\"safeMintWithETH(address,address)\":{\"details\":\"Mints msg.value quantity of options and \\\"quote\\\" (option parameter) quantity of redeem tokens.\",\"params\":{\"optionToken\":\"The address of the option token to mint.\",\"receiver\":\"The address which receives the minted option and redeem tokens.\"}},\"safeRedeemForETH(address,uint256,address)\":{\"details\":\"Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The strikeTokens (ethers) are sent to the receiver address.\",\"redeemQuantity\":\"The quantity of redeemTokens to burn.\"}},\"safeUnwindForETH(address,uint256,address)\":{\"details\":\"Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. This function is for options with WETH as the underlying asset. The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address.\",\"unwindQuantity\":\"Quantity of underlyingTokens (ethers) to withdraw.\"}}}},\"userdoc\":{\"methods\":{\"safeCloseForETH(address,uint256,address)\":{\"notice\":\"This function is for options with WETH as the underlying asset. WETH underlyingTokens are converted to ethers before being sent to receiver. The redeemTokens to burn is equal to the optionTokens * strike ratio. inputOptions = inputRedeems / strike ratio = outUnderlyings\"},\"safeExerciseForETH(address,uint256,address)\":{\"notice\":\"This function is for options with WETH as the underlying asset. Burns option tokens, pulls strikeTokens, and pushes out ethers.\"},\"safeExerciseWithETH(address,address)\":{\"notice\":\"This function is for options with WETH as the strike asset. Burns option tokens, accepts ethers, and pushes out underlyingTokens.\"},\"safeMintWithETH(address,address)\":{\"notice\":\"This function is for options that have WETH as the underlying asset.\"},\"safeRedeemForETH(address,uint256,address)\":{\"notice\":\"This function is for options that have WETH as the strike asset. Converts WETH to ethers, and withdraws ethers to the receiver address.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/WETH/WethConnector.sol\":\"WethConnector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/connectors/WETH/IWETH.sol\":{\"keccak256\":\"0x63dce39ab69c513fb54459362900e4084a2ad2d164be2d46061afec61b956bfc\",\"urls\":[\"bzz-raw://43a214fb8eb4b26327dea29262c4e29e0f7269aec39ccb7e18bea20cfe7734da\",\"dweb:/ipfs/QmduwCTCBH4nQbXSBpJDhbLuATXLyS44yehfSvy6FTYyby\"]},\"contracts/connectors/WETH/IWethConnector.sol\":{\"keccak256\":\"0x59b34612bacc0cbaf89c320bd3bd3fd7111c4c173a3001a2d16ce194639dead2\",\"urls\":[\"bzz-raw://454a27a471fb727b18fdb5485baa8909ac6b7ed2f761241661f14a782779e79e\",\"dweb:/ipfs/QmRtmmum24bxuCSEs7dEtjUipEyiwpF59aiQX1hZRzdZm7\"]},\"contracts/connectors/WETH/WethConnector.sol\":{\"keccak256\":\"0x4a1d2b6c5a756a1b91725047ba54e96b1c89c1a146a84ba6f3a43840f0e084c9\",\"urls\":[\"bzz-raw://2f84bb6a6be9d61c6a4cb6c787ac39514c01b6b98e5fe058393e20a2c72fe6bf\",\"dweb:/ipfs/QmZa6BTNWTkM9jbTvt8ggsDdzqvNABFo6ZkESgifgSn7GF\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506040516138073803806138078339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613758806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061258d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612955565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a6130a2565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000349050600061221c8873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214057600080fd5b505afa158015612154573d6000803e3d6000fd5b505050506040513d602081101561216a57600080fd5b810190808051906020019092919050505061220e8a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c457600080fd5b505afa1580156121d8573d6000803e3d6000fd5b505050506040513d60208110156121ee57600080fd5b810190808051906020019092919050505085612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561229c57600080fd5b505afa1580156122b0573d6000803e3d6000fd5b505050506040513d60208110156122c657600080fd5b8101908080519060200190929190505050101561234b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b61235488613210565b6123813389838b73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f1916602001820160405280156123d35781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561245b578082015181840152602081019050612440565b50505050905090810190601f1680156124885780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b505050506040513d60408110156124d257600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555034600081116126a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d602081101561271457600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6127f386613210565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561287457600080fd5b505af1158015612888573d6000803e3d6000fd5b505050506040513d604081101561289e57600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff166129d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612a69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612ab157600080fd5b505afa158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bf957600080fd5b505afa158015612c0d573d6000803e3d6000fd5b505050506040513d6020811015612c2357600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612cb457600080fd5b505afa158015612cc8573d6000803e3d6000fd5b505050506040513d6020811015612cde57600080fd5b81019080805190602001909291905050501015612d63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612d903388888473ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e1157600080fd5b505af1158015612e25573d6000803e3d6000fd5b505050506040513d6020811015612e3b57600080fd5b81019080805190602001909291905050509050612e5886886130a2565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612ef85760009050612f65565b6000828402905082848281612f0957fe5b0414612f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136d86021913960400191505060405180910390fd5b809150505b92915050565b6000612fad83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061337b565b905092915050565b61309c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613441565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561311757600080fd5b505af115801561312b573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461318f576040519150601f19603f3d011682016040523d82523d6000602084013e613194565b606091505b505090508061320b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327a57600080fd5b505af115801561328e573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561333c57600080fd5b505af1158015613350573d6000803e3d6000fd5b505050506040513d602081101561336657600080fd5b81019080805190602001909291905050505050565b60008083118290613427576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156133ec5780820151818401526020810190506133d1565b50505050905090810190601f1680156134195780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161343357fe5b049050809150509392505050565b6134608273ffffffffffffffffffffffffffffffffffffffff1661368c565b6134d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061352157805182526020820191506020810190506020830392506134fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613583576040519150601f19603f3d011682016040523d82523d6000602084013e613588565b606091505b509150915081613600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156136865780806020019051602081101561361f57600080fd5b8101908080519060200190929190505050613685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806136f9602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156136ce57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208f18a6eb2c0fe7d22b220449e16d113334c7e5a71c03a53b229bdab03bf0416564736f6c63430006020033", "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061258d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612955565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a6130a2565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000349050600061221c8873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214057600080fd5b505afa158015612154573d6000803e3d6000fd5b505050506040513d602081101561216a57600080fd5b810190808051906020019092919050505061220e8a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c457600080fd5b505afa1580156121d8573d6000803e3d6000fd5b505050506040513d60208110156121ee57600080fd5b810190808051906020019092919050505085612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561229c57600080fd5b505afa1580156122b0573d6000803e3d6000fd5b505050506040513d60208110156122c657600080fd5b8101908080519060200190929190505050101561234b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b61235488613210565b6123813389838b73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f1916602001820160405280156123d35781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561245b578082015181840152602081019050612440565b50505050905090810190601f1680156124885780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b505050506040513d60408110156124d257600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555034600081116126a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d602081101561271457600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6127f386613210565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561287457600080fd5b505af1158015612888573d6000803e3d6000fd5b505050506040513d604081101561289e57600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff166129d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612a69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612ab157600080fd5b505afa158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bf957600080fd5b505afa158015612c0d573d6000803e3d6000fd5b505050506040513d6020811015612c2357600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612cb457600080fd5b505afa158015612cc8573d6000803e3d6000fd5b505050506040513d6020811015612cde57600080fd5b81019080805190602001909291905050501015612d63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612d903388888473ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e1157600080fd5b505af1158015612e25573d6000803e3d6000fd5b505050506040513d6020811015612e3b57600080fd5b81019080805190602001909291905050509050612e5886886130a2565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612ef85760009050612f65565b6000828402905082848281612f0957fe5b0414612f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136d86021913960400191505060405180910390fd5b809150505b92915050565b6000612fad83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061337b565b905092915050565b61309c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613441565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561311757600080fd5b505af115801561312b573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461318f576040519150601f19603f3d011682016040523d82523d6000602084013e613194565b606091505b505090508061320b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327a57600080fd5b505af115801561328e573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561333c57600080fd5b505af1158015613350573d6000803e3d6000fd5b505050506040513d602081101561336657600080fd5b81019080805190602001909291905050505050565b60008083118290613427576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156133ec5780820151818401526020810190506133d1565b50505050905090810190601f1680156134195780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161343357fe5b049050809150509392505050565b6134608273ffffffffffffffffffffffffffffffffffffffff1661368c565b6134d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061352157805182526020820191506020810190506020830392506134fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613583576040519150601f19603f3d011682016040523d82523d6000602084013e613588565b606091505b509150915081613600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156136865780806020019051602081101561361f57600080fd5b8101908080519060200190929190505050613685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806136f9602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156136ce57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208f18a6eb2c0fe7d22b220449e16d113334c7e5a71c03a53b229bdab03bf0416564736f6c63430006020033", @@ -463,7 +463,7 @@ "storageLayout": { "storage": [ { - "astId": 1351, + "astId": 9429, "contract": "contracts/connectors/WETH/WethConnector.sol:WethConnector", "label": "_notEntered", "offset": 0, @@ -471,12 +471,12 @@ "type": "t_bool" }, { - "astId": 3488, + "astId": 11653, "contract": "contracts/connectors/WETH/WethConnector.sol:WethConnector", "label": "weth", "offset": 1, "slot": "0", - "type": "t_contract(IWETH)3377" + "type": "t_contract(IWETH)11542" } ], "types": { @@ -485,7 +485,7 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IWETH)3377": { + "t_contract(IWETH)11542": { "encoding": "inplace", "label": "contract IWETH", "numberOfBytes": "20" diff --git a/deployments/localhost_31337/solcInputs/0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3.json b/deployments/localhost_31337/solcInputs/0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3.json new file mode 100644 index 00000000..1394ca1a --- /dev/null +++ b/deployments/localhost_31337/solcInputs/0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3.json @@ -0,0 +1,171 @@ +{ + "language": "Solidity", + "sources": { + "contracts/connectors/Uniswap/IUniswapConnector.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\ninterface IUniswapConnector {}\r\n" + }, + "contracts/connectors/Uniswap/UniswapConnector.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\n/**\r\n * @title Combines Uniswap V2 Protocol functions with Primitive V1.\r\n * @author Primitive\r\n */\r\n\r\n// Uniswap\r\nimport {\r\n IUniswapV2Callee\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\";\r\nimport {\r\n IUniswapV2Router02\r\n} from \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\r\nimport {\r\n IUniswapV2Factory\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\r\nimport {\r\n IUniswapV2Pair\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\";\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../../option/interfaces/IRegistry.sol\";\r\nimport { ITrader } from \"../../option/interfaces/ITrader.sol\";\r\nimport { TraderLib } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector } from \"../WETH/IWethConnector.sol\";\r\n// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\nimport \"@nomiclabs/buidler/console.sol\";\r\n\r\ncontract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n IUniswapV2Router02 public router;\r\n IUniswapV2Factory public factory;\r\n ITrader public trader;\r\n IRegistry public registry;\r\n\r\n address public quoteToken; // Designated stablecoin for Primitive.\r\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\r\n\r\n event Initialized(address indexed from, address indexed quoteToken);\r\n event UpdatedRouter(address indexed from, address indexed newRouter);\r\n event UpdatedFactory(address indexed from, address indexed newFactory);\r\n event UpdatedTrader(address indexed from, address indexed newTrader);\r\n event UpdatedRegistry(address indexed from, address indexed newRegistry);\r\n event UpdatedQuoteToken(address indexed from, address indexed newQuote);\r\n event FlashedShortOption(address indexed from, uint256 quantity);\r\n\r\n event RolledOptions(\r\n address indexed from,\r\n address indexed optionFrom,\r\n address indexed optionTo,\r\n uint256 quantity\r\n );\r\n event RolledOptionLiquidity(\r\n address indexed from,\r\n address indexed optionMarketFrom,\r\n address indexed optionMarketTo,\r\n uint256 liquidity\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n // ==== Setup Functions ====\r\n\r\n function initialize(\r\n address router_,\r\n address factory_,\r\n address trader_,\r\n address registry_,\r\n address quoteToken_\r\n ) external onlyOwner {\r\n require(address(router) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(factory) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(trader) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(registry) == address(0x0), \"ERR_INITIALIZED\");\r\n require(quoteToken == address(0x0), \"ERR_INITIALIZED\");\r\n router = IUniswapV2Router02(router_);\r\n factory = IUniswapV2Factory(factory_);\r\n trader = ITrader(trader_);\r\n registry = IRegistry(registry_);\r\n quoteToken = quoteToken_;\r\n emit Initialized(msg.sender, quoteToken_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Uniswap V2 Router address to use.\r\n */\r\n function setRouter(address router_) external onlyOwner {\r\n router = IUniswapV2Router02(router_);\r\n emit UpdatedRouter(msg.sender, router_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Uniswap V2 Factory address to use.\r\n */\r\n function setFactory(address factory_) external onlyOwner {\r\n factory = IUniswapV2Factory(factory_);\r\n emit UpdatedFactory(msg.sender, factory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Primitive V1 Trader address to use.\r\n */\r\n function setTrader(address trader_) external onlyOwner {\r\n trader = ITrader(trader_);\r\n emit UpdatedTrader(msg.sender, trader_);\r\n }\r\n\r\n /**\r\n * @dev Sets the Primitive V1 Registry address to use.\r\n */\r\n function setRegistry(address registry_) external onlyOwner {\r\n registry = IRegistry(registry_);\r\n emit UpdatedRegistry(msg.sender, registry_);\r\n }\r\n\r\n /**\r\n * @dev Sets the designated stablecoin to use (paired token in Uniswap pools).\r\n */\r\n function setQuoteToken(address quoteToken_) external onlyOwner {\r\n quoteToken = quoteToken_;\r\n emit UpdatedQuoteToken(msg.sender, quoteToken_);\r\n }\r\n\r\n // ==== Trading Functions ====\r\n\r\n /**\r\n * @dev Mints options using underlyingTokens provided by user, then swaps on Uniswap V2.\r\n * Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.\r\n * @notice If the first address in the path is not the optionToken address, the tx will fail.\r\n * underlyingToken -> optionToken -> quoteToken.\r\n * @param optionToken The address of the Oracle-less Primitive option.\r\n * @param amountIn The quantity of options to mint and then sell.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n * @param to The address to send the optionToken proceeds and redeem tokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n function mintOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints option and redeem tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the optionToken address.\r\n (, bool success) = _swapExactOptionsForTokens(\r\n address(optionToken),\r\n outputOptions,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send redeemTokens (short options) to the \"to\" address.\r\n IERC20(optionToken.redeemToken()).safeTransfer(to, outputRedeems);\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens.\r\n * @notice If the first address in the path is not the redeemToken address, the tx will fail.\r\n * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\r\n * @param optionToken The address of the Option contract.\r\n * @param amountIn The quantity of options to mint.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the redeemTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\r\n * @param to The address to send the redeemToken proceeds and optionTokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return bool Whether the transaction was successful or not.\r\n */\r\n /* function mintShortOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) public returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints option and redeem tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the optionToken address.\r\n address redeemToken = optionToken.redeemToken();\r\n (, bool success) = _swapExactOptionsForTokens(\r\n redeemToken,\r\n outputRedeems, // shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send optionTokens (long options) to the \"to\" address.\r\n IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens\r\n return success;\r\n } */\r\n\r\n /**\r\n * @dev Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference.\r\n * @notice If the first address in the path is not the redeemToken address, the tx will fail.\r\n * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens\r\n * @param optionAddress The address of the Option contract.\r\n * @param flashLoanQuantity The quantity of options to mint.\r\n * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken.\r\n * @param to The address to send the redeemToken proceeds and optionTokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n * @return success bool Whether the transaction was successful or not.\r\n */\r\n function flashloanMintShortOptionsThenSwap(\r\n address pairAddress,\r\n address optionAddress,\r\n uint256 flashLoanQuantity,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) public returns (bool success) {\r\n require(flashLoanQuantity > 0, \"ERR_ZERO\");\r\n // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens.\r\n\r\n // Mints option and redeem tokens to this contract.\r\n address underlyingToken = IOption(optionAddress)\r\n .getUnderlyingTokenAddress();\r\n require(path[2] == underlyingToken, \"ERR_END_PATH_NOT_UNDERLYING\");\r\n\r\n // Mint optionTokens using the underlyingTokens received from UniswapV2 flashloan.\r\n // Sends underlyingTokens from this contract and to the optionToken contract, then calls mintOptions.\r\n // This contract receives the newly minted option and redeem tokens.\r\n IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity);\r\n (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress)\r\n .mintOptions(address(this));\r\n console.log(\"minted options\");\r\n\r\n // Need to pay back the UniswapV2 flash loan by selling the redeemToken, then paying the remainder.\r\n\r\n // Swaps redeemTokens to the token specified at the end of the path, then sends to UniswapV2Pair.\r\n // Reverts if the first address in the path is not the redeemToken address.\r\n // Reverts if the last address in the path is not the underlyingToken address.\r\n // path[0] = redeemToken, path[1] = dai, path[2] = underlyingToken\r\n {\r\n address original = to;\r\n address pair = pairAddress;\r\n address underlyingToken_ = underlyingToken;\r\n console.log(\"swapping\");\r\n (\r\n uint256[] memory amounts,\r\n bool isSuccess\r\n ) = _swapExactOptionsForTokens(\r\n IOption(optionAddress).redeemToken(),\r\n outputRedeems, // shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n pair,\r\n deadline\r\n );\r\n success = isSuccess;\r\n // Fail early if the swap failed.\r\n console.log(success);\r\n require(success, \"ERR_SWAP_FAILED\");\r\n // The remainder is the flash loan amount - amount from selling redeemTokens.\r\n uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by selling redeemTokens\r\n {\r\n uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed\r\n uint256 paid = amounts[2]; // quantity of underlying tokens paid\r\n remainder = quantity\r\n .mul(1000)\r\n .add(quantity.mul(3))\r\n .div(1000)\r\n .sub(paid);\r\n }\r\n\r\n console.log(remainder);\r\n\r\n // Pull underlyingTokens from the original spender to pay the remainder of the flash loan.\r\n IERC20(underlyingToken_).safeTransferFrom(\r\n original,\r\n pair,\r\n remainder\r\n );\r\n }\r\n\r\n // Send optionTokens (long options) to the \"original\" address.\r\n IERC20(optionAddress).safeTransfer(to, outputOptions); // longOptionTokens\r\n emit FlashedShortOption(msg.sender, outputOptions);\r\n }\r\n\r\n function openFlashShort(\r\n uint256 amountOptions,\r\n uint256 amountOutMin,\r\n IOption optionToken\r\n ) public {\r\n address redeemToken = optionToken.redeemToken();\r\n address underlyingToken = optionToken.getUnderlyingTokenAddress();\r\n address pairAddress = factory.getPair(quoteToken, underlyingToken);\r\n address[] memory path = new address[](3);\r\n path[0] = redeemToken;\r\n path[1] = quoteToken;\r\n path[2] = underlyingToken;\r\n IUniswapV2Pair pair = IUniswapV2Pair(pairAddress);\r\n\r\n bytes4 selector = bytes4(\r\n keccak256(\r\n bytes(\r\n \"flashloanMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address,uint256)\"\r\n )\r\n )\r\n );\r\n bytes memory params = abi.encodeWithSelector(\r\n selector, // function to call in this contract\r\n pairAddress,\r\n optionToken, // option token to mint with flash loaned tokens\r\n amountOptions, // quantity of tokens from flash loan\r\n amountOutMin, // total price paid for selling redeemTokens from the minted optionTokens\r\n path, // redeemToken -> stablecoin -> underlyingToken\r\n msg.sender, // address to pull the remainder loan amount to pay, and send optionTokens to.\r\n now + 15 minutes // deadline of this function call\r\n );\r\n\r\n // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address.\r\n // Then executes `flashLoanMintShortOptionsThenSwap`.\r\n uint256 amount0Out = pair.token0() == underlyingToken\r\n ? amountOptions\r\n : 0;\r\n uint256 amount1Out = pair.token0() == underlyingToken\r\n ? 0\r\n : amountOptions;\r\n pair.swap(amount0Out, amount1Out, address(this), params); // redeemToken <> stablecoin pair swap\r\n }\r\n\r\n // gets tokens/WETH via a V2 flash swap, mints options, swaps short tokens for tokens, pulls in difference, repays!\r\n function uniswapV2Call(\r\n address sender,\r\n uint256 amount0,\r\n uint256 amount1,\r\n bytes calldata data\r\n ) external override {\r\n (bool success, bytes memory returnData) = address(this).call(data);\r\n console.log(\"Is Successful?\");\r\n console.logBool(success);\r\n require(success, \"ERR_UNISWAPV2_CALL_FAIL\");\r\n }\r\n\r\n /**\r\n * @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n * @notice Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender.\r\n * Then closes the optionTokens and withdraws underlyingTokens to the \"to\" address.\r\n * Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n * UNI-V2 -> optionToken -> underlyingToken.\r\n * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity.\r\n * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function removeLiquidityThenCloseOptions(\r\n address optionAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) public nonReentrant returns (uint256, uint256) {\r\n // Store in memory for gas savings.\r\n address quoteToken_ = quoteToken;\r\n IOption optionToken = IOption(optionAddress);\r\n //IUniswapV2Router02 router_ = router;\r\n\r\n {\r\n // Gets the Uniswap V2 Pair address for optionAddress and quoteToken.\r\n // Transfers the LP tokens for the pair to this contract.\r\n // Warning: external call to a non-trusted address `msg.sender`.\r\n address pair = getUniswapMarketForOption(optionAddress);\r\n IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);\r\n IERC20(pair).approve(address(router), uint256(-1));\r\n }\r\n\r\n // Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens).\r\n (uint256 amountOptions, uint256 amountQuote) = router.removeLiquidity(\r\n optionAddress,\r\n quoteToken_,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n address(this),\r\n deadline\r\n );\r\n\r\n // Approves trader to pull option and redeem tokens from this contract to close options.\r\n ITrader trader_ = trader;\r\n {\r\n //address redeemToken = optionToken.redeemToken();\r\n IERC20(optionAddress).approve(address(trader_), uint256(-1));\r\n IERC20(optionToken.redeemToken()).approve(\r\n address(trader_),\r\n uint256(-1)\r\n );\r\n\r\n // Calculate equivalent quantity of redeem (short option) tokens to close the option position.\r\n // Need to cancel base units and have quote units remaining.\r\n uint256 requiredRedeems = amountOptions\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Pull the required redeemTokens from msg.sender to this contract.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n requiredRedeems\r\n );\r\n }\r\n\r\n // Pushes option and redeem tokens to the option contract and calls \"closeOption\".\r\n // Receives underlyingTokens and sends them to the \"to\" address.\r\n trader_.safeClose(optionToken, amountOptions, to);\r\n\r\n // Send the quoteTokens received from burning liquidity shares to the \"to\" address.\r\n IERC20(quoteToken_).safeTransfer(to, amountQuote);\r\n\r\n return (amountOptions, amountQuote);\r\n }\r\n\r\n /**\r\n * @dev Combines \"removeLiquidityThenCloseOptions\" function with \"addLiquidityWithUnderlying\" fuction.\r\n * @notice Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair.\r\n * UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2.\r\n * @param rollFromOption The optionToken address to close a UNI-V2 position.\r\n * @param rollToOption The optionToken address to open a UNI-V2 position.\r\n * @param liquidity The quantity of UNI-V2 shares to roll from the first Uniswap pool.\r\n * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity.\r\n * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n * @param to The address that receives the UNI-V2 shares that have been rolled.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function rollOptionLiquidity(\r\n address rollFromOption,\r\n address rollToOption,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool) {\r\n (\r\n uint256 outUnderlyings,\r\n uint256 outQuote\r\n ) = removeLiquidityThenCloseOptions(\r\n rollFromOption,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n bool success = addLiquidityWithUnderlying(\r\n rollToOption,\r\n outUnderlyings,\r\n outQuote,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n require(success, \"ERR_ADD_LIQUIDITY_FAIL\");\r\n\r\n emit RolledOptionLiquidity(\r\n msg.sender,\r\n rollFromOption,\r\n rollToOption,\r\n liquidity\r\n );\r\n\r\n return success;\r\n }\r\n\r\n /**\r\n * @dev Closes an option position and opens a new one using the freed underlyingTokens.\r\n * @notice Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver.\r\n * rollFromOption -> underlyingToken -> rollToOption.\r\n * @param rollFromOption The optionToken to close.\r\n * @param rollToOption The optionToken to mint.\r\n * @param rollQuantity The quantity of underlyingTokens to receive from closed options then use to mint new options.\r\n * @param receiver The address that receives newly minted option and redeem tokens.\r\n */\r\n function rollOption(\r\n address rollFromOption,\r\n address rollToOption,\r\n uint256 rollQuantity,\r\n address receiver\r\n ) external returns (bool) {\r\n // Close the rollFromOption to receive underlyingTokens.\r\n // Sends the underlyingTokens to this contract.\r\n (, , uint256 outUnderlyings) = TraderLib.safeClose(\r\n IOption(rollFromOption),\r\n rollQuantity,\r\n address(this)\r\n );\r\n\r\n // Store in memory for gas savings.\r\n ITrader trader_ = trader;\r\n\r\n // Approve underlyingTokens to be sent to the Primitive Trader contract.\r\n IERC20(IOption(rollFromOption).getUnderlyingTokenAddress()).approve(\r\n address(trader_),\r\n uint256(-1)\r\n );\r\n\r\n // Mint rollToOptions using the underlyingTokens received from closing the rollFromOptions.\r\n // Pulls underlyingTokens from this contract and sends them to the rollToOption contract.\r\n // Sends minted option and redeem tokens to the \"receiver\" address.\r\n (uint256 outputOptions, ) = trader_.safeMint(\r\n IOption(rollToOption),\r\n outUnderlyings,\r\n receiver\r\n );\r\n\r\n // An event is emitted because a position was atomically rolled without additional capital.\r\n emit RolledOptions(\r\n msg.sender,\r\n rollFromOption,\r\n rollToOption,\r\n outputOptions\r\n );\r\n return true;\r\n }\r\n\r\n // ==== Liquidity Functions ====\r\n\r\n /**\r\n * @dev Adds liquidity to an option<>quote token pair by minting optionTokens with underlyingTokens.\r\n * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n * underlyingToken -> optionToken -> UNI-V2.\r\n * @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n * @param quantityOptions The quantity of underlyingTokens to use to mint optionTokens.\r\n * @param quantityQuoteTokens The quantity of quoteTokens to add with optionTokens to the Uniswap V2 Pair.\r\n * @param minQuantityOptions The minimum quantity of optionTokens expected to provide liquidity with.\r\n * @param minQuantityQuoteTokens The minimum quantity of quoteTokens expected to provide liquidity with.\r\n * @param to The address that receives UNI-V2 shares.\r\n * @param deadline The timestamp to expire a pending transaction.\r\n */\r\n function addLiquidityWithUnderlying(\r\n address optionAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityQuoteTokens,\r\n uint256 minQuantityOptions,\r\n uint256 minQuantityQuoteTokens,\r\n address to,\r\n uint256 deadline\r\n ) public nonReentrant returns (bool) {\r\n // Store in memory for gas savings.\r\n IUniswapV2Router02 router_ = router;\r\n address quoteToken_ = quoteToken;\r\n\r\n // Pull quote tokens from msg.sender to add to Uniswap V2 Pair.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(quoteToken_).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityQuoteTokens\r\n );\r\n\r\n // Pulls underlyingTokens from msg.sender to this contract.\r\n // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n IOption(optionAddress),\r\n quantityOptions,\r\n address(this)\r\n );\r\n\r\n // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(optionAddress).approve(address(router_), uint256(-1));\r\n IERC20(quoteToken_).approve(address(router_), uint256(-1));\r\n\r\n // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router_.addLiquidity(\r\n optionAddress,\r\n quoteToken,\r\n outputOptions,\r\n quantityQuoteTokens,\r\n minQuantityOptions,\r\n minQuantityQuoteTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n // Send redeemTokens (short option tokens) from minting option operation to msg.sender.\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n msg.sender,\r\n outputRedeems\r\n );\r\n\r\n return true;\r\n }\r\n\r\n // ==== Internal Functions ====\r\n\r\n /**\r\n * @dev Calls the \"swapExactTokensForTokens\" function on the Uniswap V2 Router 02 Contract.\r\n * @notice Fails early if the address in the beginning of the path is not the optionToken address.\r\n * @param optionAddress The address of the optionToken to swap from.\r\n * @param amountIn The quantity of optionTokens to swap with.\r\n * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens swapped.\r\n * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n * @param to The address to send the optionToken proceeds and redeem tokens to.\r\n * @param deadline The timestamp for a trade to fail at if not successful.\r\n */\r\n function _swapExactOptionsForTokens(\r\n address optionAddress,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256[] memory amounts, bool success) {\r\n // Fails early if the token being swapped from is not the optionToken.\r\n require(path[0] == optionAddress, \"ERR_PATH_OPTION_START\");\r\n\r\n // Store router in memory for gas savings.\r\n IUniswapV2Router02 router_ = router;\r\n\r\n // Approve the uniswap router to be able to transfer options from this contract.\r\n IERC20(optionAddress).approve(address(router_), uint256(-1));\r\n // Call the Uniswap V2 function to swap optionTokens to quoteTokens.\r\n (amounts) = router_.swapExactTokensForTokens(\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n success = true;\r\n console.log(\"Swap success\");\r\n }\r\n\r\n // ==== Management Functions ====\r\n\r\n /**\r\n * @dev Creats a Uniswap pair for option<>quote tokens.\r\n * @param optionAddress The address of the option to deploy a Uniswap V2 Pair for with the quoteToken.\r\n */\r\n function deployUniswapMarket(address optionAddress)\r\n external\r\n returns (address)\r\n {\r\n address uniswapPair = factory.createPair(optionAddress, quoteToken);\r\n return uniswapPair;\r\n }\r\n\r\n // ==== View ====\r\n\r\n /**\r\n * @dev The maxmium deadline available for each trade.\r\n */\r\n function getMaxDeadline() public view returns (uint256) {\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 deadline = now + 15 minutes;\r\n return deadline;\r\n }\r\n\r\n /**\r\n * @dev Gets a Uniswap Pair address for an option token and quote token.\r\n * @param optionAddress The address of the option to get a Uniswap V2 Pair address for (with quoteToken).\r\n */\r\n function getUniswapMarketForOption(address optionAddress)\r\n public\r\n view\r\n returns (address)\r\n {\r\n address uniswapPair = factory.getPair(optionAddress, quoteToken);\r\n require(uniswapPair != address(0x0), \"ERR_PAIR_DOES_NOT_EXIST\");\r\n return uniswapPair;\r\n }\r\n\r\n /**\r\n * @dev Gets a Uniswap Pair address for the corresponding option parameters.\r\n */\r\n function getUniswapMarketForSeries(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public view returns (address) {\r\n address optionAddress = registry.getOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n require(optionAddress != address(0x0), \"ERR_OPTION_DOES_NOT_EXIST\");\r\n return getUniswapMarketForOption(optionAddress);\r\n }\r\n}\r\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Callee {\n function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": { + "content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": { + "content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/option/interfaces/IOption.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IOption is IERC20 {\r\n function mintOptions(address receiver) external returns (uint256, uint256);\r\n\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external returns (uint256, uint256);\r\n\r\n function redeemStrikeTokens(address receiver) external returns (uint256);\r\n\r\n function closeOptions(address receiver)\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function redeemToken() external view returns (address);\r\n\r\n function getStrikeTokenAddress() external view returns (address);\r\n\r\n function getUnderlyingTokenAddress() external view returns (address);\r\n\r\n function getBaseValue() external view returns (uint256);\r\n\r\n function getQuoteValue() external view returns (uint256);\r\n\r\n function getExpiryTime() external view returns (uint256);\r\n\r\n function underlyingCache() external view returns (uint256);\r\n\r\n function strikeCache() external view returns (uint256);\r\n\r\n function factory() external view returns (address);\r\n\r\n function getCacheBalances() external view returns (uint256, uint256);\r\n\r\n function getAssetAddresses()\r\n external\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n );\r\n\r\n function getParameters()\r\n external\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n );\r\n\r\n function initRedeemToken(address _redeemToken) external;\r\n\r\n function updateCacheBalances() external;\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../../GSN/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20MinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/GSN/Context.sol": { + "content": "pragma solidity ^0.6.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "pragma solidity ^0.6.2;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/option/interfaces/IRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRegistry {\r\n function pauseDeployments() external;\r\n\r\n function unpauseDeployments() external;\r\n\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function setOptionFactory(address optionFactory_) external;\r\n\r\n function setRedeemFactory(address redeemFactory_) external;\r\n\r\n function optionFactory() external returns (address);\r\n\r\n function redeemFactory() external returns (address);\r\n\r\n function verifyToken(address tokenAddress) external;\r\n\r\n function verifyExpiry(uint256 expiry) external;\r\n\r\n function unverifyToken(address tokenAddress) external;\r\n\r\n function unverifyExpiry(uint256 expiry) external;\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n view\r\n returns (bool);\r\n}\r\n" + }, + "contracts/option/interfaces/ITrader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IOption } from \"./IOption.sol\";\r\n\r\ninterface ITrader {\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "contracts/option/libraries/TraderLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Trader Library\r\n * @notice Internal functions that can be used to safeTransfer\r\n * tokens into the option contract then call respective option contract functions.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary TraderLib {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n /**\r\n * @dev Conducts important safety checks to safely mint option tokens.\r\n * @param optionToken The address of the option token to mint.\r\n * @param mintQuantity The quantity of option tokens to mint.\r\n * @param receiver The address which receives the minted option tokens.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(mintQuantity > 0, \"ERR_ZERO\");\r\n IERC20(optionToken.getUnderlyingTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n mintQuantity\r\n );\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(exerciseQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.getStrikeTokenAddress()).balanceOf(msg.sender) >=\r\n inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n IERC20(optionToken.getStrikeTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inputRedeems = outputStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) internal returns (uint256) {\r\n require(redeemQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n // There can be the case there is no available strikes to redeem, causing a revert.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(receiver);\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n require(closeQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned. (What we mean by Implicit).\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens are sent to the receiver address and the redeemTokens are burned.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Checks\r\n require(unwindQuantity > 0, \"ERR_ZERO\");\r\n // solhint-disable-next-line not-rely-on-time\r\n require(\r\n optionToken.getExpiryTime() < block.timestamp,\r\n \"ERR_NOT_EXPIRED\"\r\n );\r\n\r\n // Calculate amount of redeems required\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/connectors/WETH/IWethConnector.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\n\r\ninterface IWethConnector {\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\ncontract ReentrancyGuard {\n bool private _notEntered;\n\n constructor () internal {\n // Storing an initial non-zero value makes deployment a bit more\n // expensive, but in exchange the refund on every call to nonReentrant\n // will be lower in amount. Since refunds are capped to a percetange of\n // the total transaction's gas, it is best to keep them low in cases\n // like this one, to increase the likelihood of the full refund coming\n // into effect.\n _notEntered = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _notEntered = false;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _notEntered = true;\n }\n}\n" + }, + "@nomiclabs/buidler/console.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.22 <0.7.0;\n\nlibrary console {\n\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\n\n\tfunction _sendLogPayload(bytes memory payload) private view {\n\t\tuint256 payloadLength = payload.length;\n\t\taddress consoleAddress = CONSOLE_ADDRESS;\n\t\tassembly {\n\t\t\tlet payloadStart := add(payload, 32)\n\t\t\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\n\t\t}\n\t}\n\n\tfunction log() internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log()\"));\n\t}\n\n\tfunction logInt(int p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int)\", p0));\n\t}\n\n\tfunction logUint(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction logString(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction logBool(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction logAddress(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction logBytes(bytes memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes)\", p0));\n\t}\n\n\tfunction logByte(byte p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(byte)\", p0));\n\t}\n\n\tfunction logBytes1(bytes1 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes1)\", p0));\n\t}\n\n\tfunction logBytes2(bytes2 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes2)\", p0));\n\t}\n\n\tfunction logBytes3(bytes3 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes3)\", p0));\n\t}\n\n\tfunction logBytes4(bytes4 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes4)\", p0));\n\t}\n\n\tfunction logBytes5(bytes5 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes5)\", p0));\n\t}\n\n\tfunction logBytes6(bytes6 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes6)\", p0));\n\t}\n\n\tfunction logBytes7(bytes7 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes7)\", p0));\n\t}\n\n\tfunction logBytes8(bytes8 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes8)\", p0));\n\t}\n\n\tfunction logBytes9(bytes9 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes9)\", p0));\n\t}\n\n\tfunction logBytes10(bytes10 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes10)\", p0));\n\t}\n\n\tfunction logBytes11(bytes11 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes11)\", p0));\n\t}\n\n\tfunction logBytes12(bytes12 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes12)\", p0));\n\t}\n\n\tfunction logBytes13(bytes13 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes13)\", p0));\n\t}\n\n\tfunction logBytes14(bytes14 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes14)\", p0));\n\t}\n\n\tfunction logBytes15(bytes15 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes15)\", p0));\n\t}\n\n\tfunction logBytes16(bytes16 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes16)\", p0));\n\t}\n\n\tfunction logBytes17(bytes17 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes17)\", p0));\n\t}\n\n\tfunction logBytes18(bytes18 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes18)\", p0));\n\t}\n\n\tfunction logBytes19(bytes19 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes19)\", p0));\n\t}\n\n\tfunction logBytes20(bytes20 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes20)\", p0));\n\t}\n\n\tfunction logBytes21(bytes21 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes21)\", p0));\n\t}\n\n\tfunction logBytes22(bytes22 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes22)\", p0));\n\t}\n\n\tfunction logBytes23(bytes23 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes23)\", p0));\n\t}\n\n\tfunction logBytes24(bytes24 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes24)\", p0));\n\t}\n\n\tfunction logBytes25(bytes25 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes25)\", p0));\n\t}\n\n\tfunction logBytes26(bytes26 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes26)\", p0));\n\t}\n\n\tfunction logBytes27(bytes27 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes27)\", p0));\n\t}\n\n\tfunction logBytes28(bytes28 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes28)\", p0));\n\t}\n\n\tfunction logBytes29(bytes29 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes29)\", p0));\n\t}\n\n\tfunction logBytes30(bytes30 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes30)\", p0));\n\t}\n\n\tfunction logBytes31(bytes31 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes31)\", p0));\n\t}\n\n\tfunction logBytes32(bytes32 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bytes32)\", p0));\n\t}\n\n\tfunction log(uint p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint)\", p0));\n\t}\n\n\tfunction log(string memory p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string)\", p0));\n\t}\n\n\tfunction log(bool p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool)\", p0));\n\t}\n\n\tfunction log(address p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address)\", p0));\n\t}\n\n\tfunction log(uint p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool)\", p0, p1));\n\t}\n\n\tfunction log(bool p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address)\", p0, p1));\n\t}\n\n\tfunction log(address p0, uint p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint)\", p0, p1));\n\t}\n\n\tfunction log(address p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string)\", p0, p1));\n\t}\n\n\tfunction log(address p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool)\", p0, p1));\n\t}\n\n\tfunction log(address p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address)\", p0, p1));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, uint p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, uint p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n}\n" + }, + "contracts/connectors/WETH/IWETH.sol": { + "content": "pragma solidity >=0.5.0;\r\n\r\ninterface IWETH {\r\n function deposit() external payable;\r\n\r\n function transfer(address to, uint256 value) external returns (bool);\r\n\r\n function withdraw(uint256) external;\r\n}\r\n" + }, + "contracts/connectors/WETH/WethConnector.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Weth Connector for bridging ether to WETH Primitive options.\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * Manages operations involving options with WETH as the underlying or strike asset.\r\n * Accepts deposits in ethers and withdraws ethers.\r\n * @author Primitive\r\n */\r\n\r\n// WETH Interface\r\nimport { IWETH } from \"./IWETH.sol\";\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { TraderLib } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector } from \"./IWethConnector.sol\";\r\n// Open Zeppelin\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract WethConnector is IWethConnector, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n IWETH public weth;\r\n\r\n event WethConnectorMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event WethConnectorExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event WethConnectorRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event WethConnectorClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event WethConnectorUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n /**\r\n * @dev Checks the quantity of an operation to make sure its not zero. Fails early.\r\n */\r\n modifier nonZero(uint256 quantity) {\r\n require(quantity > 0, \"ERR_ZERO\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Since the WethConnector contract is responsible for converting between ethers and WETH,\r\n * the contract is initialized with the address for WETH.\r\n */\r\n constructor(address payable _weth) public {\r\n weth = IWETH(_weth);\r\n }\r\n\r\n /**\r\n * @dev If ether is sent to this contract through a normal transaction, it will fail, unless\r\n * it was the WETH contract who sent it.\r\n */\r\n receive() external payable {\r\n assert(msg.sender == address(weth));\r\n }\r\n\r\n // ==== Operation Functions ====\r\n\r\n /**\r\n * @dev Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.\r\n * @notice This function is for options that have WETH as the underlying asset.\r\n * @param optionToken The address of the option token to mint.\r\n * @param receiver The address which receives the minted option and redeem tokens.\r\n */\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n // Check to make sure we are minting a WETH call option.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Convert ethers into WETH, then send WETH to option contract in preparation of calling mintOptions().\r\n _depositEthSendWeth(address(optionToken));\r\n\r\n // Mint the option and redeem tokens.\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n\r\n emit WethConnectorMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\r\n * @notice This function is for options with WETH as the strike asset.\r\n * Burns option tokens, accepts ethers, and pushes out underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n // Require one of the option's assets to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n uint256 inputStrikes = msg.value;\r\n // Calculate quantity of optionTokens needed to burn.\r\n // An ether put option with strike price $300 has a \"base\" value of 300, and a \"quote\" value of 1.\r\n // To calculate how many options are needed to be burned, we need to cancel out the \"quote\" units.\r\n // The input strike quantity can be multiplied by the strike ratio to cancel out \"quote\" units.\r\n // 1 ether (quote units) * 300 (base units) / 1 (quote units) = 300 inputOptions\r\n uint256 inputOptions = inputStrikes.mul(optionToken.getBaseValue()).div(\r\n optionToken.getQuoteValue()\r\n );\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= inputOptions,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Wrap the ethers into WETH, and send the WETH to the option contract to prepare for calling exerciseOptions().\r\n _depositEthSendWeth(address(optionToken));\r\n\r\n // Send the option tokens required to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n\r\n // Burns the transferred option tokens, stores the strike asset (ether), and pushes underlyingTokens\r\n // to the receiver address.\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n inputOptions,\r\n new bytes(0)\r\n );\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * Burns option tokens, pulls strikeTokens, and pushes out ethers.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(exerciseQuantity)\r\n returns (uint256, uint256)\r\n {\r\n // Require one of the option's assets to be WETH.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(underlyingAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fails early if msg.sender does not have enough optionTokens.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fails early if msg.sender does not have enough strikeTokens.\r\n require(\r\n IERC20(strikeAddress).balanceOf(msg.sender) >= inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n\r\n // Send strikeTokens to option contract to prepare for calling exerciseOptions().\r\n IERC20(strikeAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n\r\n // Send the option tokens to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n // Burns the optionTokens sent, stores the strikeTokens sent, and pushes underlyingTokens\r\n // to this contract.\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n address(this),\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n\r\n // Converts the withdrawn WETH to ethers, then sends the ethers to the receiver address.\r\n _withdrawEthAndSend(receiver, exerciseQuantity);\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\r\n * @notice This function is for options that have WETH as the strike asset.\r\n * Converts WETH to ethers, and withdraws ethers to the receiver address.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity The quantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant nonZero(redeemQuantity) returns (uint256) {\r\n // Require strikeToken to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens.\r\n address redeemAddress = optionToken.redeemToken();\r\n require(\r\n IERC20(redeemAddress).balanceOf(msg.sender) >= redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeemTokens to option contract in preparation for calling redeemStrikeTokens().\r\n IERC20(redeemAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n\r\n // If options have not been exercised, there will be no strikeTokens to redeem, causing a revert.\r\n // Burns the redeem tokens that were sent to the contract, and withdraws the same quantity of WETH.\r\n // Sends the withdrawn WETH to this contract, so that it can be unwrapped prior to being sent to receiver.\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(address(this));\r\n\r\n // Unwrap the redeemed WETH and then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, redeemQuantity);\r\n\r\n emit WethConnectorRedeem(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * WETH underlyingTokens are converted to ethers before being sent to receiver.\r\n * The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(closeQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early is msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem and option tokens in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n // Call the closeOptions() function to burn option and redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, closeQuantity);\r\n\r\n emit WethConnectorClose(msg.sender, address(optionToken), inputOptions);\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options.\r\n * This function is for options with WETH as the underlying asset.\r\n * The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(unwindQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // If the option is not expired, fail early.\r\n // solhint-disable-next-line not-rely-on-time\r\n require(optionToken.getExpiryTime() < now, \"ERR_NOT_EXPIRED\");\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n // Call the closeOptions() function to burn redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them to ethers then send the ethers to the receiver.\r\n _withdrawEthAndSend(receiver, unwindQuantity);\r\n\r\n emit WethConnectorUnwind(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n // ==== WETH Operations ====\r\n\r\n /**\r\n * @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to \"to\".\r\n * @param to The address to send WETH ERC-20 tokens to.\r\n */\r\n function _depositEthSendWeth(address to) internal {\r\n // Deposit the ethers received from msg.value into the WETH contract.\r\n weth.deposit.value(msg.value)();\r\n\r\n // Send WETH.\r\n weth.transfer(to, msg.value);\r\n }\r\n\r\n /**\r\n * @dev Unwraps WETH to withrdaw ethers, which are then sent to the \"to\" address.\r\n * @param to The address to send withdrawn ethers to.\r\n * @param quantity The quantity of WETH to unwrap.\r\n */\r\n function _withdrawEthAndSend(address to, uint256 quantity) internal {\r\n // Withdraw ethers with weth.\r\n weth.withdraw(quantity);\r\n\r\n // Send ether.\r\n (bool success, ) = to.call.value(quantity)(\"\");\r\n\r\n // Revert is call is unsuccessful.\r\n require(success, \"ERR_SENDING_ETHER\");\r\n }\r\n}\r\n" + }, + "contracts/option/applications/factories/OptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Factory for deploying option contracts.\r\n * @author Primitive\r\n */\r\n\r\nimport { Option, SafeMath } from \"../../primitives/Option.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { OptionTemplateLib } from \"../../libraries/OptionTemplateLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { IOptionFactory } from \"../../interfaces/IOptionFactory.sol\";\r\n\r\ncontract OptionFactory is IOptionFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override optionTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the bytecode for the Option contract.\r\n */\r\n function deployOptionTemplate() public override {\r\n optionTemplate = OptionTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a create2 clone of the option template contract.\r\n * @param underlyingToken The address of the underlying ERC-20 token.\r\n * @param strikeToken The address of the strike ERC-20 token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp for option expiry.\r\n */\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override onlyOwner returns (address) {\r\n require(optionTemplate != address(0x0), \"ERR_NO_DEPLOYED_TEMPLATE\");\r\n\r\n // Calculates the salt for create2.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n\r\n // Deploys the clone using the template contract and calculated salt.\r\n address optionAddress = CloneLib.create2Clone(\r\n optionTemplate,\r\n uint256(salt)\r\n );\r\n\r\n // Sets the initial state of the option with the parameter arguments.\r\n Option(optionAddress).initialize(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Only the factory can call the initRedeemToken function to set the redeem token address.\r\n * This function is only callable by the Registry contract (the owner).\r\n */\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n Option(optionAddress).initRedeemToken(redeemAddress);\r\n }\r\n\r\n /**\r\n * @dev Calculates the option token's address using the five option parameters.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override view returns (address) {\r\n // Calculates the salt using the parameter arguments and the salt used in the template contract\r\n // create2 deployment.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n address optionAddress = CloneLib.deriveInstanceAddress(\r\n optionTemplate,\r\n salt\r\n );\r\n return optionAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Option.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Vanilla Option Token\r\n * @notice This is a low-level contract that is designed to be interacted with by\r\n * other sophisticated smart contracts which have important safety checks,\r\n * and not by externally owned accounts.\r\n * Incorrect usage through direct interaction from externally owned accounts\r\n * can lead to the loss of funds.\r\n * Use Primitive's Trader.sol contract to interact with this contract safely.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { IFlash } from \"../interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\ncontract Option is IOption, ERC20 {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n struct OptionParameters {\r\n address underlyingToken;\r\n address strikeToken;\r\n uint256 base;\r\n uint256 quote;\r\n uint256 expiry;\r\n }\r\n\r\n OptionParameters public optionParameters;\r\n\r\n // solhint-disable-next-line const-name-snakecase\r\n uint256 public override underlyingCache;\r\n uint256 public override strikeCache;\r\n address public override redeemToken;\r\n address public override factory;\r\n bool private _notEntered;\r\n\r\n string public constant name = \"Primitive V1 Option\";\r\n string public constant symbol = \"PRM\";\r\n uint8 public constant decimals = 18;\r\n\r\n event Mint(address indexed from, uint256 outOptions, uint256 outRedeems);\r\n event Exercise(\r\n address indexed from,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event Redeem(address indexed from, uint256 inRedeems);\r\n event Close(address indexed from, uint256 outUnderlyings);\r\n event UpdatedCacheBalances(uint256 underlyingCache, uint256 strikeCache);\r\n event InitializedRedeem(\r\n address indexed caller,\r\n address indexed redeemToken\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the intial state for the contract. Only called immediately after deployment.\r\n * @param underlyingToken The address of the underlying asset.\r\n * @param strikeToken The address of the strike asset.\r\n * @param base The quantity of underlying tokens per quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per base amount of underlying tokens.\r\n * @param expiry The expiration date for the option.\r\n */\r\n function initialize(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= block.timestamp, \"ERR_EXPIRY\");\r\n factory = msg.sender;\r\n optionParameters = OptionParameters(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n _notEntered = true;\r\n }\r\n\r\n modifier notExpired {\r\n // solhint-disable-next-line not-rely-on-time\r\n require(isNotExpired(), \"ERR_EXPIRED\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Prevents a contract from calling itself, directly or indirectly.\r\n * Calling a `nonReentrant` function from another `nonReentrant`\r\n * function is not supported. It is possible to prevent this from happening\r\n * by making the `nonReentrant` function external, and make it call a\r\n * `private` function that does the actual work.\r\n */\r\n modifier nonReentrant() {\r\n // On the first call to nonReentrant, _notEntered will be true\r\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\r\n\r\n // Any calls to nonReentrant after this point will fail\r\n _notEntered = false;\r\n\r\n _;\r\n\r\n // By storing the original value once again, a refund is triggered (see\r\n // https://eips.ethereum.org/EIPS/eip-2200)\r\n _notEntered = true;\r\n }\r\n\r\n /**\r\n * @dev Called after the option contract is initialized, and a redeem token has been deployed.\r\n * @notice Entangles a redeem token to this option contract permanently.\r\n * @param redeemToken_ The address of the redeem token.\r\n */\r\n function initRedeemToken(address redeemToken_) external override {\r\n require(msg.sender == factory, \"ERR_NOT_OWNER\");\r\n require(redeemToken == address(0x0), \"ERR_REDEEM_INITIALIZED\");\r\n redeemToken = redeemToken_;\r\n emit InitializedRedeem(msg.sender, redeemToken_);\r\n }\r\n\r\n /**\r\n * @dev Updates the cached balances to match the actual current balances.\r\n * Attempting to transfer tokens to this contract directly, in a separate transaction,\r\n * is incorrect and could result in loss of funds. Calling this function will permanently lock any excess\r\n * underlying or strike tokens which were erroneously sent to this contract.\r\n */\r\n function updateCacheBalances() external override nonReentrant {\r\n _updateCacheBalances(\r\n IERC20(optionParameters.underlyingToken).balanceOf(address(this)),\r\n IERC20(optionParameters.strikeToken).balanceOf(address(this))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Sets the cache balances to new values.\r\n */\r\n function _updateCacheBalances(\r\n uint256 underlyingBalance,\r\n uint256 strikeBalance\r\n ) private {\r\n underlyingCache = underlyingBalance;\r\n strikeCache = strikeBalance;\r\n emit UpdatedCacheBalances(underlyingBalance, strikeBalance);\r\n }\r\n\r\n /* === STATE MUTABLE === */\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Mints optionTokens at a 1:1 ratio to underlyingToken deposits. Also mints Redeem tokens at a base:quote ratio.\r\n * @notice inUnderlyings = outOptionTokens. inUnderlying / strike ratio = outRedeemTokens.\r\n * @param receiver The newly minted tokens are sent to the receiver address.\r\n */\r\n function mintOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n notExpired\r\n returns (uint256, uint256)\r\n {\r\n // Save on gas because this variable is used twice.\r\n uint256 underlyingBalance = IERC20(optionParameters.underlyingToken)\r\n .balanceOf(address(this));\r\n\r\n // Mint optionTokens equal to the difference between current and cached balance of underlyingTokens.\r\n uint256 inUnderlyings = underlyingBalance.sub(underlyingCache);\r\n\r\n // Calculate the quantity of redeemTokens to mint.\r\n uint256 outRedeems = inUnderlyings.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n require(outRedeems > 0, \"ERR_ZERO\");\r\n\r\n // Mint the optionTokens and redeemTokens.\r\n IRedeem(redeemToken).mint(receiver, outRedeems);\r\n _mint(receiver, inUnderlyings);\r\n\r\n // Update the underlyingCache.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Mint(msg.sender, inUnderlyings, outRedeems);\r\n return (inUnderlyings, outRedeems);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Sends out underlyingTokens then checks to make sure they are returned or paid for.\r\n * This function enables flash exercises and flash loans. Only smart contracts who implement\r\n * their own IFlash interface should be calling this function to initiate a flash exercise/loan.\r\n * @notice If the underlyingTokens are returned, only the fee has to be paid.\r\n * @param receiver The outUnderlyings are sent to the receiver address.\r\n * @param outUnderlyings Quantity of underlyingTokens to safeTransfer to receiver optimistically.\r\n * @param data Passing in any abritrary data will trigger the flash exercise callback function.\r\n */\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override nonReentrant notExpired returns (uint256, uint256) {\r\n // Store the cached balances and token addresses in memory.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n //(uint256 _underlyingCache, uint256 _strikeCache) = getCacheBalances();\r\n\r\n // Require outUnderlyings > 0 and balance of underlyings >= outUnderlyings.\r\n require(outUnderlyings > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(underlyingToken).balanceOf(address(this)) >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Optimistically safeTransfer out underlyingTokens.\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n if (data.length > 0)\r\n IFlash(receiver).primitiveFlash(msg.sender, outUnderlyings, data);\r\n\r\n // Store in memory for gas savings.\r\n uint256 strikeBalance = IERC20(optionParameters.strikeToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n\r\n // Calculate the differences.\r\n uint256 inStrikes = strikeBalance.sub(strikeCache);\r\n uint256 inUnderlyings = underlyingBalance.sub(\r\n underlyingCache.sub(outUnderlyings)\r\n ); // will be > 0 if underlyingTokens are returned.\r\n\r\n // Either underlyingTokens or strikeTokens must be sent into the contract.\r\n require(inStrikes > 0 || inUnderlyings > 0, \"ERR_ZERO\");\r\n\r\n // Calculate the remaining amount of underlyingToken that needs to be paid for.\r\n uint256 remainder = inUnderlyings > outUnderlyings\r\n ? 0\r\n : outUnderlyings.sub(inUnderlyings);\r\n\r\n // Calculate the expected payment of strikeTokens.\r\n uint256 payment = remainder.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n\r\n // Assumes the cached optionToken balance is 0, which is what it should be.\r\n uint256 inOptions = balanceOf(address(this));\r\n\r\n // Enforce the invariants.\r\n require(inStrikes >= payment, \"ERR_STRIKES_INPUT\");\r\n require(inOptions >= remainder, \"ERR_OPTIONS_INPUT\");\r\n\r\n // Burn the optionTokens at a 1:1 ratio to outUnderlyings.\r\n _burn(address(this), inOptions);\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeBalance);\r\n emit Exercise(msg.sender, outUnderlyings, inStrikes);\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Burns redeemTokens to withdraw strikeTokens at a ratio of 1:1.\r\n * @notice inRedeemTokens = outStrikeTokens. Only callable when strikeTokens are in the contract.\r\n * @param receiver The inRedeems quantity of strikeTokens are sent to the receiver address.\r\n */\r\n function redeemStrikeTokens(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (uint256)\r\n {\r\n address strikeToken = optionParameters.strikeToken;\r\n address _redeemToken = redeemToken;\r\n uint256 strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // Difference between redeemTokens balance and cache.\r\n require(inRedeems > 0, \"ERR_ZERO\");\r\n require(strikeBalance >= inRedeems, \"ERR_BAL_STRIKE\");\r\n\r\n // Burn redeemTokens in the contract. Send strikeTokens to receiver.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(strikeToken).safeTransfer(receiver, inRedeems);\r\n\r\n // Current balances.\r\n strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingCache, strikeBalance);\r\n emit Redeem(msg.sender, inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * If the option has expired, burn redeem tokens to withdraw underlying tokens.\r\n * If the option is not expired, burn option and redeem tokens to withdraw underlying tokens.\r\n * @notice inRedeemTokens / strike ratio = outUnderlyingTokens && inOptionTokens >= outUnderlyingTokens.\r\n * @param receiver The outUnderlyingTokens are sent to the receiver address.\r\n */\r\n function closeOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Stores addresses and balances locally for gas savings.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n address _redeemToken = redeemToken;\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 optionBalance = balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // The quantity of underlyingToken to send out it still determined by the quantity of inRedeems.\r\n // inRedeems is in units of strikeTokens, which is converted to underlyingTokens\r\n // by multiplying inRedeems by the strike ratio, which is base / quote.\r\n // This outUnderlyings quantity is checked against inOptions.\r\n // inOptions must be greater than or equal to outUnderlyings (1 option burned per 1 underlying purchased).\r\n // optionBalance must be greater than or equal to outUnderlyings.\r\n // Neither inRedeems or inOptions can be zero.\r\n uint256 outUnderlyings = inRedeems.mul(optionParameters.base).div(\r\n optionParameters.quote\r\n );\r\n\r\n // Assumes the cached balance is 0 so inOptions = balance of optionToken.\r\n // If optionToken is expired, optionToken does not need to be sent in. Only redeemToken.\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 inOptions = isNotExpired() ? optionBalance : outUnderlyings;\r\n require(inRedeems > 0 && inOptions > 0, \"ERR_ZERO\");\r\n require(\r\n inOptions >= outUnderlyings && underlyingBalance >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Burn optionTokens. optionTokens are only sent into contract when not expired.\r\n // solhint-disable-next-line not-rely-on-time\r\n if (isNotExpired()) {\r\n _burn(address(this), inOptions);\r\n }\r\n\r\n // Send underlyingTokens to user.\r\n // Burn redeemTokens held in the contract.\r\n // User does not receive extra underlyingTokens if there was extra optionTokens in the contract.\r\n // User receives outUnderlyings proportional to inRedeems.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n\r\n // Current balances of underlyingToken and redeemToken.\r\n underlyingBalance = IERC20(underlyingToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Close(msg.sender, outUnderlyings);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /* === VIEW === */\r\n\r\n /**\r\n * @dev Returns the previously saved balances of underlying and strike tokens.\r\n */\r\n function getCacheBalances()\r\n public\r\n override\r\n view\r\n returns (uint256, uint256)\r\n {\r\n return (underlyingCache, strikeCache);\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying, strike, and redeem token addresses.\r\n */\r\n function getAssetAddresses()\r\n public\r\n override\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n )\r\n {\r\n return (\r\n optionParameters.underlyingToken,\r\n optionParameters.strikeToken,\r\n redeemToken\r\n );\r\n }\r\n\r\n /**\r\n * @dev Returns the strike token address.\r\n */\r\n function getStrikeTokenAddress() public override view returns (address) {\r\n return optionParameters.strikeToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying token address.\r\n */\r\n function getUnderlyingTokenAddress()\r\n public\r\n override\r\n view\r\n returns (address)\r\n {\r\n return optionParameters.underlyingToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the base value option parameter.\r\n */\r\n function getBaseValue() public override view returns (uint256) {\r\n return optionParameters.base;\r\n }\r\n\r\n /**\r\n * @dev Returns the quote value option parameter.\r\n */\r\n function getQuoteValue() public override view returns (uint256) {\r\n return optionParameters.quote;\r\n }\r\n\r\n /**\r\n * @dev Returns the expiry timestamp option parameter.\r\n */\r\n function getExpiryTime() public override view returns (uint256) {\r\n return optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the option parameters and redeem token address.\r\n */\r\n function getParameters()\r\n public\r\n override\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n )\r\n {\r\n OptionParameters memory _optionParameters = optionParameters;\r\n _underlyingToken = _optionParameters.underlyingToken;\r\n _strikeToken = _optionParameters.strikeToken;\r\n _redeemToken = redeemToken;\r\n _base = _optionParameters.base;\r\n _quote = _optionParameters.quote;\r\n _expiry = _optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Internal function to check if the option is expired.\r\n */\r\n function isNotExpired() internal view returns (bool) {\r\n return optionParameters.expiry >= block.timestamp;\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IRedeem is IERC20 {\r\n function optionToken() external view returns (address);\r\n\r\n function factory() external view returns (address);\r\n\r\n function mint(address user, uint256 amount) external;\r\n\r\n function burn(address user, uint256 amount) external;\r\n\r\n function initialize(address _factory, address _optionToken) external;\r\n}\r\n" + }, + "contracts/option/interfaces/IFlash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IFlash {\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external;\r\n}\r\n" + }, + "contracts/option/primitives/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @dev Modifies name, symbol, and decimals by deleting them. Implemented as constants in parent contract.\r\n */\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\n/**\r\n * @dev Implementation of the {IERC20} interface.\r\n *\r\n * This implementation is agnostic to the way tokens are created. This means\r\n * that a supply mechanism has to be added in a derived contract using {_mint}.\r\n * For a generic mechanism see {ERC20PresetMinterPauser}.\r\n *\r\n * TIP: For a detailed writeup see our guide\r\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\r\n * to implement supply mechanisms].\r\n *\r\n * We have followed general OpenZeppelin guidelines: functions revert instead\r\n * of returning `false` on failure. This behavior is nonetheless conventional\r\n * and does not conflict with the expectations of ERC20 applications.\r\n *\r\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\r\n * This allows applications to reconstruct the allowance for all accounts just\r\n * by listening to said events. Other implementations of the EIP may not emit\r\n * these events, as it isn't required by the specification.\r\n *\r\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\r\n * functions have been added to mitigate the well-known issues around setting\r\n * allowances. See {IERC20-approve}.\r\n */\r\ncontract ERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n /**\r\n * @dev See {IERC20-totalSupply}.\r\n */\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-balanceOf}.\r\n */\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transfer}.\r\n *\r\n * Requirements:\r\n *\r\n * - `recipient` cannot be the zero address.\r\n * - the caller must have a balance of at least `amount`.\r\n */\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-allowance}.\r\n */\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-approve}.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transferFrom}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance. This is not\r\n * required by the EIP. See the note at the beginning of {ERC20};\r\n *\r\n * Requirements:\r\n * - `sender` and `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n * - the caller must have allowance for ``sender``'s tokens of at least\r\n * `amount`.\r\n */\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override returns (bool) {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically increases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n * - `spender` must have allowance for the caller of at least\r\n * `subtractedValue`.\r\n */\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Moves tokens `amount` from `sender` to `recipient`.\r\n *\r\n * This is internal function is equivalent to {transfer}, and can be used to\r\n * e.g. implement automatic token fees, slashing mechanisms, etc.\r\n *\r\n * Emits a {Transfer} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `sender` cannot be the zero address.\r\n * - `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n */\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\r\n * the total supply.\r\n *\r\n * Emits a {Transfer} event with `from` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `to` cannot be the zero address.\r\n */\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n /**\r\n * @dev Destroys `amount` tokens from `account`, reducing the\r\n * total supply.\r\n *\r\n * Emits a {Transfer} event with `to` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `account` cannot be the zero address.\r\n * - `account` must have at least `amount` tokens.\r\n */\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n /**\r\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\r\n *\r\n * This is internal function is equivalent to `approve`, and can be used to\r\n * e.g. set automatic allowances for certain subsystems, etc.\r\n *\r\n * Emits an {Approval} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `owner` cannot be the zero address.\r\n * - `spender` cannot be the zero address.\r\n */\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n /**\r\n * @dev Sets {decimals} to a value other than the default one of 18.\r\n *\r\n * WARNING: This function should only be called from the constructor. Most\r\n * applications that interact with token contracts will not expect\r\n * {decimals} to ever change, and may work incorrectly if it does.\r\n */\r\n /* function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n } */\r\n\r\n // ======= WARNING: ADDED FUNCTIONS =========\r\n\r\n /* function _setupName(string memory name_) internal {\r\n _name = name_;\r\n }\r\n\r\n function _setupSymbol(string memory symbol_) internal {\r\n _symbol = symbol_;\r\n } */\r\n\r\n // ======= END ADDED FUNCTIONS =========\r\n\r\n /**\r\n * @dev Hook that is called before any transfer of tokens. This includes\r\n * minting and burning.\r\n *\r\n * Calling conditions:\r\n *\r\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\r\n * will be to transferred to `to`.\r\n * - when `from` is zero, `amount` tokens will be minted for `to`.\r\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\r\n * - `from` and `to` are never both zero.\r\n *\r\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r\n */\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {}\r\n}\r\n" + }, + "contracts/option/libraries/OptionTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Option } from \"../primitives/Option.sol\";\r\n\r\nlibrary OptionTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _OPTION_SALT = 0x56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd87; // keccak(\"primitive-option\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function OPTION_SALT() internal pure returns (bytes32) {\r\n return _OPTION_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Option.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Option).creationCode;\r\n implementationAddress = Create2.deploy(0, _OPTION_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Create2.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address) {\n address addr;\n require(address(this).balance >= amount, \"Create2: insufficient balance\");\n require(bytecode.length != 0, \"Create2: bytecode length is zero\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), \"Create2: Failed on deploy\");\n return addr;\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address) {\n bytes32 _data = keccak256(\n abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)\n );\n return address(bytes20(_data << 96));\n }\n}\n" + }, + "contracts/option/applications/NullCloneConstructor.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ncontract NullCloneConstructor {\r\n // solhint-disable-next-line no-empty-blocks\r\n function cloneConstructor(bytes memory consData) public {\r\n // blank\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/CloneLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @title Create2 Clone Factory Library\r\n * @author Alan Lu, Gnosis.\r\n * Raymond Pulver IV.\r\n */\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\n\r\nlibrary CloneLib {\r\n /**\r\n * @dev Calls internal creation computation function.\r\n */\r\n function computeCreationCode(address target)\r\n internal\r\n view\r\n returns (bytes memory clone)\r\n {\r\n clone = computeCreationCode(address(this), target);\r\n }\r\n\r\n /**\r\n * @dev Computes the Clone's creation code.\r\n */\r\n function computeCreationCode(address deployer, address target)\r\n internal\r\n pure\r\n returns (bytes memory clone)\r\n {\r\n bytes memory consData = abi.encodeWithSignature(\r\n \"cloneConstructor(bytes)\",\r\n new bytes(0)\r\n );\r\n clone = new bytes(99 + consData.length);\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n mstore(\r\n add(clone, 0x20),\r\n 0x3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe\r\n )\r\n mstore(\r\n add(clone, 0x2d),\r\n mul(deployer, 0x01000000000000000000000000)\r\n )\r\n mstore(\r\n add(clone, 0x41),\r\n 0x5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be\r\n )\r\n mstore(add(clone, 0x60), mul(target, 0x01000000000000000000000000))\r\n mstore(\r\n add(clone, 116),\r\n 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000\r\n )\r\n }\r\n for (uint256 i = 0; i < consData.length; i++) {\r\n clone[i + 99] = consData[i];\r\n }\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(address target, bytes32 salt)\r\n internal\r\n view\r\n returns (address)\r\n {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(target))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(\r\n address from,\r\n address target,\r\n bytes32 salt\r\n ) internal pure returns (address) {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(from, target)),\r\n from\r\n );\r\n }\r\n\r\n /**\r\n * @dev Computs creation code, and then instantiates it with create2.\r\n */\r\n function create2Clone(address target, uint256 saltNonce)\r\n internal\r\n returns (address result)\r\n {\r\n bytes memory clone = computeCreationCode(target);\r\n bytes32 salt = bytes32(saltNonce);\r\n\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n let len := mload(clone)\r\n let data := add(clone, 0x20)\r\n result := create2(0, data, len, salt)\r\n }\r\n\r\n require(result != address(0), \"ERR_CREATE2_FAIL\");\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IOptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IOptionFactory {\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external;\r\n\r\n function deployOptionTemplate() external;\r\n\r\n function optionTemplate() external returns (address);\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n}\r\n" + }, + "contracts/option/applications/factories/RedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Factory Contract for Redeem Tokens.\r\n * @notice Uses cloning technology on a deployed template contract.\r\n * @author Primitive\r\n */\r\n\r\nimport { Redeem, SafeMath } from \"../../primitives/Redeem.sol\";\r\nimport { RedeemTemplateLib } from \"../../libraries/RedeemTemplateLib.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { IRedeemFactory } from \"../../interfaces/IRedeemFactory.sol\";\r\n\r\ncontract RedeemFactory is IRedeemFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override redeemTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the full bytecode of the Redeem contract to be used as a template for clones.\r\n */\r\n function deployRedeemTemplate() public override {\r\n redeemTemplate = RedeemTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a cloned instance of the template Redeem contract.\r\n * @param optionToken The address of the option token which this redeem clone will be paired with.\r\n * @return redeemAddress The address of the deployed Redeem token clone.\r\n */\r\n function deployClone(address optionToken)\r\n external\r\n override\r\n onlyOwner\r\n returns (address)\r\n {\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n RedeemTemplateLib.REDEEM_SALT(),\r\n owner(),\r\n optionToken\r\n )\r\n );\r\n address redeemAddress = CloneLib.create2Clone(\r\n redeemTemplate,\r\n uint256(salt)\r\n );\r\n Redeem(redeemAddress).initialize(owner(), optionToken);\r\n return redeemAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Redeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Redeem Token\r\n * @notice A token that is redeemable for it's paird option token's assets.\r\n * @author Primitive\r\n */\r\n\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Redeem is IRedeem, ERC20 {\r\n using SafeMath for uint256;\r\n\r\n address public override factory;\r\n address public override optionToken;\r\n\r\n string public constant name = \"Primitive V1 Redeem\";\r\n string public constant symbol = \"RDM\";\r\n uint8 public constant decimals = 18;\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the initial state for the redeem token. Called only once and immediately after deployment.\r\n * @param factory_ The address of the factory contract which handles the deployment.\r\n * @param optionToken_ The address of the option token which this redeem token will be paired with.\r\n */\r\n function initialize(address factory_, address optionToken_)\r\n public\r\n override\r\n {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n factory = factory_;\r\n optionToken = optionToken_;\r\n }\r\n\r\n /**\r\n * @dev Mints redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to mint redeem tokens to.\r\n * @param amount The quantity of redeem tokens to mint.\r\n */\r\n function mint(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _mint(to, amount);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to burn redeem tokens from.\r\n * @param amount The quantity of redeem tokens to burn.\r\n */\r\n function burn(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _burn(to, amount);\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/RedeemTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Redeem } from \"../primitives/Redeem.sol\";\r\n\r\nlibrary RedeemTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _REDEEM_SALT = 0xe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e2; // keccak(\"primitive-redeem\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function REDEEM_SALT() internal pure returns (bytes32) {\r\n return _REDEEM_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Redeem.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Redeem).creationCode;\r\n implementationAddress = Create2.deploy(0, _REDEEM_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRedeemFactory {\r\n function deployClone(address optionToken) external returns (address);\r\n\r\n function deployRedeemTemplate() external;\r\n\r\n function redeemTemplate() external returns (address);\r\n}\r\n" + }, + "contracts/option/applications/Registry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Registry Contract for Deployed Options.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../interfaces/IRegistry.sol\";\r\nimport { IOptionFactory } from \"../interfaces/IOptionFactory.sol\";\r\nimport { IRedeemFactory } from \"../interfaces/IRedeemFactory.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { Pausable } from \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Registry is IRegistry, Ownable, Pausable, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address public override optionFactory;\r\n address public override redeemFactory;\r\n\r\n mapping(address => bool) private verifiedTokens;\r\n mapping(uint256 => bool) private verifiedExpiries;\r\n address[] public allOptionClones;\r\n\r\n event UpdatedOptionFactory(address indexed optionFactory_);\r\n event UpdatedRedeemFactory(address indexed redeemFactory_);\r\n event VerifiedToken(address indexed token);\r\n event VerifiedExpiry(uint256 expiry);\r\n event UnverifiedToken(address indexed token);\r\n event UnverifiedExpiry(uint256 expiry);\r\n event DeployedOptionClone(\r\n address indexed from,\r\n address indexed optionAddress,\r\n address indexed redeemAddress\r\n );\r\n\r\n constructor() public {\r\n transferOwnership(msg.sender);\r\n }\r\n\r\n /**\r\n * @dev Pauses the deployOption function.\r\n */\r\n function pauseDeployments() external override onlyOwner {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @dev Unpauses the deployOption function.\r\n */\r\n function unpauseDeployments() external override onlyOwner {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @dev Sets the option factory contract to use for deploying clones.\r\n * @param optionFactory_ The address of the option factory.\r\n */\r\n function setOptionFactory(address optionFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n optionFactory = optionFactory_;\r\n emit UpdatedOptionFactory(optionFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the redeem factory contract to use for deploying clones.\r\n * @param redeemFactory_ The address of the redeem factory.\r\n */\r\n function setRedeemFactory(address redeemFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n redeemFactory = redeemFactory_;\r\n emit UpdatedRedeemFactory(redeemFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets an ERC-20 token verification status to true.\r\n * @notice A \"verified\" token is a standard ERC-20 token that we have tested with the option contract.\r\n * An example of an \"unverified\" token is a non-standard ERC-20 token which has not been tested.\r\n */\r\n function verifyToken(address tokenAddress) external override onlyOwner {\r\n require(tokenAddress != address(0x0), \"ERR_ZERO_ADDRESS\");\r\n verifiedTokens[tokenAddress] = true;\r\n emit VerifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets a verified token's verification status to false.\r\n */\r\n function unverifyToken(address tokenAddress) external override onlyOwner {\r\n verifiedTokens[tokenAddress] = false;\r\n emit UnverifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to true.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function verifyExpiry(uint256 expiry) external override onlyOwner {\r\n require(expiry >= now, \"ERR_EXPIRED_TIMESTAMP\");\r\n verifiedExpiries[expiry] = true;\r\n emit VerifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to false.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function unverifyExpiry(uint256 expiry) external override onlyOwner {\r\n verifiedExpiries[expiry] = false;\r\n emit UnverifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Deploys an option contract clone with create2.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the deployed option clone.\r\n */\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override nonReentrant whenNotPaused returns (address) {\r\n // Validation checks for option parameters.\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= now, \"ERR_EXPIRY\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(\r\n underlyingToken != address(0x0) && strikeToken != address(0x0),\r\n \"ERR_ZERO_ADDRESS\"\r\n );\r\n\r\n // Deploy option and redeem contract clones.\r\n address optionAddress = IOptionFactory(optionFactory).deployClone(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n address redeemAddress = IRedeemFactory(redeemFactory).deployClone(\r\n optionAddress\r\n );\r\n\r\n // Add the clone to the allOptionClones address array.\r\n allOptionClones.push(optionAddress);\r\n\r\n // Initialize the new option contract's paired redeem token.\r\n IOptionFactory(optionFactory).initRedeemToken(\r\n optionAddress,\r\n redeemAddress\r\n );\r\n emit DeployedOptionClone(msg.sender, optionAddress, redeemAddress);\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Calculates the option address deployed with create2 using the parameter arguments.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = IOptionFactory(optionFactory)\r\n .calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Checks an option address to see if it has verified assets and expiry time.\r\n * @param optionAddress The address of the option token.\r\n * @return bool If the option has verified underlying and strike tokens, and expiry time.\r\n */\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n override\r\n view\r\n returns (bool)\r\n {\r\n IOption option = IOption(optionAddress);\r\n address underlyingToken = option.getUnderlyingTokenAddress();\r\n address strikeToken = option.getStrikeTokenAddress();\r\n uint256 expiry = option.getExpiryTime();\r\n bool verifiedUnderlying = isVerifiedToken(underlyingToken);\r\n bool verifiedStrike = isVerifiedToken(strikeToken);\r\n bool verifiedExpiry = isVerifiedExpiry(expiry);\r\n return verifiedUnderlying && verifiedStrike && verifiedExpiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the length of the allOptionClones address array.\r\n */\r\n function getAllOptionClonesLength() public view returns (uint256) {\r\n return allOptionClones.length;\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedTokens private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedToken(address tokenAddress) public view returns (bool) {\r\n return verifiedTokens[tokenAddress];\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedExpiries private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedExpiry(uint256 expiry) public view returns (bool) {\r\n return verifiedExpiries[expiry];\r\n }\r\n\r\n /**\r\n * @dev Gets the option address and returns address zero if not yet deployed.\r\n * @notice Will calculate the option address using the parameter arguments.\r\n * Checks the code size of the address to see if the contract has been deployed yet.\r\n * If contract has not been deployed, returns address zero.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n uint32 size = checkCodeSize(optionAddress);\r\n if (size > 0) {\r\n return optionAddress;\r\n } else {\r\n return address(0x0);\r\n }\r\n }\r\n\r\n /**\r\n * @dev Checks the code size of a target address and returns the uint32 size.\r\n * @param target The address to check code size.\r\n */\r\n function checkCodeSize(address target) private view returns (uint32) {\r\n uint32 size;\r\n assembly {\r\n size := extcodesize(target)\r\n }\r\n return size;\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Pausable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\ncontract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor () internal {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n */\n modifier whenNotPaused() {\n require(!_paused, \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n */\n modifier whenPaused() {\n require(_paused, \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "contracts/option/extensions/Trader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Trader\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { ITrader } from \"../interfaces/ITrader.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { TraderLib } from \"../libraries/TraderLib.sol\";\r\n\r\ncontract Trader is ITrader, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address payable public weth;\r\n\r\n event TraderMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event TraderExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event TraderRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event TraderClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event TraderUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n constructor(address payable _weth) public {\r\n weth = _weth;\r\n }\r\n\r\n /**\r\n * @dev Mint options at a 1:1 ratio with deposited underlying tokens.\r\n * @notice Also mints redeems at a strike ratio to the deposited underlyings.\r\n * Warning: Calls msg.sender with safeTransferFrom.\r\n * @param optionToken The address of the option contract.\r\n * @param mintQuantity Quantity of options to mint and underlyingToken to deposit.\r\n * @param receiver The newly minted options and redeems are sent to the receiver address.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n mintQuantity,\r\n receiver\r\n );\r\n emit TraderMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 inStrikes, uint256 inOptions) = TraderLib.safeExercise(\r\n optionToken,\r\n exerciseQuantity,\r\n receiver\r\n );\r\n emit TraderExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inStrikes\r\n );\r\n\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inRedeems = outStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256) {\r\n uint256 inRedeems = TraderLib.safeRedeem(\r\n optionToken,\r\n redeemQuantity,\r\n receiver\r\n );\r\n emit TraderRedeem(msg.sender, address(optionToken), inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inOptions = inRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeClose(optionToken, closeQuantity, receiver);\r\n emit TraderClose(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens and redeemTokens are sent to the receiver address.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeUnwind(optionToken, unwindQuantity, receiver);\r\n emit TraderUnwind(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "contracts/test/Flash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Test Flash Exercise contract\r\n * @author Primitive\r\n */\r\n\r\n/**\r\n * A flash exercise is initiated by the exerciseOptions() function in the Option.sol contract.\r\n * Warning: Only correctly implemented wrapper smart contracts can safely execute these flash features.\r\n * Underlying tokens will be sent to the msg.sender of the exerciseOptions() call first.\r\n * The msg.sender should be a smart contract that implements the IFlash interface, which has a single\r\n * function: primitiveFlash().\r\n * The callback function primitiveFlash() can be triggered by passing in any arbritrary data to the\r\n * exerciseOptions() function. If the length of the data is greater than 0, it triggers the callback.\r\n * The implemented primitiveFlash() callback is where customized operations can be undertaken using the\r\n * underlying tokens received from the flash exercise.\r\n * After the callback function (whether its called or not), the exerciseOptions() function checks to see\r\n * if it has been paid the correct amount of strike and option tokens (an actual exercise of the option),\r\n * or if it has received the same quantity of underlying tokens back (a flash loan).\r\n */\r\n\r\nimport { IOption } from \"../option/interfaces/IOption.sol\";\r\nimport { IFlash } from \"../option/interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\n\r\ncontract Flash is IFlash {\r\n using SafeMath for uint256;\r\n\r\n address public optionToken;\r\n\r\n event FlashExercise(address indexed from);\r\n\r\n constructor(address _optionToken) public {\r\n optionToken = _optionToken;\r\n }\r\n\r\n function goodFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(1)\r\n );\r\n }\r\n\r\n function badFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n // bytes(2) will cause our implemented flash exercise to fail\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(2)\r\n );\r\n }\r\n\r\n /**\r\n * @dev An implemented primitiveFlash callback function that matches the interface in Option.sol.\r\n * @notice Calling the exerciseOptions() function in the Option contract will trigger this callback function.\r\n * @param receiver The account which receives the underlying tokens.\r\n * @param outUnderlyings The quantity of underlying tokens received as a flash loan.\r\n * @param data Any data that will be passed as an argument to the original exerciseOptions() call.\r\n */\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override {\r\n // Get the underlying token address.\r\n address underlyingToken = IOption(optionToken)\r\n .getUnderlyingTokenAddress();\r\n // In our test case we pass in the data param with bytes(1).\r\n bool good = keccak256(abi.encodePacked(data)) ==\r\n keccak256(abi.encodePacked(new bytes(1)));\r\n // If the flash exercise went through, we return the loaned underlyings.\r\n if (good) {\r\n IERC20(underlyingToken).transfer(optionToken, outUnderlyings);\r\n }\r\n emit FlashExercise(receiver);\r\n }\r\n}\r\n" + }, + "contracts/test/OptionTest.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Option test contract.\r\n * @author Primitive\r\n */\r\n\r\nimport \"../option/primitives/Option.sol\";\r\n\r\ncontract OptionTest is Option {\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public Option() {}\r\n\r\n function setExpiry(uint256 expiry) public {\r\n optionParameters.expiry = expiry;\r\n }\r\n\r\n function setRedeemToken(address redeem) public {\r\n redeemToken = redeem;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/BadERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\ninterface IERC20 {\r\n function totalSupply() external view returns (uint256);\r\n\r\n function balanceOf(address account) external view returns (uint256);\r\n\r\n function transfer(address recipient, uint256 amount) external;\r\n\r\n function allowance(address owner, address spender)\r\n external\r\n view\r\n returns (uint256);\r\n\r\n function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) external;\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\ncontract BadERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n string private _name;\r\n string private _symbol;\r\n uint8 private _decimals;\r\n\r\n constructor(string memory name, string memory symbol) public {\r\n _name = name;\r\n _symbol = symbol;\r\n _decimals = 18;\r\n }\r\n\r\n function name() public view returns (string memory) {\r\n return _name;\r\n }\r\n\r\n function symbol() public view returns (string memory) {\r\n return _symbol;\r\n }\r\n\r\n function decimals() public view returns (uint8) {\r\n return _decimals;\r\n }\r\n\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n }\r\n\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n function mint(address account, uint256 amount) public {\r\n _mint(account, amount);\r\n }\r\n\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n }\r\n\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n }\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {\r\n // do nothing\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract TestERC20 is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/USDC.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract USDC is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/WETH9.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\n// Copyright (C) 2015, 2016, 2017 Dapphub\r\n\r\n// This program is free software: you can redistribute it and/or modify\r\n// it under the terms of the GNU General Public License as published by\r\n// the Free Software Foundation, either version 3 of the License, or\r\n// (at your option) any later version.\r\n\r\n// This program is distributed in the hope that it will be useful,\r\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n// GNU General Public License for more details.\r\n\r\n// You should have received a copy of the GNU General Public License\r\n// along with this program. If not, see .\r\n\r\npragma solidity ^0.6.2;\r\n\r\ncontract WETH9 {\r\n string public name = \"Wrapped Ether\";\r\n string public symbol = \"WETH\";\r\n uint8 public decimals = 18;\r\n\r\n event Approval(address indexed src, address indexed guy, uint256 wad);\r\n event Transfer(address indexed src, address indexed dst, uint256 wad);\r\n event Deposit(address indexed dst, uint256 wad);\r\n event Withdrawal(address indexed src, uint256 wad);\r\n\r\n mapping(address => uint256) public balanceOf;\r\n mapping(address => mapping(address => uint256)) public allowance;\r\n\r\n /* function() external payable {\r\n deposit();\r\n } */\r\n function deposit() public payable {\r\n balanceOf[msg.sender] += msg.value;\r\n emit Deposit(msg.sender, msg.value);\r\n }\r\n\r\n function withdraw(uint256 wad) public {\r\n require(balanceOf[msg.sender] >= wad);\r\n balanceOf[msg.sender] -= wad;\r\n msg.sender.transfer(wad);\r\n emit Withdrawal(msg.sender, wad);\r\n }\r\n\r\n function totalSupply() public view returns (uint256) {\r\n return address(this).balance;\r\n }\r\n\r\n function approve(address guy, uint256 wad) public returns (bool) {\r\n allowance[msg.sender][guy] = wad;\r\n emit Approval(msg.sender, guy, wad);\r\n return true;\r\n }\r\n\r\n function transfer(address dst, uint256 wad) public returns (bool) {\r\n return transferFrom(msg.sender, dst, wad);\r\n }\r\n\r\n function transferFrom(\r\n address src,\r\n address dst,\r\n uint256 wad\r\n ) public returns (bool) {\r\n require(balanceOf[src] >= wad);\r\n\r\n if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) {\r\n require(allowance[src][msg.sender] >= wad);\r\n allowance[src][msg.sender] -= wad;\r\n }\r\n\r\n balanceOf[src] -= wad;\r\n balanceOf[dst] += wad;\r\n\r\n emit Transfer(src, dst, wad);\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/*\r\n GNU GENERAL PUBLIC LICENSE\r\n Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. \r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n Preamble\r\n\r\n The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works. By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users. We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors. You can apply it to\r\nyour programs, too.\r\n\r\n When we speak of free software, we are referring to freedom, not\r\nprice. Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights. Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received. You must make sure that they, too, receive\r\nor can get the source code. And you must show them these terms so they\r\nknow their rights.\r\n\r\n Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software. For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so. This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software. The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable. Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts. If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary. To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n TERMS AND CONDITIONS\r\n\r\n 0. Definitions.\r\n\r\n \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n \"The Program\" refers to any copyrightable work licensed under this\r\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy. The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy. Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies. Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License. If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n 1. Source Code.\r\n\r\n The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it. \"Object code\" means any non-source\r\nform of a work.\r\n\r\n A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form. A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities. However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work. For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n 2. Basic Permissions.\r\n\r\n All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met. This License explicitly affirms your unlimited\r\npermission to run the unmodified Program. The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work. This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force. You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright. Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below. Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n 4. Conveying Verbatim Copies.\r\n\r\n You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n 5. Conveying Modified Source Versions.\r\n\r\n You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n a) The work must carry prominent notices stating that you modified\r\n it, and giving a relevant date.\r\n\r\n b) The work must carry prominent notices stating that it is\r\n released under this License and any conditions added under section\r\n 7. This requirement modifies the requirement in section 4 to\r\n \"keep intact all notices\".\r\n\r\n c) You must license the entire work, as a whole, under this\r\n License to anyone who comes into possession of a copy. This\r\n License will therefore apply, along with any applicable section 7\r\n additional terms, to the whole of the work, and all its parts,\r\n regardless of how they are packaged. This License gives no\r\n permission to license the work in any other way, but it does not\r\n invalidate such permission if you have separately received it.\r\n\r\n d) If the work has interactive user interfaces, each must display\r\n Appropriate Legal Notices; however, if the Program has interactive\r\n interfaces that do not display Appropriate Legal Notices, your\r\n work need not make them do so.\r\n\r\n A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit. Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n 6. Conveying Non-Source Forms.\r\n\r\n You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n a) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by the\r\n Corresponding Source fixed on a durable physical medium\r\n customarily used for software interchange.\r\n\r\n b) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by a\r\n written offer, valid for at least three years and valid for as\r\n long as you offer spare parts or customer support for that product\r\n model, to give anyone who possesses the object code either (1) a\r\n copy of the Corresponding Source for all the software in the\r\n product that is covered by this License, on a durable physical\r\n medium customarily used for software interchange, for a price no\r\n more than your reasonable cost of physically performing this\r\n conveying of source, or (2) access to copy the\r\n Corresponding Source from a network server at no charge.\r\n\r\n c) Convey individual copies of the object code with a copy of the\r\n written offer to provide the Corresponding Source. This\r\n alternative is allowed only occasionally and noncommercially, and\r\n only if you received the object code with such an offer, in accord\r\n with subsection 6b.\r\n\r\n d) Convey the object code by offering access from a designated\r\n place (gratis or for a charge), and offer equivalent access to the\r\n Corresponding Source in the same way through the same place at no\r\n further charge. You need not require recipients to copy the\r\n Corresponding Source along with the object code. If the place to\r\n copy the object code is a network server, the Corresponding Source\r\n may be on a different server (operated by you or a third party)\r\n that supports equivalent copying facilities, provided you maintain\r\n clear directions next to the object code saying where to find the\r\n Corresponding Source. Regardless of what server hosts the\r\n Corresponding Source, you remain obligated to ensure that it is\r\n available for as long as needed to satisfy these requirements.\r\n\r\n e) Convey the object code using peer-to-peer transmission, provided\r\n you inform other peers where the object code and Corresponding\r\n Source of the work are being offered to the general public at no\r\n charge under subsection 6d.\r\n\r\n A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling. In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage. For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product. A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source. The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information. But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed. Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n 7. Additional Terms.\r\n\r\n \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law. If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit. (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.) You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n a) Disclaiming warranty or limiting liability differently from the\r\n terms of sections 15 and 16 of this License; or\r\n\r\n b) Requiring preservation of specified reasonable legal notices or\r\n author attributions in that material or in the Appropriate Legal\r\n Notices displayed by works containing it; or\r\n\r\n c) Prohibiting misrepresentation of the origin of that material, or\r\n requiring that modified versions of such material be marked in\r\n reasonable ways as different from the original version; or\r\n\r\n d) Limiting the use for publicity purposes of names of licensors or\r\n authors of the material; or\r\n\r\n e) Declining to grant rights under trademark law for use of some\r\n trade names, trademarks, or service marks; or\r\n\r\n f) Requiring indemnification of licensors and authors of that\r\n material by anyone who conveys the material (or modified versions of\r\n it) with contractual assumptions of liability to the recipient, for\r\n any liability that these contractual assumptions directly impose on\r\n those licensors and authors.\r\n\r\n All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10. If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term. If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n 8. Termination.\r\n\r\n You may not propagate or modify a covered work except as expressly\r\nprovided under this License. Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License. If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n 9. Acceptance Not Required for Having Copies.\r\n\r\n You are not required to accept this License in order to receive or\r\nrun a copy of the Program. Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance. However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work. These actions infringe copyright if you do\r\nnot accept this License. Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n 10. Automatic Licensing of Downstream Recipients.\r\n\r\n Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License. You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations. If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License. For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n 11. Patents.\r\n\r\n A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based. The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version. For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement). To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients. \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License. You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n 12. No Surrender of Others' Freedom.\r\n\r\n If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License. If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all. For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n 13. Use with the GNU Affero General Public License.\r\n\r\n Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work. The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n 14. Revised Versions of this License.\r\n\r\n The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time. Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n Each version is given a distinguishing version number. If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation. If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n Later license versions may give you additional or different\r\npermissions. However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n 15. Disclaimer of Warranty.\r\n\r\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n 16. Limitation of Liability.\r\n\r\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n 17. Interpretation of Sections 15 and 16.\r\n\r\n If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n END OF TERMS AND CONDITIONS\r\n\r\n How to Apply These Terms to Your New Programs\r\n\r\n If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n To do so, attach the following notices to the program. It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n \r\n Copyright (C) \r\n\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU General Public License as published by\r\n the Free Software Foundation, either version 3 of the License, or\r\n (at your option) any later version.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n GNU General Public License for more details.\r\n\r\n You should have received a copy of the GNU General Public License\r\n along with this program. If not, see .\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n Copyright (C) \r\n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n This is free software, and you are welcome to redistribute it\r\n under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License. Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n.\r\n\r\n The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs. If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library. If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License. But first, please read\r\n.\r\n\r\n*/\r\n" + } + }, + "settings": { + "metadata": { + "useLiteralContent": false + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "id", + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/test/test_uni_connector.js b/test/test_uni_connector.js index bb785543..76ca4e0b 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.js @@ -564,7 +564,6 @@ describe("UniswapConnector", () => { UniswapV2Pair.abi, Admin ); - console.log(formatEther(await pair.balanceOf(Alice))); await pair .connect(Admin) .approve(uniswapConnector.address, MILLION_ETHER); @@ -596,7 +595,6 @@ describe("UniswapConnector", () => { describe("openFlashShort", () => { it("gets a flash loan for underlyings, mints options, swaps redeem to underlyings to pay back", async () => { // Create a Uniswap V2 Pair and add liquidity. - console.log( `Redeem balance: ${formatEther( await redeemToken.balanceOf(Alice) @@ -609,6 +607,20 @@ describe("UniswapConnector", () => { )}` ); + console.log( + `redeem dai pair: ${await uniswapFactory.getPair( + redeemToken.address, + dai.address + )}` + ); + + console.log( + `dai weth pair: ${await uniswapFactory.getPair( + weth.address, + dai.address + )}` + ); + // Get the pair instance to approve it to the uniswapConnector assert.equal( quoteToken.address, diff --git a/test/test_uni_flash.js b/test/test_uni_flash.js new file mode 100644 index 00000000..e473e3af --- /dev/null +++ b/test/test_uni_flash.js @@ -0,0 +1,283 @@ +const { assert, expect } = require("chai"); +const chai = require("chai"); +const { solidity } = require("ethereum-waffle"); +chai.use(solidity); +const utils = require("./lib/utils"); +const setup = require("./lib/setup"); +const constants = require("./lib/constants"); +const { parseEther, formatEther } = require("ethers/lib/utils"); +const { assertBNEqual } = utils; +const { + ONE_ETHER, + TEN_ETHER, + HUNDRED_ETHER, + THOUSAND_ETHER, + MILLION_ETHER, +} = constants.VALUES; +const UniswapV2Pair = require("@uniswap/v2-core/build/UniswapV2Pair.json"); + +describe("UniswapConnector Flash", () => { + // ACCOUNTS + let Admin, User, Alice, Bob; + + let trader, weth, dai, optionToken, redeemToken, quoteToken; + let underlyingToken, strikeToken; + let base, quote, expiry; + let Primitive, registry; + let uniswapFactory, uniswapRouter, uniswapConnector; + + before(async () => { + let signers = await setup.newWallets(); + + // Signers + Admin = signers[0]; + User = signers[1]; + + // Addresses of Signers + Alice = Admin._address; + Bob = User._address; + + // Underlying and quote token instances + weth = await setup.newWeth(Admin); + dai = await setup.newERC20(Admin, "TEST DAI", "DAI", MILLION_ETHER); + quoteToken = dai; + + // Administrative contract instances + registry = await setup.newRegistry(Admin); + + // Uniswap V2 + const uniswap = await setup.newUniswap(Admin, Alice, weth); + uniswapFactory = uniswap.uniswapFactory; + uniswapRouter = uniswap.uniswapRouter; + + // Uniswap Connector contract + uniswapConnector = await setup.newUniswapConnector(Admin); + + // Option parameters + underlyingToken = weth; + strikeToken = dai; + base = parseEther("1"); + quote = parseEther("100"); + expiry = "1690868800"; // May 30, 2020, 8PM UTC + + // Option and redeem instances + Primitive = await setup.newPrimitive( + Admin, + registry, + underlyingToken, + strikeToken, + base, + quote, + expiry + ); + + optionToken = Primitive.optionToken; + redeemToken = Primitive.redeemToken; + + // Trader Instance + trader = await setup.newTrader(Admin, weth.address); + + // Initialize the uniswap connector with addresses + await uniswapConnector.initialize( + uniswapRouter.address, + uniswapFactory.address, + trader.address, + registry.address, + quoteToken.address + ); + + // Approve tokens to be sent to trader contract + await underlyingToken + .connect(Admin) + .approve(trader.address, MILLION_ETHER); + await strikeToken.connect(Admin).approve(trader.address, MILLION_ETHER); + await optionToken.connect(Admin).approve(trader.address, MILLION_ETHER); + await redeemToken.connect(Admin).approve(trader.address, MILLION_ETHER); + + // Approve tokens to be sent to uniswapConnector + await underlyingToken + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + await strikeToken + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + await optionToken + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + await redeemToken + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + + // Approve tokens to be sent to uniswapRouter + await underlyingToken + .connect(Admin) + .approve(uniswapRouter.address, MILLION_ETHER); + await strikeToken + .connect(Admin) + .approve(uniswapRouter.address, MILLION_ETHER); + await optionToken + .connect(Admin) + .approve(uniswapRouter.address, MILLION_ETHER); + await redeemToken + .connect(Admin) + .approve(uniswapRouter.address, MILLION_ETHER); + + // Create UNISWAP PAIRS + // option <> dai: 1:10 ($10 option) 1,000 options and 10,000 dai (1,000 weth) + // weth <> dai: 1:100 ($100 weth) 1,000 weth and 100,000 dai + // redeem <> dai: 1:1 ($1 redeem) 100,000 redeems and 100,000 dai + + const totalOptions = parseEther("1000"); + const daiForOptionsPair = parseEther("100000"); + const totalDai = parseEther("210000"); + const totalWethForPair = parseEther("1000"); + const totalDaiForPair = parseEther("100000"); + const totalRedeemForPair = parseEther("100000"); + + // MINT 2,010 WETH + await weth.deposit({ from: Alice, value: parseEther("2500") }); + + // MINT 1,000 OPTIONS + await trader.safeMint(optionToken.address, totalOptions, Alice); + + // Mint some options for tests + await trader.safeMint(optionToken.address, parseEther("10"), Alice); + + // MINT 210,000 DAI + await dai.mint(Alice, totalDai); + + // regular deadline + const deadline = Math.floor(Date.now() / 1000) + 60 * 20; + + // Add liquidity to option <> dai pair + await uniswapRouter.addLiquidity( + optionToken.address, + dai.address, + totalOptions, + daiForOptionsPair, + 0, + 0, + Alice, + deadline + ); + + // Add liquidity to weth <> dai pair + await uniswapRouter.addLiquidity( + weth.address, + dai.address, + totalWethForPair, + totalDaiForPair, + 0, + 0, + Alice, + deadline + ); + + // Add liquidity to redeem <> dai pair + await uniswapRouter.addLiquidity( + redeemToken.address, + dai.address, + totalRedeemForPair, + totalDaiForPair, + 0, + 0, + Alice, + deadline + ); + + // Get the pair instance to approve it to the uniswapConnector + let pairAddress = await uniswapFactory.getPair( + optionToken.address, + dai.address + ); + let pair = new ethers.Contract(pairAddress, UniswapV2Pair.abi, Admin); + await pair + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + + await pair + .connect(User) + .approve(uniswapConnector.address, MILLION_ETHER); + }); + + /* describe("flashloanMintShortOptionsThenSwap", () => { + it("sends to mimic a flash loan", async () => { + let pairAddress = await uniswapFactory.getPair( + quoteToken.address, + underlyingToken.address + ); + let flashLoanQuantity = ONE_ETHER; + let amountOutMin = "0"; + let path = [ + redeemToken.address, + dai.address, + underlyingToken.address, + ]; + let to = Alice; + const deadline = Math.floor(Date.now() / 1000) + 60 * 20; + // send in underlyingTokens as if was flash swap + await underlyingToken.transfer( + uniswapConnector.address, + flashLoanQuantity + ); + await expect( + uniswapConnector.flashloanMintShortOptionsThenSwap( + pairAddress, + optionToken.address, + flashLoanQuantity, + amountOutMin, + path, + to, + deadline + ) + ) + .to.emit(uniswapConnector, "FlashedShortOption") + .withArgs(Alice, flashLoanQuantity); + }); + }); */ + + describe("openFlashShort", () => { + it("gets a flash loan for underlyings, mints options, swaps redeem to underlyings to pay back", async () => { + // Create a Uniswap V2 Pair and add liquidity. + console.log( + `Redeem balance: ${formatEther( + await redeemToken.balanceOf(Alice) + )}` + ); + + console.log( + `Option balance: ${formatEther( + await optionToken.balanceOf(Alice) + )}` + ); + + console.log( + `redeem dai pair: ${await uniswapFactory.getPair( + redeemToken.address, + dai.address + )}` + ); + + console.log( + `dai weth pair: ${await uniswapFactory.getPair( + weth.address, + dai.address + )}` + ); + + // Get the pair instance to approve it to the uniswapConnector + assert.equal( + quoteToken.address, + await uniswapConnector.quoteToken(), + "QuoteToken mismatch" + ); + let amountOptions = ONE_ETHER; + let amountOutMin = "0"; + await uniswapConnector.openFlashShort( + amountOptions, + amountOutMin, + optionToken.address + ); + }); + }); +}); From f4839caba256f06ce35d8ec9c23fa5a3e0892932 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Wed, 28 Oct 2020 18:20:42 -0700 Subject: [PATCH 04/20] Got the flash sell redeems working. --- artifacts/UniswapConnector.json | 4 +-- .../connectors/Uniswap/UniswapConnector.sol | 35 +++++++++++-------- test/test_uni_flash.js | 22 +++--------- 3 files changed, 26 insertions(+), 35 deletions(-) diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index a7fcd8e2..386e38a5 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -845,8 +845,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615fbe80620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612070565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612253565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506123ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d06124fa565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061250b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107726126ec565b005b61077c612874565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061289a565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129c4565b604051808215151515815260200191505060405180910390f35b610938612f10565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612f39565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134c5565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061362c565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613793565b604051808381526020018281526020019250505060405180910390f35b610bff6140be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140d6565b005b610c8d61423d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614263565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614470565b604051808215151515815260200191505060405180910390f35b610dc161479b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f0000000000000000000000000000000000008152506147c1565b610ec3826148bf565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f4761495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b061495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a30614964565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614b64565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611acd57600080fd5b505afa158015611ae1573d6000803e3d6000fd5b505050506040513d6020811015611af757600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611b3c5781602001602082028038833980820191505090505b5090508381600081518110611b4d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611bb757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611bff57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615f03605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611d5e578082015181840152602081019050611d43565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e8a576000611e8c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611eed57600080fd5b505afa158015611f01573d6000803e3d6000fd5b505050506040513d6020811015611f1757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f49578b611f4c565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611ffb578082015181840152602081019050611fe0565b50505050905090810190601f1680156120285780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561204a57600080fd5b505af115801561205e573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561215e57600080fd5b505afa158015612172573d6000803e3d6000fd5b505050506040513d602081101561218857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561223e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6122478161250b565b91505095945050505050565b61225b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461231c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156124b457600080fd5b505af11580156124c8573d6000803e3d6000fd5b505050506040513d60208110156124de57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561260357600080fd5b505afa158015612617573d6000803e3d6000fd5b505050506040513d602081101561262d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156126e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126f461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128ad8a8989898989613793565b9150915060006128c28a84848b8b8b8b6129c4565b905080612937576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612adc33308a8473ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b600080612aea8c8c30614964565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b9557600080fd5b505af1158015612ba9573d6000803e3d6000fd5b505050506040513d6020811015612bbf57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c7857600080fd5b505af1158015612c8c573d6000803e3d6000fd5b505050506040513d6020811015612ca257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612de557600080fd5b505af1158015612df9573d6000803e3d6000fd5b505050506040513d6060811015612e0f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612ee233828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e8257600080fd5b505afa158015612e96573d6000803e3d6000fd5b505050506040513d6020811015612eac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612fb0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612ff857600080fd5b505afa15801561300c573d6000803e3d6000fd5b505050506040513d602081101561302257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168560028151811061305957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146130ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61311588888373ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561319657600080fd5b505af11580156131aa573d6000803e3d6000fd5b505050506040513d60408110156131c057600080fd5b8101908080519060200190929190805190602001909291905050509150915061321d6040518060400160405280600e81526020017f6d696e746564206f7074696f6e730000000000000000000000000000000000008152506147c1565b600086905060008c9050600085905061326a6040518060400160405280600881526020017f7377617070696e670000000000000000000000000000000000000000000000008152506147c1565b606060006132fc8f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156132b757600080fd5b505afa1580156132cb573d6000803e3d6000fd5b505050506040513d60208110156132e157600080fd5b8101908080519060200190929190505050878f8f888f614b64565b9150915080985061330c89615156565b8861337f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000808f905060008460028151811061339457fe5b602002602001015190506133fe816133f06103e86133e26133bf6003886151f390919063ffffffff16565b6133d46103e8896151f390919063ffffffff16565b61527990919063ffffffff16565b61530190919063ffffffff16565b61534b90919063ffffffff16565b9250505061340b81615395565b6134388686838773ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b50505050505061346986838c73ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a2505050979650505050505050565b6134cd61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461358e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138698b61250b565b905061389833308c8473ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396157600080fd5b505af1158015613975573d6000803e3d6000fd5b505050506040513d602081101561398b57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ac957600080fd5b505af1158015613add573d6000803e3d6000fd5b505050506040513d6040811015613af357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be057600080fd5b505af1158015613bf4573d6000803e3d6000fd5b505050506040513d6020811015613c0a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6257600080fd5b505afa158015613c76573d6000803e3d6000fd5b505050506040513d6020811015613c8c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4357600080fd5b505af1158015613d57573d6000803e3d6000fd5b505050506040513d6020811015613d6d57600080fd5b8101908080519060200190929190505050506000613ea58573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dca57600080fd5b505afa158015613dde573d6000803e3d6000fd5b505050506040513d6020811015613df457600080fd5b8101908080519060200190929190505050613e978773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4d57600080fd5b505afa158015613e61573d6000803e3d6000fd5b505050506040513d6020811015613e7757600080fd5b8101908080519060200190929190505050876151f390919063ffffffff16565b61530190919063ffffffff16565b9050613f543330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ef357600080fd5b505afa158015613f07573d6000803e3d6000fd5b505050506040513d6020811015613f1d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401057600080fd5b505af1158015614024573d6000803e3d6000fd5b505050506040513d606081101561403a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061408d89838773ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140de61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461419f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61426b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461432c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143b2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ebc6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061447e86853061542e565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144ef57600080fd5b505afa158015614503573d6000803e3d6000fd5b505050506040513d602081101561451957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d057600080fd5b505af11580156145e4573d6000803e3d6000fd5b505050506040513d60208110156145fa57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146c857600080fd5b505af11580156146dc573d6000803e3d6000fd5b505050506040513d60408110156146f257600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6148bc816040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156148085780820151818401526020810190506147ed565b50505050905090810190601f1680156148355780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b6149598160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b600033905090565b600080600084116149dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a8a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a2957600080fd5b505afa158015614a3d573d6000803e3d6000fd5b505050506040513d6020811015614a5357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614b0b57600080fd5b505af1158015614b1f573d6000803e3d6000fd5b505050506040513d6040811015614b3557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b60606000614ba66040518060400160405280601181526020017f7377617070696e6720696e7465726e616c0000000000000000000000000000008152506147c1565b8773ffffffffffffffffffffffffffffffffffffffff1685600081518110614bca57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050614cc06040518060400160405280601081526020017f617070726f76696e6720726f75746572000000000000000000000000000000008152506147c1565b8873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d6757600080fd5b505af1158015614d7b573d6000803e3d6000fd5b505050506040513d6020811015614d9157600080fd5b810190808051906020019092919050505050614dac87615395565b8073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614e63578082015181840152602081019050614e48565b505050509050019650505050505050600060405180830381600087803b158015614e8c57600080fd5b505af1158015614ea0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614eca57600080fd5b8101908080516040519392919084640100000000821115614eea57600080fd5b83820191506020820185811115614f0057600080fd5b8251866020820283011164010000000082111715614f1d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614f54578082015181840152602081019050614f39565b505050509050016040525050509250614fa16040518060400160405280600c81526020017f53776170207375636365737300000000000000000000000000000000000000008152506147c1565b6001915050965096945050505050565b6150648363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a9f565b505050565b615150846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a9f565b50505050565b6151f08160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b6000808314156152065760009050615273565b600082840290508284828161521757fe5b041461526e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615ee26021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156152f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061534383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615cea565b905092915050565b600061538d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615db0565b905092915050565b61542b81604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b60008060008085116154a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561552657600080fd5b505afa15801561553a573d6000803e3d6000fd5b505050506040513d602081101561555057600080fd5b810190808051906020019092919050505010156155d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156fb8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561562057600080fd5b505afa158015615634573d6000803e3d6000fd5b505050506040513d602081101561564a57600080fd5b81019080805190602001909291905050506156ed8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156156a357600080fd5b505afa1580156156b7573d6000803e3d6000fd5b505050506040513d60208110156156cd57600080fd5b8101908080519060200190929190505050896151f390919063ffffffff16565b61530190919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561574457600080fd5b505afa158015615758573d6000803e3d6000fd5b505050506040513d602081101561576e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156157fb57600080fd5b505afa15801561580f573d6000803e3d6000fd5b505050506040513d602081101561582557600080fd5b810190808051906020019092919050505010156158aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6159573388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156158f657600080fd5b505afa15801561590a573d6000803e3d6000fd5b505050506040513d602081101561592057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6159843388888a73ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015615a0657600080fd5b505af1158015615a1a573d6000803e3d6000fd5b505050506040513d6060811015615a3057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b615abe8273ffffffffffffffffffffffffffffffffffffffff16615e70565b615b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615b7f5780518252602082019150602081019050602083039250615b5c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615be1576040519150601f19603f3d011682016040523d82523d6000602084013e615be6565b606091505b509150915081615c5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615ce457808060200190516020811015615c7d57600080fd5b8101908080519060200190929190505050615ce3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615f5f602a913960400191505060405180910390fd5b5b50505050565b60008083118290615d96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d5b578082015181840152602081019050615d40565b50505050905090810190601f168015615d885780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615da257fe5b049050809150509392505050565b6000838311158290615e5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615e22578082015181840152602081019050615e07565b50505050905090810190601f168015615e4f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615eb257506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122031eab89ff220da64ffb42b8e25770da6f72a4d536f7036288f4085120408bed664736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612070565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612253565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506123ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d06124fa565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061250b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107726126ec565b005b61077c612874565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061289a565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129c4565b604051808215151515815260200191505060405180910390f35b610938612f10565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612f39565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134c5565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061362c565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613793565b604051808381526020018281526020019250505060405180910390f35b610bff6140be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140d6565b005b610c8d61423d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614263565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614470565b604051808215151515815260200191505060405180910390f35b610dc161479b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f0000000000000000000000000000000000008152506147c1565b610ec3826148bf565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f4761495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b061495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a30614964565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614b64565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611acd57600080fd5b505afa158015611ae1573d6000803e3d6000fd5b505050506040513d6020811015611af757600080fd5b8101908080519060200190929190505050905060606003604051908082528060200260200182016040528015611b3c5781602001602082028038833980820191505090505b5090508381600081518110611b4d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611bb757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600281518110611bff57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615f03605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611d5e578082015181840152602081019050611d43565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e8a576000611e8c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611eed57600080fd5b505afa158015611f01573d6000803e3d6000fd5b505050506040513d6020811015611f1757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611f49578b611f4c565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611ffb578082015181840152602081019050611fe0565b50505050905090810190601f1680156120285780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561204a57600080fd5b505af115801561205e573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561215e57600080fd5b505afa158015612172573d6000803e3d6000fd5b505050506040513d602081101561218857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561223e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6122478161250b565b91505095945050505050565b61225b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461231c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156124b457600080fd5b505af11580156124c8573d6000803e3d6000fd5b505050506040513d60208110156124de57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561260357600080fd5b505afa158015612617573d6000803e3d6000fd5b505050506040513d602081101561262d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156126e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126f461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128ad8a8989898989613793565b9150915060006128c28a84848b8b8b8b6129c4565b905080612937576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612adc33308a8473ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b600080612aea8c8c30614964565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b9557600080fd5b505af1158015612ba9573d6000803e3d6000fd5b505050506040513d6020811015612bbf57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c7857600080fd5b505af1158015612c8c573d6000803e3d6000fd5b505050506040513d6020811015612ca257600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612de557600080fd5b505af1158015612df9573d6000803e3d6000fd5b505050506040513d6060811015612e0f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612ee233828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e8257600080fd5b505afa158015612e96573d6000803e3d6000fd5b505050506040513d6020811015612eac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612fb0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612ff857600080fd5b505afa15801561300c573d6000803e3d6000fd5b505050506040513d602081101561302257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168560028151811061305957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146130ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61311588888373ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561319657600080fd5b505af11580156131aa573d6000803e3d6000fd5b505050506040513d60408110156131c057600080fd5b8101908080519060200190929190805190602001909291905050509150915061321d6040518060400160405280600e81526020017f6d696e746564206f7074696f6e730000000000000000000000000000000000008152506147c1565b600086905060008c9050600085905061326a6040518060400160405280600881526020017f7377617070696e670000000000000000000000000000000000000000000000008152506147c1565b606060006132fc8f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156132b757600080fd5b505afa1580156132cb573d6000803e3d6000fd5b505050506040513d60208110156132e157600080fd5b8101908080519060200190929190505050878f8f888f614b64565b9150915080985061330c89615156565b8861337f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6000808f905060008460028151811061339457fe5b602002602001015190506133fe816133f06103e86133e26133bf6003886151f390919063ffffffff16565b6133d46103e8896151f390919063ffffffff16565b61527990919063ffffffff16565b61530190919063ffffffff16565b61534b90919063ffffffff16565b9250505061340b81615395565b6134388686838773ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b50505050505061346986838c73ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a2505050979650505050505050565b6134cd61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461358e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b61363461495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff16613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138698b61250b565b905061389833308c8473ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561396157600080fd5b505af1158015613975573d6000803e3d6000fd5b505050506040513d602081101561398b57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ac957600080fd5b505af1158015613add573d6000803e3d6000fd5b505050506040513d6040811015613af357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613be057600080fd5b505af1158015613bf4573d6000803e3d6000fd5b505050506040513d6020811015613c0a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6257600080fd5b505afa158015613c76573d6000803e3d6000fd5b505050506040513d6020811015613c8c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4357600080fd5b505af1158015613d57573d6000803e3d6000fd5b505050506040513d6020811015613d6d57600080fd5b8101908080519060200190929190505050506000613ea58573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dca57600080fd5b505afa158015613dde573d6000803e3d6000fd5b505050506040513d6020811015613df457600080fd5b8101908080519060200190929190505050613e978773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4d57600080fd5b505afa158015613e61573d6000803e3d6000fd5b505050506040513d6020811015613e7757600080fd5b8101908080519060200190929190505050876151f390919063ffffffff16565b61530190919063ffffffff16565b9050613f543330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ef357600080fd5b505afa158015613f07573d6000803e3d6000fd5b505050506040513d6020811015613f1d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561401057600080fd5b505af1158015614024573d6000803e3d6000fd5b505050506040513d606081101561403a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061408d89838773ffffffffffffffffffffffffffffffffffffffff16614fb19092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140de61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461419f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61426b61495c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461432c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143b2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ebc6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061447e86853061542e565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144ef57600080fd5b505afa158015614503573d6000803e3d6000fd5b505050506040513d602081101561451957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145d057600080fd5b505af11580156145e4573d6000803e3d6000fd5b505050506040513d60208110156145fa57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b1580156146c857600080fd5b505af11580156146dc573d6000803e3d6000fd5b505050506040513d60408110156146f257600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6148bc816040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156148085780820151818401526020810190506147ed565b50505050905090810190601f1680156148355780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b6149598160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b600033905090565b600080600084116149dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a8a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a2957600080fd5b505afa158015614a3d573d6000803e3d6000fd5b505050506040513d6020811015614a5357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614b0b57600080fd5b505af1158015614b1f573d6000803e3d6000fd5b505050506040513d6040811015614b3557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b60606000614ba66040518060400160405280601181526020017f7377617070696e6720696e7465726e616c0000000000000000000000000000008152506147c1565b8773ffffffffffffffffffffffffffffffffffffffff1685600081518110614bca57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050614cc06040518060400160405280601081526020017f617070726f76696e6720726f75746572000000000000000000000000000000008152506147c1565b8873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d6757600080fd5b505af1158015614d7b573d6000803e3d6000fd5b505050506040513d6020811015614d9157600080fd5b810190808051906020019092919050505050614dac87615395565b8073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614e63578082015181840152602081019050614e48565b505050509050019650505050505050600060405180830381600087803b158015614e8c57600080fd5b505af1158015614ea0573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614eca57600080fd5b8101908080516040519392919084640100000000821115614eea57600080fd5b83820191506020820185811115614f0057600080fd5b8251866020820283011164010000000082111715614f1d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614f54578082015181840152602081019050614f39565b505050509050016040525050509250614fa16040518060400160405280600c81526020017f53776170207375636365737300000000000000000000000000000000000000008152506147c1565b6001915050965096945050505050565b6150648363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a9f565b505050565b615150846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a9f565b50505050565b6151f08160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b6000808314156152065760009050615273565b600082840290508284828161521757fe5b041461526e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615ee26021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156152f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061534383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615cea565b905092915050565b600061538d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615db0565b905092915050565b61542b81604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050615a76565b50565b60008060008085116154a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561552657600080fd5b505afa15801561553a573d6000803e3d6000fd5b505050506040513d602081101561555057600080fd5b810190808051906020019092919050505010156155d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156fb8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561562057600080fd5b505afa158015615634573d6000803e3d6000fd5b505050506040513d602081101561564a57600080fd5b81019080805190602001909291905050506156ed8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156156a357600080fd5b505afa1580156156b7573d6000803e3d6000fd5b505050506040513d60208110156156cd57600080fd5b8101908080519060200190929190505050896151f390919063ffffffff16565b61530190919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561574457600080fd5b505afa158015615758573d6000803e3d6000fd5b505050506040513d602081101561576e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156157fb57600080fd5b505afa15801561580f573d6000803e3d6000fd5b505050506040513d602081101561582557600080fd5b810190808051906020019092919050505010156158aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6159573388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156158f657600080fd5b505afa15801561590a573d6000803e3d6000fd5b505050506040513d602081101561592057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6159843388888a73ffffffffffffffffffffffffffffffffffffffff16615069909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015615a0657600080fd5b505af1158015615a1a573d6000803e3d6000fd5b505050506040513d6060811015615a3057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b615abe8273ffffffffffffffffffffffffffffffffffffffff16615e70565b615b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615b7f5780518252602082019150602081019050602083039250615b5c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615be1576040519150601f19603f3d011682016040523d82523d6000602084013e615be6565b606091505b509150915081615c5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615ce457808060200190516020811015615c7d57600080fd5b8101908080519060200190929190505050615ce3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615f5f602a913960400191505060405180910390fd5b5b50505050565b60008083118290615d96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d5b578082015181840152602081019050615d40565b50505050905090810190601f168015615d885780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615da257fe5b049050809150509392505050565b6000838311158290615e5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615e22578082015181840152602081019050615e07565b50505050905090810190601f168015615e4f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615eb257506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122031eab89ff220da64ffb42b8e25770da6f72a4d536f7036288f4085120408bed664736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615ef480620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611fe4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121c7565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061232e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d061246e565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061247f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610772612660565b005b61077c6127e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061280e565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612938565b604051808215151515815260200191505060405180910390f35b610938612e84565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ead565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061355b565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506136c2565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613829565b604051808381526020018281526020019250505060405180910390f35b610bff614154565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061416c565b005b610c8d6142d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506142f9565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614506565b604051808215151515815260200191505060405180910390f35b610dc1614831565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f000000000000000000000000000000000000815250614857565b610ec382614955565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f476149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b06149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a306149fa565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614bfa565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611aab57600080fd5b505afa158015611abf573d6000803e3d6000fd5b505050506040513d6020811015611ad557600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611b1a5781602001602082028038833980820191505090505b5090508381600081518110611b2b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611b7357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615e39605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611cd2578082015181840152602081019050611cb7565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611da157600080fd5b505afa158015611db5573d6000803e3d6000fd5b505050506040513d6020811015611dcb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611dfe576000611e00565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6157600080fd5b505afa158015611e75573d6000803e3d6000fd5b505050506040513d6020811015611e8b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611ebd578b611ec0565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f6f578082015181840152602081019050611f54565b50505050905090810190601f168015611f9c5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015611fbe57600080fd5b505af1158015611fd2573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b1580156120d257600080fd5b505afa1580156120e6573d6000803e3d6000fd5b505050506040513d60208110156120fc57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156121b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6121bb8161247f565b91505095945050505050565b6121cf6149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612290576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561242857600080fd5b505af115801561243c573d6000803e3d6000fd5b505050506040513d602081101561245257600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561257757600080fd5b505afa15801561258b573d6000803e3d6000fd5b505050506040513d60208110156125a157600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612657576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126686149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612729576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128218a8989898989613829565b9150915060006128368a84848b8b8b8b612938565b9050806128ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff166129bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612a5033308a8473ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b600080612a5e8c8c306149fa565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b0957600080fd5b505af1158015612b1d573d6000803e3d6000fd5b505050506040513d6020811015612b3357600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612bec57600080fd5b505af1158015612c00573d6000803e3d6000fd5b505050506040513d6020811015612c1657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612d5957600080fd5b505af1158015612d6d573d6000803e3d6000fd5b505050506040513d6060811015612d8357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612e5633828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612df657600080fd5b505afa158015612e0a573d6000803e3d6000fd5b505050506040513d6020811015612e2057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612f24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612f6c57600080fd5b505afa158015612f80573d6000803e3d6000fd5b505050506040513d6020811015612f9657600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1685600181518110612fcd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461305e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61308988888373ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561310a57600080fd5b505af115801561311e573d6000803e3d6000fd5b505050506040513d604081101561313457600080fd5b810190808051906020019092919080519060200190929190505050915091506131916040518060400160405280600e81526020017f6d696e746564206f7074696f6e73000000000000000000000000000000000000815250614857565b60008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848b6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015613230578082015181840152602081019050613215565b50505050905001935050505060006040518083038186803b15801561325457600080fd5b505afa158015613268573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561329257600080fd5b81019080805160405193929190846401000000008211156132b257600080fd5b838201915060208201858111156132c857600080fd5b82518660208202830111640100000000821117156132e557600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561331c578082015181840152602081019050613301565b5050505090500160405250505090506133696040518060400160405280600881526020017f7377617070696e67000000000000000000000000000000000000000000000000815250614857565b6000808c905060008360018151811061337e57fe5b602002602001015190506133e8816133da6103e86133cc6133a960038861512990919063ffffffff16565b6133be6103e88961512990919063ffffffff16565b6151af90919063ffffffff16565b61523790919063ffffffff16565b61528190919063ffffffff16565b925050506133f5816152cb565b6134a08e858f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561344057600080fd5b505afa158015613454573d6000803e3d6000fd5b505050506040513d602081101561346a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b6134cd898f838673ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b5050506134fb86838c73ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a260019350505050979650505050505050565b6135636149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b6136ca6149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461378b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166138ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138ff8b61247f565b905061392e33308c8473ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139f757600080fd5b505af1158015613a0b573d6000803e3d6000fd5b505050506040513d6020811015613a2157600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613b5f57600080fd5b505af1158015613b73573d6000803e3d6000fd5b505050506040513d6040811015613b8957600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c7657600080fd5b505af1158015613c8a573d6000803e3d6000fd5b505050506040513d6020811015613ca057600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613cf857600080fd5b505afa158015613d0c573d6000803e3d6000fd5b505050506040513d6020811015613d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613dd957600080fd5b505af1158015613ded573d6000803e3d6000fd5b505050506040513d6020811015613e0357600080fd5b8101908080519060200190929190505050506000613f3b8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613e6057600080fd5b505afa158015613e74573d6000803e3d6000fd5b505050506040513d6020811015613e8a57600080fd5b8101908080519060200190929190505050613f2d8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ee357600080fd5b505afa158015613ef7573d6000803e3d6000fd5b505050506040513d6020811015613f0d57600080fd5b81019080805190602001909291905050508761512990919063ffffffff16565b61523790919063ffffffff16565b9050613fea3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f8957600080fd5b505afa158015613f9d573d6000803e3d6000fd5b505050506040513d6020811015613fb357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156140a657600080fd5b505af11580156140ba573d6000803e3d6000fd5b505050506040513d60608110156140d057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061412389838773ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6141746149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6143016149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146143c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614448576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615df26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614514868530615364565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561458557600080fd5b505afa158015614599573d6000803e3d6000fd5b505050506040513d60208110156145af57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561466657600080fd5b505af115801561467a573d6000803e3d6000fd5b505050506040513d602081101561469057600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561475e57600080fd5b505af1158015614772573d6000803e3d6000fd5b505050506040513d604081101561478857600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b614952816040516024018080602001828103825283818151815260200191508051906020019080838360005b8381101561489e578082015181840152602081019050614883565b50505050905090810190601f1680156148cb5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b6149ef8160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b600033905090565b60008060008411614a73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614b203386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614abf57600080fd5b505afa158015614ad3573d6000803e3d6000fd5b505050506040513d6020811015614ae957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614ba157600080fd5b505af1158015614bb5573d6000803e3d6000fd5b505050506040513d6040811015614bcb57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614c2257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614cb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d8157600080fd5b505af1158015614d95573d6000803e3d6000fd5b505050506040513d6020811015614dab57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614e74578082015181840152602081019050614e59565b505050509050019650505050505050600060405180830381600087803b158015614e9d57600080fd5b505af1158015614eb1573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614edb57600080fd5b8101908080516040519392919084640100000000821115614efb57600080fd5b83820191506020820185811115614f1157600080fd5b8251866020820283011164010000000082111715614f2e57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614f65578082015181840152602081019050614f4a565b5050505090500160405250505092506001915050965096945050505050565b6150378363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159d5565b505050565b615123846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159d5565b50505050565b60008083141561513c57600090506151a9565b600082840290508284828161514d57fe5b04146151a4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615e186021913960400191505060405180910390fd5b809150505b92915050565b60008082840190508381101561522d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061527983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615c20565b905092915050565b60006152c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615ce6565b905092915050565b61536181604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b60008060008085116153de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561545c57600080fd5b505afa158015615470573d6000803e3d6000fd5b505050506040513d602081101561548657600080fd5b8101908080519060200190929190505050101561550b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156318773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561555657600080fd5b505afa15801561556a573d6000803e3d6000fd5b505050506040513d602081101561558057600080fd5b81019080805190602001909291905050506156238973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155d957600080fd5b505afa1580156155ed573d6000803e3d6000fd5b505050506040513d602081101561560357600080fd5b81019080805190602001909291905050508961512990919063ffffffff16565b61523790919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561567a57600080fd5b505afa15801561568e573d6000803e3d6000fd5b505050506040513d60208110156156a457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561573157600080fd5b505afa158015615745573d6000803e3d6000fd5b505050506040513d602081101561575b57600080fd5b810190808051906020019092919050505010156157e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61588d3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561582c57600080fd5b505afa158015615840573d6000803e3d6000fd5b505050506040513d602081101561585657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6158ba3388888a73ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561593c57600080fd5b505af1158015615950573d6000803e3d6000fd5b505050506040513d606081101561596657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b6159f48273ffffffffffffffffffffffffffffffffffffffff16615da6565b615a66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615ab55780518252602082019150602081019050602083039250615a92565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615b17576040519150601f19603f3d011682016040523d82523d6000602084013e615b1c565b606091505b509150915081615b94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615c1a57808060200190516020811015615bb357600080fd5b8101908080519060200190929190505050615c19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615e95602a913960400191505060405180910390fd5b5b50505050565b60008083118290615ccc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c91578082015181840152602081019050615c76565b50505050905090810190601f168015615cbe5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615cd857fe5b049050809150509392505050565b6000838311158290615d93576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d58578082015181840152602081019050615d3d565b50505050905090810190601f168015615d855780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615de857506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220619ad39cceac83afa349fb48fec165cb899a2ed6a9a5fc472fd67978863dfe9664736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611fe4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121c7565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061232e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d061246e565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061247f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610772612660565b005b61077c6127e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061280e565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612938565b604051808215151515815260200191505060405180910390f35b610938612e84565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ead565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061355b565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506136c2565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613829565b604051808381526020018281526020019250505060405180910390f35b610bff614154565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061416c565b005b610c8d6142d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506142f9565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614506565b604051808215151515815260200191505060405180910390f35b610dc1614831565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f000000000000000000000000000000000000815250614857565b610ec382614955565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f476149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b06149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a306149fa565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614bfa565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611aab57600080fd5b505afa158015611abf573d6000803e3d6000fd5b505050506040513d6020811015611ad557600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611b1a5781602001602082028038833980820191505090505b5090508381600081518110611b2b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611b7357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615e39605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611cd2578082015181840152602081019050611cb7565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611da157600080fd5b505afa158015611db5573d6000803e3d6000fd5b505050506040513d6020811015611dcb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611dfe576000611e00565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6157600080fd5b505afa158015611e75573d6000803e3d6000fd5b505050506040513d6020811015611e8b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611ebd578b611ec0565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f6f578082015181840152602081019050611f54565b50505050905090810190601f168015611f9c5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015611fbe57600080fd5b505af1158015611fd2573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b1580156120d257600080fd5b505afa1580156120e6573d6000803e3d6000fd5b505050506040513d60208110156120fc57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156121b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6121bb8161247f565b91505095945050505050565b6121cf6149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612290576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561242857600080fd5b505af115801561243c573d6000803e3d6000fd5b505050506040513d602081101561245257600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561257757600080fd5b505afa15801561258b573d6000803e3d6000fd5b505050506040513d60208110156125a157600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612657576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126686149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612729576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128218a8989898989613829565b9150915060006128368a84848b8b8b8b612938565b9050806128ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff166129bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612a5033308a8473ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b600080612a5e8c8c306149fa565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b0957600080fd5b505af1158015612b1d573d6000803e3d6000fd5b505050506040513d6020811015612b3357600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612bec57600080fd5b505af1158015612c00573d6000803e3d6000fd5b505050506040513d6020811015612c1657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612d5957600080fd5b505af1158015612d6d573d6000803e3d6000fd5b505050506040513d6060811015612d8357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612e5633828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612df657600080fd5b505afa158015612e0a573d6000803e3d6000fd5b505050506040513d6020811015612e2057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612f24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612f6c57600080fd5b505afa158015612f80573d6000803e3d6000fd5b505050506040513d6020811015612f9657600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1685600181518110612fcd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461305e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61308988888373ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561310a57600080fd5b505af115801561311e573d6000803e3d6000fd5b505050506040513d604081101561313457600080fd5b810190808051906020019092919080519060200190929190505050915091506131916040518060400160405280600e81526020017f6d696e746564206f7074696f6e73000000000000000000000000000000000000815250614857565b60008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848b6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015613230578082015181840152602081019050613215565b50505050905001935050505060006040518083038186803b15801561325457600080fd5b505afa158015613268573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561329257600080fd5b81019080805160405193929190846401000000008211156132b257600080fd5b838201915060208201858111156132c857600080fd5b82518660208202830111640100000000821117156132e557600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561331c578082015181840152602081019050613301565b5050505090500160405250505090506133696040518060400160405280600881526020017f7377617070696e67000000000000000000000000000000000000000000000000815250614857565b6000808c905060008360018151811061337e57fe5b602002602001015190506133e8816133da6103e86133cc6133a960038861512990919063ffffffff16565b6133be6103e88961512990919063ffffffff16565b6151af90919063ffffffff16565b61523790919063ffffffff16565b61528190919063ffffffff16565b925050506133f5816152cb565b6134a08e858f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561344057600080fd5b505afa158015613454573d6000803e3d6000fd5b505050506040513d602081101561346a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b6134cd898f838673ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b5050506134fb86838c73ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a260019350505050979650505050505050565b6135636149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b6136ca6149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461378b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166138ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138ff8b61247f565b905061392e33308c8473ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139f757600080fd5b505af1158015613a0b573d6000803e3d6000fd5b505050506040513d6020811015613a2157600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613b5f57600080fd5b505af1158015613b73573d6000803e3d6000fd5b505050506040513d6040811015613b8957600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c7657600080fd5b505af1158015613c8a573d6000803e3d6000fd5b505050506040513d6020811015613ca057600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613cf857600080fd5b505afa158015613d0c573d6000803e3d6000fd5b505050506040513d6020811015613d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613dd957600080fd5b505af1158015613ded573d6000803e3d6000fd5b505050506040513d6020811015613e0357600080fd5b8101908080519060200190929190505050506000613f3b8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613e6057600080fd5b505afa158015613e74573d6000803e3d6000fd5b505050506040513d6020811015613e8a57600080fd5b8101908080519060200190929190505050613f2d8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ee357600080fd5b505afa158015613ef7573d6000803e3d6000fd5b505050506040513d6020811015613f0d57600080fd5b81019080805190602001909291905050508761512990919063ffffffff16565b61523790919063ffffffff16565b9050613fea3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f8957600080fd5b505afa158015613f9d573d6000803e3d6000fd5b505050506040513d6020811015613fb357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156140a657600080fd5b505af11580156140ba573d6000803e3d6000fd5b505050506040513d60608110156140d057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061412389838773ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6141746149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6143016149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146143c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614448576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615df26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614514868530615364565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561458557600080fd5b505afa158015614599573d6000803e3d6000fd5b505050506040513d60208110156145af57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561466657600080fd5b505af115801561467a573d6000803e3d6000fd5b505050506040513d602081101561469057600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561475e57600080fd5b505af1158015614772573d6000803e3d6000fd5b505050506040513d604081101561478857600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b614952816040516024018080602001828103825283818151815260200191508051906020019080838360005b8381101561489e578082015181840152602081019050614883565b50505050905090810190601f1680156148cb5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b6149ef8160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b600033905090565b60008060008411614a73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614b203386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614abf57600080fd5b505afa158015614ad3573d6000803e3d6000fd5b505050506040513d6020811015614ae957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614ba157600080fd5b505af1158015614bb5573d6000803e3d6000fd5b505050506040513d6040811015614bcb57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614c2257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614cb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d8157600080fd5b505af1158015614d95573d6000803e3d6000fd5b505050506040513d6020811015614dab57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614e74578082015181840152602081019050614e59565b505050509050019650505050505050600060405180830381600087803b158015614e9d57600080fd5b505af1158015614eb1573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614edb57600080fd5b8101908080516040519392919084640100000000821115614efb57600080fd5b83820191506020820185811115614f1157600080fd5b8251866020820283011164010000000082111715614f2e57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614f65578082015181840152602081019050614f4a565b5050505090500160405250505092506001915050965096945050505050565b6150378363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159d5565b505050565b615123846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159d5565b50505050565b60008083141561513c57600090506151a9565b600082840290508284828161514d57fe5b04146151a4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615e186021913960400191505060405180910390fd5b809150505b92915050565b60008082840190508381101561522d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061527983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615c20565b905092915050565b60006152c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615ce6565b905092915050565b61536181604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b60008060008085116153de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561545c57600080fd5b505afa158015615470573d6000803e3d6000fd5b505050506040513d602081101561548657600080fd5b8101908080519060200190929190505050101561550b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156318773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561555657600080fd5b505afa15801561556a573d6000803e3d6000fd5b505050506040513d602081101561558057600080fd5b81019080805190602001909291905050506156238973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155d957600080fd5b505afa1580156155ed573d6000803e3d6000fd5b505050506040513d602081101561560357600080fd5b81019080805190602001909291905050508961512990919063ffffffff16565b61523790919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561567a57600080fd5b505afa15801561568e573d6000803e3d6000fd5b505050506040513d60208110156156a457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561573157600080fd5b505afa158015615745573d6000803e3d6000fd5b505050506040513d602081101561575b57600080fd5b810190808051906020019092919050505010156157e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61588d3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561582c57600080fd5b505afa158015615840573d6000803e3d6000fd5b505050506040513d602081101561585657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6158ba3388888a73ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561593c57600080fd5b505af1158015615950573d6000803e3d6000fd5b505050506040513d606081101561596657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b6159f48273ffffffffffffffffffffffffffffffffffffffff16615da6565b615a66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615ab55780518252602082019150602081019050602083039250615a92565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615b17576040519150601f19603f3d011682016040523d82523d6000602084013e615b1c565b606091505b509150915081615b94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615c1a57808060200190516020811015615bb357600080fd5b8101908080519060200190929190505050615c19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615e95602a913960400191505060405180910390fd5b5b50505050565b60008083118290615ccc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c91578082015181840152602081019050615c76565b50505050905090810190601f168015615cbe5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615cd857fe5b049050809150509392505050565b6000838311158290615d93576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d58578082015181840152602081019050615d3d565b50505050905090810190601f168015615d855780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615de857506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220619ad39cceac83afa349fb48fec165cb899a2ed6a9a5fc472fd67978863dfe9664736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index d4fee150..bc472265 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -256,7 +256,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Mints option and redeem tokens to this contract. address underlyingToken = IOption(optionAddress) .getUnderlyingTokenAddress(); - require(path[2] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); + require(path[1] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); // Mint optionTokens using the underlyingTokens received from UniswapV2 flashloan. // Sends underlyingTokens from this contract and to the optionToken contract, then calls mintOptions. @@ -273,10 +273,14 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Reverts if the last address in the path is not the underlyingToken address. // path[0] = redeemToken, path[1] = dai, path[2] = underlyingToken { - address original = to; - address pair = pairAddress; + //address pair = pairAddress; address underlyingToken_ = underlyingToken; + uint256[] memory amounts = router.getAmountsOut( + outputRedeems, + path + ); console.log("swapping"); + /* ( uint256[] memory amounts, bool isSuccess @@ -292,11 +296,13 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Fail early if the swap failed. console.log(success); require(success, "ERR_SWAP_FAILED"); + */ + // The remainder is the flash loan amount - amount from selling redeemTokens. uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by selling redeemTokens { uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed - uint256 paid = amounts[2]; // quantity of underlying tokens paid + uint256 paid = amounts[1]; // quantity of underlying tokens paid remainder = quantity .mul(1000) .add(quantity.mul(3)) @@ -305,11 +311,15 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { } console.log(remainder); + IERC20(IOption(optionAddress).redeemToken()).safeTransfer( + pairAddress, + outputRedeems + ); // Pull underlyingTokens from the original spender to pay the remainder of the flash loan. IERC20(underlyingToken_).safeTransferFrom( - original, - pair, + to, + pairAddress, remainder ); } @@ -317,6 +327,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Send optionTokens (long options) to the "original" address. IERC20(optionAddress).safeTransfer(to, outputOptions); // longOptionTokens emit FlashedShortOption(msg.sender, outputOptions); + return true; } function openFlashShort( @@ -326,11 +337,10 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { ) public { address redeemToken = optionToken.redeemToken(); address underlyingToken = optionToken.getUnderlyingTokenAddress(); - address pairAddress = factory.getPair(quoteToken, underlyingToken); - address[] memory path = new address[](3); + address pairAddress = factory.getPair(redeemToken, underlyingToken); + address[] memory path = new address[](2); path[0] = redeemToken; - path[1] = quoteToken; - path[2] = underlyingToken; + path[1] = underlyingToken; IUniswapV2Pair pair = IUniswapV2Pair(pairAddress); bytes4 selector = bytes4( @@ -650,7 +660,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address to, uint256 deadline ) internal returns (uint256[] memory amounts, bool success) { - console.log("swapping internal"); // Fails early if the token being swapped from is not the optionToken. require(path[0] == optionAddress, "ERR_PATH_OPTION_START"); @@ -658,11 +667,8 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { IUniswapV2Router02 router_ = router; // Approve the uniswap router to be able to transfer options from this contract. - console.log("approving router"); IERC20(optionAddress).approve(address(router_), uint256(-1)); // Call the Uniswap V2 function to swap optionTokens to quoteTokens. - //console.log("swapping now"); - console.log(amountOutMin); (amounts) = router_.swapExactTokensForTokens( amountIn, amountOutMin, @@ -670,7 +676,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { to, deadline ); - console.log("Swap success"); success = true; } diff --git a/test/test_uni_flash.js b/test/test_uni_flash.js index e473e3af..259c13b5 100644 --- a/test/test_uni_flash.js +++ b/test/test_uni_flash.js @@ -124,14 +124,12 @@ describe("UniswapConnector Flash", () => { // Create UNISWAP PAIRS // option <> dai: 1:10 ($10 option) 1,000 options and 10,000 dai (1,000 weth) - // weth <> dai: 1:100 ($100 weth) 1,000 weth and 100,000 dai - // redeem <> dai: 1:1 ($1 redeem) 100,000 redeems and 100,000 dai + // redeem <> weth: 100:1 ($1 redeem) 100,000 redeems and 1,000 weth const totalOptions = parseEther("1000"); const daiForOptionsPair = parseEther("100000"); const totalDai = parseEther("210000"); const totalWethForPair = parseEther("1000"); - const totalDaiForPair = parseEther("100000"); const totalRedeemForPair = parseEther("100000"); // MINT 2,010 WETH @@ -161,24 +159,12 @@ describe("UniswapConnector Flash", () => { deadline ); - // Add liquidity to weth <> dai pair - await uniswapRouter.addLiquidity( - weth.address, - dai.address, - totalWethForPair, - totalDaiForPair, - 0, - 0, - Alice, - deadline - ); - - // Add liquidity to redeem <> dai pair + // Add liquidity to redeem <> weth pair await uniswapRouter.addLiquidity( redeemToken.address, - dai.address, + weth.address, totalRedeemForPair, - totalDaiForPair, + totalWethForPair, 0, 0, Alice, From 0d8d39d9838e88c7c3d74eaeb2634522a6d1b0d1 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Wed, 28 Oct 2020 18:54:59 -0700 Subject: [PATCH 05/20] Proper test passing for the full execution call. --- artifacts/UniswapConnector.json | 12 +++- .../connectors/Uniswap/UniswapConnector.sol | 59 +++++++------------ test/test_uni_flash.js | 55 +++++++++++------ 3 files changed, 68 insertions(+), 58 deletions(-) diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index 386e38a5..e254c6f2 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -20,6 +20,12 @@ "internalType": "uint256", "name": "quantity", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "premium", + "type": "uint256" } ], "name": "FlashedShortOption", @@ -356,7 +362,7 @@ "outputs": [ { "internalType": "bool", - "name": "success", + "name": "", "type": "bool" } ], @@ -845,8 +851,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615ef480620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611fe4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121c7565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061232e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d061246e565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061247f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610772612660565b005b61077c6127e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061280e565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612938565b604051808215151515815260200191505060405180910390f35b610938612e84565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ead565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061355b565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506136c2565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613829565b604051808381526020018281526020019250505060405180910390f35b610bff614154565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061416c565b005b610c8d6142d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506142f9565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614506565b604051808215151515815260200191505060405180910390f35b610dc1614831565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f000000000000000000000000000000000000815250614857565b610ec382614955565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f476149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b06149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a306149fa565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614bfa565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611aab57600080fd5b505afa158015611abf573d6000803e3d6000fd5b505050506040513d6020811015611ad557600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611b1a5781602001602082028038833980820191505090505b5090508381600081518110611b2b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611b7357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615e39605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611cd2578082015181840152602081019050611cb7565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611da157600080fd5b505afa158015611db5573d6000803e3d6000fd5b505050506040513d6020811015611dcb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611dfe576000611e00565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6157600080fd5b505afa158015611e75573d6000803e3d6000fd5b505050506040513d6020811015611e8b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611ebd578b611ec0565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f6f578082015181840152602081019050611f54565b50505050905090810190601f168015611f9c5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015611fbe57600080fd5b505af1158015611fd2573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b1580156120d257600080fd5b505afa1580156120e6573d6000803e3d6000fd5b505050506040513d60208110156120fc57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156121b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6121bb8161247f565b91505095945050505050565b6121cf6149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612290576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561242857600080fd5b505af115801561243c573d6000803e3d6000fd5b505050506040513d602081101561245257600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561257757600080fd5b505afa15801561258b573d6000803e3d6000fd5b505050506040513d60208110156125a157600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612657576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126686149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612729576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128218a8989898989613829565b9150915060006128368a84848b8b8b8b612938565b9050806128ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff166129bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612a5033308a8473ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b600080612a5e8c8c306149fa565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b0957600080fd5b505af1158015612b1d573d6000803e3d6000fd5b505050506040513d6020811015612b3357600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612bec57600080fd5b505af1158015612c00573d6000803e3d6000fd5b505050506040513d6020811015612c1657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612d5957600080fd5b505af1158015612d6d573d6000803e3d6000fd5b505050506040513d6060811015612d8357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612e5633828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612df657600080fd5b505afa158015612e0a573d6000803e3d6000fd5b505050506040513d6020811015612e2057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612f24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612f6c57600080fd5b505afa158015612f80573d6000803e3d6000fd5b505050506040513d6020811015612f9657600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1685600181518110612fcd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461305e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61308988888373ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561310a57600080fd5b505af115801561311e573d6000803e3d6000fd5b505050506040513d604081101561313457600080fd5b810190808051906020019092919080519060200190929190505050915091506131916040518060400160405280600e81526020017f6d696e746564206f7074696f6e73000000000000000000000000000000000000815250614857565b60008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848b6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015613230578082015181840152602081019050613215565b50505050905001935050505060006040518083038186803b15801561325457600080fd5b505afa158015613268573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561329257600080fd5b81019080805160405193929190846401000000008211156132b257600080fd5b838201915060208201858111156132c857600080fd5b82518660208202830111640100000000821117156132e557600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561331c578082015181840152602081019050613301565b5050505090500160405250505090506133696040518060400160405280600881526020017f7377617070696e67000000000000000000000000000000000000000000000000815250614857565b6000808c905060008360018151811061337e57fe5b602002602001015190506133e8816133da6103e86133cc6133a960038861512990919063ffffffff16565b6133be6103e88961512990919063ffffffff16565b6151af90919063ffffffff16565b61523790919063ffffffff16565b61528190919063ffffffff16565b925050506133f5816152cb565b6134a08e858f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561344057600080fd5b505afa158015613454573d6000803e3d6000fd5b505050506040513d602081101561346a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b6134cd898f838673ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b5050506134fb86838c73ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a260019350505050979650505050505050565b6135636149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b6136ca6149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461378b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166138ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138ff8b61247f565b905061392e33308c8473ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139f757600080fd5b505af1158015613a0b573d6000803e3d6000fd5b505050506040513d6020811015613a2157600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613b5f57600080fd5b505af1158015613b73573d6000803e3d6000fd5b505050506040513d6040811015613b8957600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c7657600080fd5b505af1158015613c8a573d6000803e3d6000fd5b505050506040513d6020811015613ca057600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613cf857600080fd5b505afa158015613d0c573d6000803e3d6000fd5b505050506040513d6020811015613d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613dd957600080fd5b505af1158015613ded573d6000803e3d6000fd5b505050506040513d6020811015613e0357600080fd5b8101908080519060200190929190505050506000613f3b8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613e6057600080fd5b505afa158015613e74573d6000803e3d6000fd5b505050506040513d6020811015613e8a57600080fd5b8101908080519060200190929190505050613f2d8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ee357600080fd5b505afa158015613ef7573d6000803e3d6000fd5b505050506040513d6020811015613f0d57600080fd5b81019080805190602001909291905050508761512990919063ffffffff16565b61523790919063ffffffff16565b9050613fea3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f8957600080fd5b505afa158015613f9d573d6000803e3d6000fd5b505050506040513d6020811015613fb357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156140a657600080fd5b505af11580156140ba573d6000803e3d6000fd5b505050506040513d60608110156140d057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061412389838773ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6141746149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6143016149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146143c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614448576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615df26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614514868530615364565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561458557600080fd5b505afa158015614599573d6000803e3d6000fd5b505050506040513d60208110156145af57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561466657600080fd5b505af115801561467a573d6000803e3d6000fd5b505050506040513d602081101561469057600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561475e57600080fd5b505af1158015614772573d6000803e3d6000fd5b505050506040513d604081101561478857600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b614952816040516024018080602001828103825283818151815260200191508051906020019080838360005b8381101561489e578082015181840152602081019050614883565b50505050905090810190601f1680156148cb5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b6149ef8160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b600033905090565b60008060008411614a73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614b203386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614abf57600080fd5b505afa158015614ad3573d6000803e3d6000fd5b505050506040513d6020811015614ae957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614ba157600080fd5b505af1158015614bb5573d6000803e3d6000fd5b505050506040513d6040811015614bcb57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614c2257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614cb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d8157600080fd5b505af1158015614d95573d6000803e3d6000fd5b505050506040513d6020811015614dab57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614e74578082015181840152602081019050614e59565b505050509050019650505050505050600060405180830381600087803b158015614e9d57600080fd5b505af1158015614eb1573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614edb57600080fd5b8101908080516040519392919084640100000000821115614efb57600080fd5b83820191506020820185811115614f1157600080fd5b8251866020820283011164010000000082111715614f2e57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614f65578082015181840152602081019050614f4a565b5050505090500160405250505092506001915050965096945050505050565b6150378363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159d5565b505050565b615123846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159d5565b50505050565b60008083141561513c57600090506151a9565b600082840290508284828161514d57fe5b04146151a4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615e186021913960400191505060405180910390fd5b809150505b92915050565b60008082840190508381101561522d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061527983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615c20565b905092915050565b60006152c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615ce6565b905092915050565b61536181604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b60008060008085116153de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561545c57600080fd5b505afa158015615470573d6000803e3d6000fd5b505050506040513d602081101561548657600080fd5b8101908080519060200190929190505050101561550b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156318773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561555657600080fd5b505afa15801561556a573d6000803e3d6000fd5b505050506040513d602081101561558057600080fd5b81019080805190602001909291905050506156238973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155d957600080fd5b505afa1580156155ed573d6000803e3d6000fd5b505050506040513d602081101561560357600080fd5b81019080805190602001909291905050508961512990919063ffffffff16565b61523790919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561567a57600080fd5b505afa15801561568e573d6000803e3d6000fd5b505050506040513d60208110156156a457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561573157600080fd5b505afa158015615745573d6000803e3d6000fd5b505050506040513d602081101561575b57600080fd5b810190808051906020019092919050505010156157e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61588d3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561582c57600080fd5b505afa158015615840573d6000803e3d6000fd5b505050506040513d602081101561585657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6158ba3388888a73ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561593c57600080fd5b505af1158015615950573d6000803e3d6000fd5b505050506040513d606081101561596657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b6159f48273ffffffffffffffffffffffffffffffffffffffff16615da6565b615a66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615ab55780518252602082019150602081019050602083039250615a92565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615b17576040519150601f19603f3d011682016040523d82523d6000602084013e615b1c565b606091505b509150915081615b94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615c1a57808060200190516020811015615bb357600080fd5b8101908080519060200190929190505050615c19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615e95602a913960400191505060405180910390fd5b5b50505050565b60008083118290615ccc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c91578082015181840152602081019050615c76565b50505050905090810190601f168015615cbe5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615cd857fe5b049050809150509392505050565b6000838311158290615d93576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d58578082015181840152602081019050615d3d565b50505050905090810190601f168015615d855780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615de857506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220619ad39cceac83afa349fb48fec165cb899a2ed6a9a5fc472fd67978863dfe9664736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3f565b005b610327611582565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115a8565b005b6103b561170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611735565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611fe4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121c7565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061232e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d061246e565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061247f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610772612660565b005b61077c6127e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061280e565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612938565b604051808215151515815260200191505060405180910390f35b610938612e84565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ead565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061355b565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506136c2565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613829565b604051808381526020018281526020019250505060405180910390f35b610bff614154565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061416c565b005b610c8d6142d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506142f9565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614506565b604051808215151515815260200191505060405180910390f35b610dc1614831565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b5091509150610eba6040518060400160405280600e81526020017f4973205375636365737366756c3f000000000000000000000000000000000000815250614857565b610ec382614955565b81610f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f476149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611254576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115b06149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611671576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006117458a8a306149fa565b91509150600061179a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a614bfa565b91505080611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6118bb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561185b57600080fd5b505afa15801561186f573d6000803e3d6000fd5b505050506040513d602081101561188557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191457600080fd5b505afa158015611928573d6000803e3d6000fd5b505050506040513d602081101561193e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561199957600080fd5b505afa1580156119ad573d6000803e3d6000fd5b505050506040513d60208110156119c357600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611aab57600080fd5b505afa158015611abf573d6000803e3d6000fd5b505050506040513d6020811015611ad557600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611b1a5781602001602082028038833980820191505090505b5090508381600081518110611b2b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611b7357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615e39605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611cd2578082015181840152602081019050611cb7565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611da157600080fd5b505afa158015611db5573d6000803e3d6000fd5b505050506040513d6020811015611dcb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611dfe576000611e00565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6157600080fd5b505afa158015611e75573d6000803e3d6000fd5b505050506040513d6020811015611e8b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611ebd578b611ec0565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f6f578082015181840152602081019050611f54565b50505050905090810190601f168015611f9c5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015611fbe57600080fd5b505af1158015611fd2573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b1580156120d257600080fd5b505afa1580156120e6573d6000803e3d6000fd5b505050506040513d60208110156120fc57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156121b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b6121bb8161247f565b91505095945050505050565b6121cf6149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612290576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561242857600080fd5b505af115801561243c573d6000803e3d6000fd5b505050506040513d602081101561245257600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561257757600080fd5b505afa15801561258b573d6000803e3d6000fd5b505050506040513d60208110156125a157600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612657576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b6126686149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612729576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128218a8989898989613829565b9150915060006128368a84848b8b8b8b612938565b9050806128ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff166129bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612a5033308a8473ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b600080612a5e8c8c306149fa565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612b0957600080fd5b505af1158015612b1d573d6000803e3d6000fd5b505050506040513d6020811015612b3357600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612bec57600080fd5b505af1158015612c00573d6000803e3d6000fd5b505050506040513d6020811015612c1657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612d5957600080fd5b505af1158015612d6d573d6000803e3d6000fd5b505050506040513d6060811015612d8357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612e5633828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612df657600080fd5b505afa158015612e0a573d6000803e3d6000fd5b505050506040513d6020811015612e2057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612f24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612f6c57600080fd5b505afa158015612f80573d6000803e3d6000fd5b505050506040513d6020811015612f9657600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1685600181518110612fcd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461305e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61308988888373ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561310a57600080fd5b505af115801561311e573d6000803e3d6000fd5b505050506040513d604081101561313457600080fd5b810190808051906020019092919080519060200190929190505050915091506131916040518060400160405280600e81526020017f6d696e746564206f7074696f6e73000000000000000000000000000000000000815250614857565b60008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848b6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015613230578082015181840152602081019050613215565b50505050905001935050505060006040518083038186803b15801561325457600080fd5b505afa158015613268573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561329257600080fd5b81019080805160405193929190846401000000008211156132b257600080fd5b838201915060208201858111156132c857600080fd5b82518660208202830111640100000000821117156132e557600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561331c578082015181840152602081019050613301565b5050505090500160405250505090506133696040518060400160405280600881526020017f7377617070696e67000000000000000000000000000000000000000000000000815250614857565b6000808c905060008360018151811061337e57fe5b602002602001015190506133e8816133da6103e86133cc6133a960038861512990919063ffffffff16565b6133be6103e88961512990919063ffffffff16565b6151af90919063ffffffff16565b61523790919063ffffffff16565b61528190919063ffffffff16565b925050506133f5816152cb565b6134a08e858f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561344057600080fd5b505afa158015613454573d6000803e3d6000fd5b505050506040513d602081101561346a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b6134cd898f838673ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b5050506134fb86838c73ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fa8692aee9b4e83142b0d8b069117e7b14b7f24d35ec9dc4f31a3049f940a6283836040518082815260200191505060405180910390a260019350505050979650505050505050565b6135636149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b6136ca6149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461378b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166138ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089905060006138ff8b61247f565b905061392e33308c8473ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139f757600080fd5b505af1158015613a0b573d6000803e3d6000fd5b505050506040513d6020811015613a2157600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613b5f57600080fd5b505af1158015613b73573d6000803e3d6000fd5b505050506040513d6040811015613b8957600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c7657600080fd5b505af1158015613c8a573d6000803e3d6000fd5b505050506040513d6020811015613ca057600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613cf857600080fd5b505afa158015613d0c573d6000803e3d6000fd5b505050506040513d6020811015613d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613dd957600080fd5b505af1158015613ded573d6000803e3d6000fd5b505050506040513d6020811015613e0357600080fd5b8101908080519060200190929190505050506000613f3b8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613e6057600080fd5b505afa158015613e74573d6000803e3d6000fd5b505050506040513d6020811015613e8a57600080fd5b8101908080519060200190929190505050613f2d8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ee357600080fd5b505afa158015613ef7573d6000803e3d6000fd5b505050506040513d6020811015613f0d57600080fd5b81019080805190602001909291905050508761512990919063ffffffff16565b61523790919063ffffffff16565b9050613fea3330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f8957600080fd5b505afa158015613f9d573d6000803e3d6000fd5b505050506040513d6020811015613fb357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156140a657600080fd5b505af11580156140ba573d6000803e3d6000fd5b505050506040513d60608110156140d057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061412389838773ffffffffffffffffffffffffffffffffffffffff16614f849092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6141746149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6143016149f2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146143c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614448576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615df26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614514868530615364565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561458557600080fd5b505afa158015614599573d6000803e3d6000fd5b505050506040513d60208110156145af57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561466657600080fd5b505af115801561467a573d6000803e3d6000fd5b505050506040513d602081101561469057600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561475e57600080fd5b505af1158015614772573d6000803e3d6000fd5b505050506040513d604081101561478857600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b614952816040516024018080602001828103825283818151815260200191508051906020019080838360005b8381101561489e578082015181840152602081019050614883565b50505050905090810190601f1680156148cb5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b6149ef8160405160240180821515151581526020019150506040516020818303038152906040527f32458eed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b600033905090565b60008060008411614a73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614b203386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614abf57600080fd5b505afa158015614ad3573d6000803e3d6000fd5b505050506040513d6020811015614ae957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614ba157600080fd5b505af1158015614bb5573d6000803e3d6000fd5b505050506040513d6040811015614bcb57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614c2257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614cb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d8157600080fd5b505af1158015614d95573d6000803e3d6000fd5b505050506040513d6020811015614dab57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614e74578082015181840152602081019050614e59565b505050509050019650505050505050600060405180830381600087803b158015614e9d57600080fd5b505af1158015614eb1573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614edb57600080fd5b8101908080516040519392919084640100000000821115614efb57600080fd5b83820191506020820185811115614f1157600080fd5b8251866020820283011164010000000082111715614f2e57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614f65578082015181840152602081019050614f4a565b5050505090500160405250505092506001915050965096945050505050565b6150378363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159d5565b505050565b615123846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159d5565b50505050565b60008083141561513c57600090506151a9565b600082840290508284828161514d57fe5b04146151a4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615e186021913960400191505060405180910390fd5b809150505b92915050565b60008082840190508381101561522d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061527983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615c20565b905092915050565b60006152c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615ce6565b905092915050565b61536181604051602401808281526020019150506040516020818303038152906040527ff5b1bba9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506159ac565b50565b60008060008085116153de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561545c57600080fd5b505afa158015615470573d6000803e3d6000fd5b505050506040513d602081101561548657600080fd5b8101908080519060200190929190505050101561550b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006156318773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561555657600080fd5b505afa15801561556a573d6000803e3d6000fd5b505050506040513d602081101561558057600080fd5b81019080805190602001909291905050506156238973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155d957600080fd5b505afa1580156155ed573d6000803e3d6000fd5b505050506040513d602081101561560357600080fd5b81019080805190602001909291905050508961512990919063ffffffff16565b61523790919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561567a57600080fd5b505afa15801561568e573d6000803e3d6000fd5b505050506040513d60208110156156a457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561573157600080fd5b505afa158015615745573d6000803e3d6000fd5b505050506040513d602081101561575b57600080fd5b810190808051906020019092919050505010156157e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61588d3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561582c57600080fd5b505afa158015615840573d6000803e3d6000fd5b505050506040513d602081101561585657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6158ba3388888a73ffffffffffffffffffffffffffffffffffffffff1661503c909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561593c57600080fd5b505af1158015615950573d6000803e3d6000fd5b505050506040513d606081101561596657600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b6159f48273ffffffffffffffffffffffffffffffffffffffff16615da6565b615a66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310615ab55780518252602082019150602081019050602083039250615a92565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615b17576040519150601f19603f3d011682016040523d82523d6000602084013e615b1c565b606091505b509150915081615b94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615c1a57808060200190516020811015615bb357600080fd5b8101908080519060200190929190505050615c19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615e95602a913960400191505060405180910390fd5b5b50505050565b60008083118290615ccc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c91578082015181840152602081019050615c76565b50505050905090810190601f168015615cbe5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615cd857fe5b049050809150509392505050565b6000838311158290615d93576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615d58578082015181840152602081019050615d3d565b50505050905090810190601f168015615d855780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615de857506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220619ad39cceac83afa349fb48fec165cb899a2ed6a9a5fc472fd67978863dfe9664736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615bd380620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef8565b005b61032761153b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611561565b005b6103b56116c8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116ee565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611885565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611f9d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612180565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506122e7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d0612427565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612438565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610772612619565b005b61077c6127a1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506127c7565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128f1565b604051808215151515815260200191505060405180910390f35b610938612e3d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612e66565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613497565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135fe565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613765565b604051808381526020018281526020019250505060405180910390f35b610bff614090565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140a8565b005b610c8d61420f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614235565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614442565b604051808215151515815260200191505060405180910390f35b610dc161476d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b509150915081610eef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f00614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461120d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611395576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611569614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461162a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006116fe8a8a3061479b565b9150915060006117538b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a61499b565b915050806117c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61187486838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561181457600080fd5b505afa158015611828573d6000803e3d6000fd5b505050506040513d602081101561183e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118cd57600080fd5b505afa1580156118e1573d6000803e3d6000fd5b505050506040513d60208110156118f757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561195257600080fd5b505afa158015611966573d6000803e3d6000fd5b505050506040513d602081101561197c57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611a6457600080fd5b505afa158015611a78573d6000803e3d6000fd5b505050506040513d6020811015611a8e57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611ad35781602001602082028038833980820191505090505b5090508381600081518110611ae457fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611b2c57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615b18605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611c8b578082015181840152602081019050611c70565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611d5a57600080fd5b505afa158015611d6e573d6000803e3d6000fd5b505050506040513d6020811015611d8457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611db7576000611db9565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e1a57600080fd5b505afa158015611e2e573d6000803e3d6000fd5b505050506040513d6020811015611e4457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e76578b611e79565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f28578082015181840152602081019050611f0d565b50505050905090810190601f168015611f555780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015611f7757600080fd5b505af1158015611f8b573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561208b57600080fd5b505afa15801561209f573d6000803e3d6000fd5b505050506040513d60208110156120b557600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561216b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61217481612438565b91505095945050505050565b612188614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612249576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156123e157600080fd5b505af11580156123f5573d6000803e3d6000fd5b505050506040513d602081101561240b57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561253057600080fd5b505afa158015612544573d6000803e3d6000fd5b505050506040513d602081101561255a57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612610576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b612621614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146126e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006127da8a8989898989613765565b9150915060006127ef8a84848b8b8b8b6128f1565b905080612864576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612974576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612a0933308a8473ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b600080612a178c8c3061479b565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612ac257600080fd5b505af1158015612ad6573d6000803e3d6000fd5b505050506040513d6020811015612aec57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612ba557600080fd5b505af1158015612bb9573d6000803e3d6000fd5b505050506040513d6020811015612bcf57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612d1257600080fd5b505af1158015612d26573d6000803e3d6000fd5b505050506040513d6060811015612d3c57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612e0f33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612daf57600080fd5b505afa158015612dc3573d6000803e3d6000fd5b505050506040513d6020811015612dd957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612edd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612f2557600080fd5b505afa158015612f39573d6000803e3d6000fd5b505050506040513d6020811015612f4f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1685600181518110612f8657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61304288888373ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156130c357600080fd5b505af11580156130d7573d6000803e3d6000fd5b505050506040513d60408110156130ed57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848b6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156131ab578082015181840152602081019050613190565b50505050905001935050505060006040518083038186803b1580156131cf57600080fd5b505afa1580156131e3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561320d57600080fd5b810190808051604051939291908464010000000082111561322d57600080fd5b8382019150602082018581111561324357600080fd5b825186602082028301116401000000008211171561326057600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561329757808201518184015260208101905061327c565b5050505090500160405250505090506000808c90506000836001815181106132bb57fe5b60200260200101519050613325816133176103e86133096132e6600388614eca90919063ffffffff16565b6132fb6103e889614eca90919063ffffffff16565b614f5090919063ffffffff16565b614fd890919063ffffffff16565b61502290919063ffffffff16565b925050506133d48e858f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561337457600080fd5b505afa158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b613401898f838673ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a250505061348586838c73ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b60019350505050979650505050505050565b61349f614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613560576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b613606614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166137ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000899050600061383b8b612438565b905061386a33308c8473ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561393357600080fd5b505af1158015613947573d6000803e3d6000fd5b505050506040513d602081101561395d57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613a9b57600080fd5b505af1158015613aaf573d6000803e3d6000fd5b505050506040513d6040811015613ac557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bb257600080fd5b505af1158015613bc6573d6000803e3d6000fd5b505050506040513d6020811015613bdc57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c3457600080fd5b505afa158015613c48573d6000803e3d6000fd5b505050506040513d6020811015613c5e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d1557600080fd5b505af1158015613d29573d6000803e3d6000fd5b505050506040513d6020811015613d3f57600080fd5b8101908080519060200190929190505050506000613e778573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613d9c57600080fd5b505afa158015613db0573d6000803e3d6000fd5b505050506040513d6020811015613dc657600080fd5b8101908080519060200190929190505050613e698773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e1f57600080fd5b505afa158015613e33573d6000803e3d6000fd5b505050506040513d6020811015613e4957600080fd5b810190808051906020019092919050505087614eca90919063ffffffff16565b614fd890919063ffffffff16565b9050613f263330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ec557600080fd5b505afa158015613ed9573d6000803e3d6000fd5b505050506040513d6020811015613eef57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613fe257600080fd5b505af1158015613ff6573d6000803e3d6000fd5b505050506040513d606081101561400c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061405f89838773ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140b0614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61423d614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146142fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614384576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ad16026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061445086853061506c565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144c157600080fd5b505afa1580156144d5573d6000803e3d6000fd5b505050506040513d60208110156144eb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145a257600080fd5b505af11580156145b6573d6000803e3d6000fd5b505050506040513d60208110156145cc57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561469a57600080fd5b505af11580156146ae573d6000803e3d6000fd5b505050506040513d60408110156146c457600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b60008060008411614814576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6148c13386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d602081101561488a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561494257600080fd5b505af1158015614956573d6000803e3d6000fd5b505050506040513d604081101561496c57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106149c357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614a54576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614b2257600080fd5b505af1158015614b36573d6000803e3d6000fd5b505050506040513d6020811015614b4c57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614c15578082015181840152602081019050614bfa565b505050509050019650505050505050600060405180830381600087803b158015614c3e57600080fd5b505af1158015614c52573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614c7c57600080fd5b8101908080516040519392919084640100000000821115614c9c57600080fd5b83820191506020820185811115614cb257600080fd5b8251866020820283011164010000000082111715614ccf57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614d06578082015181840152602081019050614ceb565b5050505090500160405250505092506001915050965096945050505050565b614dd88363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156b4565b505050565b614ec4846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156b4565b50505050565b600080831415614edd5760009050614f4a565b6000828402905082848281614eee57fe5b0414614f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615af76021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015614fce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061501a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506158ff565b905092915050565b600061506483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506159c5565b905092915050565b60008060008085116150e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561516457600080fd5b505afa158015615178573d6000803e3d6000fd5b505050506040513d602081101561518e57600080fd5b81019080805190602001909291905050501015615213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006153398773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561525e57600080fd5b505afa158015615272573d6000803e3d6000fd5b505050506040513d602081101561528857600080fd5b810190808051906020019092919050505061532b8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156152e157600080fd5b505afa1580156152f5573d6000803e3d6000fd5b505050506040513d602081101561530b57600080fd5b810190808051906020019092919050505089614eca90919063ffffffff16565b614fd890919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561538257600080fd5b505afa158015615396573d6000803e3d6000fd5b505050506040513d60208110156153ac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561543957600080fd5b505afa15801561544d573d6000803e3d6000fd5b505050506040513d602081101561546357600080fd5b810190808051906020019092919050505010156154e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6155953388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561553457600080fd5b505afa158015615548573d6000803e3d6000fd5b505050506040513d602081101561555e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6155c23388888a73ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561564457600080fd5b505af1158015615658573d6000803e3d6000fd5b505050506040513d606081101561566e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6156d38273ffffffffffffffffffffffffffffffffffffffff16615a85565b615745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106157945780518252602082019150602081019050602083039250615771565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146157f6576040519150601f19603f3d011682016040523d82523d6000602084013e6157fb565b606091505b509150915081615873576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156158f95780806020019051602081101561589257600080fd5b81019080805190602001909291905050506158f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b74602a913960400191505060405180910390fd5b5b50505050565b600080831182906159ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615970578082015181840152602081019050615955565b50505050905090810190601f16801561599d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816159b757fe5b049050809150509392505050565b6000838311158290615a72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a37578082015181840152602081019050615a1c565b50505050905090810190601f168015615a645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ac757506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d5906128270e3b2736a3bb842d07f3cb9d5d493d5c012eddd7523274b3adabe364736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef8565b005b61032761153b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611561565b005b6103b56116c8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116ee565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611885565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611f9d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612180565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506122e7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d0612427565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612438565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610772612619565b005b61077c6127a1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506127c7565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128f1565b604051808215151515815260200191505060405180910390f35b610938612e3d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612e66565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613497565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135fe565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613765565b604051808381526020018281526020019250505060405180910390f35b610bff614090565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140a8565b005b610c8d61420f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614235565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614442565b604051808215151515815260200191505060405180910390f35b610dc161476d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b509150915081610eef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f00614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461120d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611395576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611569614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461162a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006116fe8a8a3061479b565b9150915060006117538b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a61499b565b915050806117c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61187486838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561181457600080fd5b505afa158015611828573d6000803e3d6000fd5b505050506040513d602081101561183e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118cd57600080fd5b505afa1580156118e1573d6000803e3d6000fd5b505050506040513d60208110156118f757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561195257600080fd5b505afa158015611966573d6000803e3d6000fd5b505050506040513d602081101561197c57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611a6457600080fd5b505afa158015611a78573d6000803e3d6000fd5b505050506040513d6020811015611a8e57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611ad35781602001602082028038833980820191505090505b5090508381600081518110611ae457fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611b2c57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615b18605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611c8b578082015181840152602081019050611c70565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611d5a57600080fd5b505afa158015611d6e573d6000803e3d6000fd5b505050506040513d6020811015611d8457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611db7576000611db9565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e1a57600080fd5b505afa158015611e2e573d6000803e3d6000fd5b505050506040513d6020811015611e4457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e76578b611e79565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f28578082015181840152602081019050611f0d565b50505050905090810190601f168015611f555780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015611f7757600080fd5b505af1158015611f8b573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561208b57600080fd5b505afa15801561209f573d6000803e3d6000fd5b505050506040513d60208110156120b557600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561216b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61217481612438565b91505095945050505050565b612188614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612249576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156123e157600080fd5b505af11580156123f5573d6000803e3d6000fd5b505050506040513d602081101561240b57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561253057600080fd5b505afa158015612544573d6000803e3d6000fd5b505050506040513d602081101561255a57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612610576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b612621614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146126e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006127da8a8989898989613765565b9150915060006127ef8a84848b8b8b8b6128f1565b905080612864576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612974576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612a0933308a8473ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b600080612a178c8c3061479b565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612ac257600080fd5b505af1158015612ad6573d6000803e3d6000fd5b505050506040513d6020811015612aec57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612ba557600080fd5b505af1158015612bb9573d6000803e3d6000fd5b505050506040513d6020811015612bcf57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612d1257600080fd5b505af1158015612d26573d6000803e3d6000fd5b505050506040513d6060811015612d3c57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612e0f33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612daf57600080fd5b505afa158015612dc3573d6000803e3d6000fd5b505050506040513d6020811015612dd957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612edd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612f2557600080fd5b505afa158015612f39573d6000803e3d6000fd5b505050506040513d6020811015612f4f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1685600181518110612f8657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61304288888373ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156130c357600080fd5b505af11580156130d7573d6000803e3d6000fd5b505050506040513d60408110156130ed57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848b6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156131ab578082015181840152602081019050613190565b50505050905001935050505060006040518083038186803b1580156131cf57600080fd5b505afa1580156131e3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561320d57600080fd5b810190808051604051939291908464010000000082111561322d57600080fd5b8382019150602082018581111561324357600080fd5b825186602082028301116401000000008211171561326057600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561329757808201518184015260208101905061327c565b5050505090500160405250505090506000808c90506000836001815181106132bb57fe5b60200260200101519050613325816133176103e86133096132e6600388614eca90919063ffffffff16565b6132fb6103e889614eca90919063ffffffff16565b614f5090919063ffffffff16565b614fd890919063ffffffff16565b61502290919063ffffffff16565b925050506133d48e858f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561337457600080fd5b505afa158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b613401898f838673ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a250505061348586838c73ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b60019350505050979650505050505050565b61349f614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613560576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b613606614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166137ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000899050600061383b8b612438565b905061386a33308c8473ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561393357600080fd5b505af1158015613947573d6000803e3d6000fd5b505050506040513d602081101561395d57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613a9b57600080fd5b505af1158015613aaf573d6000803e3d6000fd5b505050506040513d6040811015613ac557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bb257600080fd5b505af1158015613bc6573d6000803e3d6000fd5b505050506040513d6020811015613bdc57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c3457600080fd5b505afa158015613c48573d6000803e3d6000fd5b505050506040513d6020811015613c5e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d1557600080fd5b505af1158015613d29573d6000803e3d6000fd5b505050506040513d6020811015613d3f57600080fd5b8101908080519060200190929190505050506000613e778573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613d9c57600080fd5b505afa158015613db0573d6000803e3d6000fd5b505050506040513d6020811015613dc657600080fd5b8101908080519060200190929190505050613e698773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e1f57600080fd5b505afa158015613e33573d6000803e3d6000fd5b505050506040513d6020811015613e4957600080fd5b810190808051906020019092919050505087614eca90919063ffffffff16565b614fd890919063ffffffff16565b9050613f263330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ec557600080fd5b505afa158015613ed9573d6000803e3d6000fd5b505050506040513d6020811015613eef57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613fe257600080fd5b505af1158015613ff6573d6000803e3d6000fd5b505050506040513d606081101561400c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061405f89838773ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140b0614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61423d614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146142fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614384576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ad16026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061445086853061506c565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144c157600080fd5b505afa1580156144d5573d6000803e3d6000fd5b505050506040513d60208110156144eb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145a257600080fd5b505af11580156145b6573d6000803e3d6000fd5b505050506040513d60208110156145cc57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561469a57600080fd5b505af11580156146ae573d6000803e3d6000fd5b505050506040513d60408110156146c457600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b60008060008411614814576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6148c13386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d602081101561488a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561494257600080fd5b505af1158015614956573d6000803e3d6000fd5b505050506040513d604081101561496c57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106149c357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614a54576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614b2257600080fd5b505af1158015614b36573d6000803e3d6000fd5b505050506040513d6020811015614b4c57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614c15578082015181840152602081019050614bfa565b505050509050019650505050505050600060405180830381600087803b158015614c3e57600080fd5b505af1158015614c52573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614c7c57600080fd5b8101908080516040519392919084640100000000821115614c9c57600080fd5b83820191506020820185811115614cb257600080fd5b8251866020820283011164010000000082111715614ccf57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614d06578082015181840152602081019050614ceb565b5050505090500160405250505092506001915050965096945050505050565b614dd88363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156b4565b505050565b614ec4846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156b4565b50505050565b600080831415614edd5760009050614f4a565b6000828402905082848281614eee57fe5b0414614f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615af76021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015614fce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061501a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506158ff565b905092915050565b600061506483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506159c5565b905092915050565b60008060008085116150e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561516457600080fd5b505afa158015615178573d6000803e3d6000fd5b505050506040513d602081101561518e57600080fd5b81019080805190602001909291905050501015615213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006153398773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561525e57600080fd5b505afa158015615272573d6000803e3d6000fd5b505050506040513d602081101561528857600080fd5b810190808051906020019092919050505061532b8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156152e157600080fd5b505afa1580156152f5573d6000803e3d6000fd5b505050506040513d602081101561530b57600080fd5b810190808051906020019092919050505089614eca90919063ffffffff16565b614fd890919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561538257600080fd5b505afa158015615396573d6000803e3d6000fd5b505050506040513d60208110156153ac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561543957600080fd5b505afa15801561544d573d6000803e3d6000fd5b505050506040513d602081101561546357600080fd5b810190808051906020019092919050505010156154e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6155953388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561553457600080fd5b505afa158015615548573d6000803e3d6000fd5b505050506040513d602081101561555e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6155c23388888a73ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561564457600080fd5b505af1158015615658573d6000803e3d6000fd5b505050506040513d606081101561566e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6156d38273ffffffffffffffffffffffffffffffffffffffff16615a85565b615745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106157945780518252602082019150602081019050602083039250615771565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146157f6576040519150601f19603f3d011682016040523d82523d6000602084013e6157fb565b606091505b509150915081615873576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156158f95780806020019051602081101561589257600080fd5b81019080805190602001909291905050506158f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b74602a913960400191505060405180910390fd5b5b50505050565b600080831182906159ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615970578082015181840152602081019050615955565b50505050905090810190601f16801561599d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816159b757fe5b049050809150509392505050565b6000838311158290615a72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a37578082015181840152602081019050615a1c565b50505050905090810190601f168015615a645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ac757506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d5906128270e3b2736a3bb842d07f3cb9d5d493d5c012eddd7523274b3adabe364736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index bc472265..32862ea8 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -53,7 +53,11 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { event UpdatedTrader(address indexed from, address indexed newTrader); event UpdatedRegistry(address indexed from, address indexed newRegistry); event UpdatedQuoteToken(address indexed from, address indexed newQuote); - event FlashedShortOption(address indexed from, uint256 quantity); + event FlashedShortOption( + address indexed from, + uint256 quantity, + uint256 premium + ); event RolledOptions( address indexed from, @@ -249,60 +253,43 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address[] memory path, address to, uint256 deadline - ) public returns (bool success) { + ) public returns (bool) { require(flashLoanQuantity > 0, "ERR_ZERO"); // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. + // We are flash swapping from an asset <> redeem pair, paying back a portion using minted redeemTokens + // and any remainder of asset. // Mints option and redeem tokens to this contract. address underlyingToken = IOption(optionAddress) .getUnderlyingTokenAddress(); require(path[1] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); - // Mint optionTokens using the underlyingTokens received from UniswapV2 flashloan. - // Sends underlyingTokens from this contract and to the optionToken contract, then calls mintOptions. + // Mint optionTokens using the underlyingTokens received from UniswapV2 flash swap. + // Send underlyingTokens from this contract to the optionToken contract, then call mintOptions. // This contract receives the newly minted option and redeem tokens. IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity); (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress) .mintOptions(address(this)); - console.log("minted options"); - - // Need to pay back the UniswapV2 flash loan by selling the redeemToken, then paying the remainder. + // Need to return tokens from the flash swap by returning redeemTokens and any remainder of underlyingTokens. // Swaps redeemTokens to the token specified at the end of the path, then sends to UniswapV2Pair. // Reverts if the first address in the path is not the redeemToken address. // Reverts if the last address in the path is not the underlyingToken address. - // path[0] = redeemToken, path[1] = dai, path[2] = underlyingToken + // path[0] = redeemToken, path[1] = underlyingToken { - //address pair = pairAddress; address underlyingToken_ = underlyingToken; + // Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of redeemTokens. uint256[] memory amounts = router.getAmountsOut( outputRedeems, path ); - console.log("swapping"); - /* - ( - uint256[] memory amounts, - bool isSuccess - ) = _swapExactOptionsForTokens( - IOption(optionAddress).redeemToken(), - outputRedeems, // shortOptionTokens = redeemTokens - amountOutMin, - path, - pair, - deadline - ); - success = isSuccess; - // Fail early if the swap failed. - console.log(success); - require(success, "ERR_SWAP_FAILED"); - */ - - // The remainder is the flash loan amount - amount from selling redeemTokens. - uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by selling redeemTokens + + // The remainder is the flash loan amount - amount paid for from redeemTokens. + uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by returning redeemTokens. { uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed - uint256 paid = amounts[1]; // quantity of underlying tokens paid + uint256 paid = amounts[1]; // quantity of underlyingTokens paid by redeemTokens + // consider the swap fee remainder = quantity .mul(1000) .add(quantity.mul(3)) @@ -310,23 +297,23 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { .sub(paid); } - console.log(remainder); + // Pay back the pair in redeemTokens IERC20(IOption(optionAddress).redeemToken()).safeTransfer( pairAddress, outputRedeems ); - // Pull underlyingTokens from the original spender to pay the remainder of the flash loan. + // Pull underlyingTokens from the original spender to pay the remainder of the flash swap. IERC20(underlyingToken_).safeTransferFrom( to, pairAddress, remainder ); + emit FlashedShortOption(msg.sender, outputOptions, remainder); } // Send optionTokens (long options) to the "original" address. - IERC20(optionAddress).safeTransfer(to, outputOptions); // longOptionTokens - emit FlashedShortOption(msg.sender, outputOptions); + IERC20(optionAddress).safeTransfer(to, outputOptions); // option = longOptionTokens return true; } @@ -380,8 +367,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { bytes calldata data ) external override { (bool success, bytes memory returnData) = address(this).call(data); - console.log("Is Successful?"); - console.logBool(success); require(success, "ERR_UNISWAPV2_CALL_FAIL"); } diff --git a/test/test_uni_flash.js b/test/test_uni_flash.js index 259c13b5..1ddc8c7c 100644 --- a/test/test_uni_flash.js +++ b/test/test_uni_flash.js @@ -225,6 +225,9 @@ describe("UniswapConnector Flash", () => { describe("openFlashShort", () => { it("gets a flash loan for underlyings, mints options, swaps redeem to underlyings to pay back", async () => { // Create a Uniswap V2 Pair and add liquidity. + console.log( + `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` + ); console.log( `Redeem balance: ${formatEther( await redeemToken.balanceOf(Alice) @@ -237,20 +240,6 @@ describe("UniswapConnector Flash", () => { )}` ); - console.log( - `redeem dai pair: ${await uniswapFactory.getPair( - redeemToken.address, - dai.address - )}` - ); - - console.log( - `dai weth pair: ${await uniswapFactory.getPair( - weth.address, - dai.address - )}` - ); - // Get the pair instance to approve it to the uniswapConnector assert.equal( quoteToken.address, @@ -258,11 +247,41 @@ describe("UniswapConnector Flash", () => { "QuoteToken mismatch" ); let amountOptions = ONE_ETHER; + let amountRedeems = amountOptions.mul(quote).div(base); let amountOutMin = "0"; - await uniswapConnector.openFlashShort( - amountOptions, - amountOutMin, - optionToken.address + let amounts = await uniswapRouter.getAmountsOut(amountRedeems, [ + redeemToken.address, + weth.address, + ]); + let remainder = amountOptions + .mul(1000) + .add(amountOptions.mul(3)) + .div(1000) + .sub(amounts[1]); + await expect( + uniswapConnector.openFlashShort( + amountOptions, + amountOutMin, + optionToken.address + ) + ) + .to.emit(uniswapConnector, "FlashedShortOption") + .withArgs(uniswapConnector.address, amountOptions, remainder); + + console.log( + `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` + ); + + console.log( + `Redeem balance: ${formatEther( + await redeemToken.balanceOf(Alice) + )}` + ); + + console.log( + `Option balance: ${formatEther( + await optionToken.balanceOf(Alice) + )}` ); }); }); From 2839cc0587adda1a723af19b64c9fb8b206586be Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Wed, 28 Oct 2020 20:23:23 -0700 Subject: [PATCH 06/20] Cleaned up all comments. --- artifacts/UniswapConnector.json | 351 +++++---- .../connectors/Uniswap/UniswapConnector.sol | 674 ++++++++++-------- test/test_uni_connector.js | 52 +- test/test_uni_flash.js | 16 +- 4 files changed, 577 insertions(+), 516 deletions(-) diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index e254c6f2..0e7f7f07 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -132,111 +132,78 @@ "type": "event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, + "inputs": [], + "name": "VERSION", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "newFactory", - "type": "address" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], - "name": "UpdatedFactory", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, + "inputs": [], + "name": "WETH", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "newQuote", + "name": "", "type": "address" } ], - "name": "UpdatedQuoteToken", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "from", + "name": "optionAddress", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newRegistry", - "type": "address" - } - ], - "name": "UpdatedRegistry", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "quantityOptions", + "type": "uint256" + }, { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" + "internalType": "uint256", + "name": "quantityQuoteTokens", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "newRouter", - "type": "address" - } - ], - "name": "UpdatedRouter", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "minQuantityOptions", + "type": "uint256" + }, { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" + "internalType": "uint256", + "name": "minQuantityQuoteTokens", + "type": "uint256" }, { - "indexed": true, "internalType": "address", - "name": "newTrader", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "UpdatedTrader", - "type": "event" - }, - { - "inputs": [], - "name": "WETH", + "name": "addLongLiquidityWithUnderlying", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -258,7 +225,7 @@ }, { "internalType": "uint256", - "name": "minQuantityOptions", + "name": "minShortTokens", "type": "uint256" }, { @@ -277,7 +244,7 @@ "type": "uint256" } ], - "name": "addLiquidityWithUnderlying", + "name": "addShortLiquidityWithUnderlying", "outputs": [ { "internalType": "bool", @@ -351,14 +318,9 @@ "internalType": "address", "name": "to", "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" } ], - "name": "flashloanMintShortOptionsThenSwap", + "name": "flashMintShortOptionsThenSwap", "outputs": [ { "internalType": "bool", @@ -369,38 +331,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "getMaxDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "optionAddress", - "type": "address" - } - ], - "name": "getUniswapMarketForOption", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -440,6 +370,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "getUniswapMarketForToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -506,7 +455,7 @@ "type": "uint256" } ], - "name": "mintOptionsThenSwapToTokens", + "name": "mintLongOptionsThenSwapToTokens", "outputs": [ { "internalType": "bool", @@ -519,9 +468,14 @@ }, { "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, { "internalType": "uint256", - "name": "amountOptions", + "name": "amountIn", "type": "uint256" }, { @@ -529,14 +483,59 @@ "name": "amountOutMin", "type": "uint256" }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintShortOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "contract IOption", "name": "optionToken", "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + } + ], + "name": "openFlashLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "openFlashShort", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -612,7 +611,56 @@ "type": "uint256" } ], - "name": "removeLiquidityThenCloseOptions", + "name": "removeLongLiquidityThenCloseOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeShortLiquidityThenCloseOptions", "outputs": [ { "internalType": "uint256", @@ -731,71 +779,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "factory_", - "type": "address" - } - ], - "name": "setFactory", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "quoteToken_", - "type": "address" - } - ], - "name": "setQuoteToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "registry_", - "type": "address" - } - ], - "name": "setRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "router_", - "type": "address" - } - ], - "name": "setRouter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "trader_", - "type": "address" - } - ], - "name": "setTrader", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "trader", @@ -851,8 +834,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615bd380620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef8565b005b61032761153b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611561565b005b6103b56116c8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116ee565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611885565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611f9d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612180565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506122e7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d0612427565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612438565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610772612619565b005b61077c6127a1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506127c7565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128f1565b604051808215151515815260200191505060405180910390f35b610938612e3d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612e66565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613497565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135fe565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613765565b604051808381526020018281526020019250505060405180910390f35b610bff614090565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140a8565b005b610c8d61420f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614235565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614442565b604051808215151515815260200191505060405180910390f35b610dc161476d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b509150915081610eef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f00614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461120d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611395576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611569614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461162a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006116fe8a8a3061479b565b9150915060006117538b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a61499b565b915050806117c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61187486838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561181457600080fd5b505afa158015611828573d6000803e3d6000fd5b505050506040513d602081101561183e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118cd57600080fd5b505afa1580156118e1573d6000803e3d6000fd5b505050506040513d60208110156118f757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561195257600080fd5b505afa158015611966573d6000803e3d6000fd5b505050506040513d602081101561197c57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611a6457600080fd5b505afa158015611a78573d6000803e3d6000fd5b505050506040513d6020811015611a8e57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611ad35781602001602082028038833980820191505090505b5090508381600081518110611ae457fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611b2c57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615b18605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611c8b578082015181840152602081019050611c70565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611d5a57600080fd5b505afa158015611d6e573d6000803e3d6000fd5b505050506040513d6020811015611d8457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611db7576000611db9565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e1a57600080fd5b505afa158015611e2e573d6000803e3d6000fd5b505050506040513d6020811015611e4457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e76578b611e79565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f28578082015181840152602081019050611f0d565b50505050905090810190601f168015611f555780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015611f7757600080fd5b505af1158015611f8b573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561208b57600080fd5b505afa15801561209f573d6000803e3d6000fd5b505050506040513d60208110156120b557600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561216b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61217481612438565b91505095945050505050565b612188614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612249576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156123e157600080fd5b505af11580156123f5573d6000803e3d6000fd5b505050506040513d602081101561240b57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561253057600080fd5b505afa158015612544573d6000803e3d6000fd5b505050506040513d602081101561255a57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612610576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b612621614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146126e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006127da8a8989898989613765565b9150915060006127ef8a84848b8b8b8b6128f1565b905080612864576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612974576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612a0933308a8473ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b600080612a178c8c3061479b565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612ac257600080fd5b505af1158015612ad6573d6000803e3d6000fd5b505050506040513d6020811015612aec57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612ba557600080fd5b505af1158015612bb9573d6000803e3d6000fd5b505050506040513d6020811015612bcf57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612d1257600080fd5b505af1158015612d26573d6000803e3d6000fd5b505050506040513d6060811015612d3c57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612e0f33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612daf57600080fd5b505afa158015612dc3573d6000803e3d6000fd5b505050506040513d6020811015612dd957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612edd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612f2557600080fd5b505afa158015612f39573d6000803e3d6000fd5b505050506040513d6020811015612f4f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1685600181518110612f8657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61304288888373ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156130c357600080fd5b505af11580156130d7573d6000803e3d6000fd5b505050506040513d60408110156130ed57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848b6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156131ab578082015181840152602081019050613190565b50505050905001935050505060006040518083038186803b1580156131cf57600080fd5b505afa1580156131e3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561320d57600080fd5b810190808051604051939291908464010000000082111561322d57600080fd5b8382019150602082018581111561324357600080fd5b825186602082028301116401000000008211171561326057600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561329757808201518184015260208101905061327c565b5050505090500160405250505090506000808c90506000836001815181106132bb57fe5b60200260200101519050613325816133176103e86133096132e6600388614eca90919063ffffffff16565b6132fb6103e889614eca90919063ffffffff16565b614f5090919063ffffffff16565b614fd890919063ffffffff16565b61502290919063ffffffff16565b925050506133d48e858f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561337457600080fd5b505afa158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b613401898f838673ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a250505061348586838c73ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b60019350505050979650505050505050565b61349f614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613560576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b613606614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166137ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000899050600061383b8b612438565b905061386a33308c8473ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561393357600080fd5b505af1158015613947573d6000803e3d6000fd5b505050506040513d602081101561395d57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613a9b57600080fd5b505af1158015613aaf573d6000803e3d6000fd5b505050506040513d6040811015613ac557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bb257600080fd5b505af1158015613bc6573d6000803e3d6000fd5b505050506040513d6020811015613bdc57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c3457600080fd5b505afa158015613c48573d6000803e3d6000fd5b505050506040513d6020811015613c5e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d1557600080fd5b505af1158015613d29573d6000803e3d6000fd5b505050506040513d6020811015613d3f57600080fd5b8101908080519060200190929190505050506000613e778573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613d9c57600080fd5b505afa158015613db0573d6000803e3d6000fd5b505050506040513d6020811015613dc657600080fd5b8101908080519060200190929190505050613e698773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e1f57600080fd5b505afa158015613e33573d6000803e3d6000fd5b505050506040513d6020811015613e4957600080fd5b810190808051906020019092919050505087614eca90919063ffffffff16565b614fd890919063ffffffff16565b9050613f263330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ec557600080fd5b505afa158015613ed9573d6000803e3d6000fd5b505050506040513d6020811015613eef57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613fe257600080fd5b505af1158015613ff6573d6000803e3d6000fd5b505050506040513d606081101561400c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061405f89838773ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140b0614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61423d614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146142fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614384576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ad16026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061445086853061506c565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144c157600080fd5b505afa1580156144d5573d6000803e3d6000fd5b505050506040513d60208110156144eb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145a257600080fd5b505af11580156145b6573d6000803e3d6000fd5b505050506040513d60208110156145cc57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561469a57600080fd5b505af11580156146ae573d6000803e3d6000fd5b505050506040513d60408110156146c457600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b60008060008411614814576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6148c13386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d602081101561488a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561494257600080fd5b505af1158015614956573d6000803e3d6000fd5b505050506040513d604081101561496c57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106149c357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614a54576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614b2257600080fd5b505af1158015614b36573d6000803e3d6000fd5b505050506040513d6020811015614b4c57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614c15578082015181840152602081019050614bfa565b505050509050019650505050505050600060405180830381600087803b158015614c3e57600080fd5b505af1158015614c52573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614c7c57600080fd5b8101908080516040519392919084640100000000821115614c9c57600080fd5b83820191506020820185811115614cb257600080fd5b8251866020820283011164010000000082111715614ccf57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614d06578082015181840152602081019050614ceb565b5050505090500160405250505092506001915050965096945050505050565b614dd88363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156b4565b505050565b614ec4846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156b4565b50505050565b600080831415614edd5760009050614f4a565b6000828402905082848281614eee57fe5b0414614f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615af76021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015614fce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061501a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506158ff565b905092915050565b600061506483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506159c5565b905092915050565b60008060008085116150e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561516457600080fd5b505afa158015615178573d6000803e3d6000fd5b505050506040513d602081101561518e57600080fd5b81019080805190602001909291905050501015615213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006153398773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561525e57600080fd5b505afa158015615272573d6000803e3d6000fd5b505050506040513d602081101561528857600080fd5b810190808051906020019092919050505061532b8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156152e157600080fd5b505afa1580156152f5573d6000803e3d6000fd5b505050506040513d602081101561530b57600080fd5b810190808051906020019092919050505089614eca90919063ffffffff16565b614fd890919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561538257600080fd5b505afa158015615396573d6000803e3d6000fd5b505050506040513d60208110156153ac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561543957600080fd5b505afa15801561544d573d6000803e3d6000fd5b505050506040513d602081101561546357600080fd5b810190808051906020019092919050505010156154e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6155953388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561553457600080fd5b505afa158015615548573d6000803e3d6000fd5b505050506040513d602081101561555e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6155c23388888a73ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561564457600080fd5b505af1158015615658573d6000803e3d6000fd5b505050506040513d606081101561566e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6156d38273ffffffffffffffffffffffffffffffffffffffff16615a85565b615745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106157945780518252602082019150602081019050602083039250615771565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146157f6576040519150601f19603f3d011682016040523d82523d6000602084013e6157fb565b606091505b509150915081615873576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156158f95780806020019051602081101561589257600080fd5b81019080805190602001909291905050506158f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b74602a913960400191505060405180910390fd5b5b50505050565b600080831182906159ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615970578082015181840152602081019050615955565b50505050905090810190601f16801561599d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816159b757fe5b049050809150509392505050565b6000838311158290615a72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a37578082015181840152602081019050615a1c565b50505050905090810190601f168015615a645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ac757506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d5906128270e3b2736a3bb842d07f3cb9d5d493d5c012eddd7523274b3adabe364736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80637b103999116100f9578063acc7943811610097578063c45a015511610071578063c45a015514610c85578063f2fde38b14610ccf578063f441e35014610d13578063f887ea4014610db9576101a9565b8063acc7943814610b50578063ad5c464814610bf7578063c0d7865514610c41576101a9565b80638da5cb5b116100d35780638da5cb5b146109305780639bb9ef291461097a578063a6bc18f914610ac8578063a91ee0dc14610b0c576101a9565b80637b103999146107745780638ac32329146107be5780638d2a1cf114610882576101a9565b806338bd2aaa116101665780636af255d7116101405780636af255d7146106445780636bd64c3a146106c85780636d4542bd146106e6578063715018a61461076a576101a9565b806338bd2aaa146104e657806351b8498f1461053e5780635bb4780814610600576101a9565b806310d1e85c146101ae5780631459457a1461025b5780631758078b1461031f5780631cfb886d14610369578063217a4b70146103ad5780632ea4fbb4146103f7575b600080fd5b610259600480360360808110156101c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561021557600080fd5b82018360208201111561022757600080fd5b8035906020019184600183028401116401000000008311171561024957600080fd5b9091929391929390505050610e03565b005b61031d600480360360a081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef8565b005b61032761153b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ab6004803603602081101561037f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611561565b005b6103b56116c8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104cc600480360360c081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561045e57600080fd5b82018360208201111561047057600080fd5b8035906020019184602083028401116401000000008311171561049257600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116ee565b604051808215151515815260200191505060405180910390f35b61053c600480360360608110156104fc57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611885565b005b6105be600480360360a081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611f9d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106426004803603602081101561061657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612180565b005b6106866004803603602081101561065a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506122e7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d0612427565b6040518082815260200191505060405180910390f35b610728600480360360208110156106fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612438565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610772612619565b005b61077c6127a1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360e08110156107d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506127c7565b604051808215151515815260200191505060405180910390f35b610916600480360360e081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128f1565b604051808215151515815260200191505060405180910390f35b610938612e3d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610aae600480360360e081101561099057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a0157600080fd5b820183602082011115610a1357600080fd5b80359060200191846020830284011164010000000083111715610a3557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612e66565b604051808215151515815260200191505060405180910390f35b610b0a60048036036020811015610ade57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613497565b005b610b4e60048036036020811015610b2257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135fe565b005b610bda600480360360c0811015610b6657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613765565b604051808381526020018281526020019250505060405180910390f35b610bff614090565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c8360048036036020811015610c5757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506140a8565b005b610c8d61420f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1160048036036020811015610ce557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614235565b005b610d9f60048036036080811015610d2957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614442565b604051808215151515815260200191505060405180910390f35b610dc161476d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610e72576040519150601f19603f3d011682016040523d82523d6000602084013e610e77565b606091505b509150915081610eef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b610f00614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461120d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611395576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611569614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461162a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3f7a60b945c1aed32875c6b9264e816ef33c2612c363413700437ceb940465f660405160405180910390a350565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006116fe8a8a3061479b565b9150915060006117538b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a61499b565b915050806117c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61187486838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561181457600080fd5b505afa158015611828573d6000803e3d6000fd5b505050506040513d602081101561183e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b809350505050979650505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118cd57600080fd5b505afa1580156118e1573d6000803e3d6000fd5b505050506040513d60208110156118f757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561195257600080fd5b505afa158015611966573d6000803e3d6000fd5b505050506040513d602081101561197c57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611a6457600080fd5b505afa158015611a78573d6000803e3d6000fd5b505050506040513d6020811015611a8e57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611ad35781602001602082028038833980820191505090505b5090508381600081518110611ae457fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611b2c57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605c8152602001615b18605c913980519060200120905060608185898c8c88336103844201604051602401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611c8b578082015181840152602081019050611c70565b5050505090500198505050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611d5a57600080fd5b505afa158015611d6e573d6000803e3d6000fd5b505050506040513d6020811015611d8457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611db7576000611db9565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e1a57600080fd5b505afa158015611e2e573d6000803e3d6000fd5b505050506040513d6020811015611e4457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614611e76578b611e79565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611f28578082015181840152602081019050611f0d565b50505050905090810190601f168015611f555780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015611f7757600080fd5b505af1158015611f8b573d6000803e3d6000fd5b50505050505050505050505050505050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561208b57600080fd5b505afa15801561209f573d6000803e3d6000fd5b505050506040513d60208110156120b557600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561216b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61217481612438565b91505095945050505050565b612188614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612249576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9c0370e46dbf7d0f80abe004a0f8167fe3191a10d95df3b80209e4c8fb60d9a660405160405180910390a350565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156123e157600080fd5b505af11580156123f5573d6000803e3d6000fd5b505050506040513d602081101561240b57600080fd5b8101908080519060200190929190505050905080915050919050565b600080610384420190508091505090565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561253057600080fd5b505afa158015612544573d6000803e3d6000fd5b505050506040513d602081101561255a57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612610576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b612621614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146126e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006127da8a8989898989613765565b9150915060006127ef8a84848b8b8b8b6128f1565b905080612864576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060149054906101000a900460ff16612974576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612a0933308a8473ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b600080612a178c8c3061479b565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612ac257600080fd5b505af1158015612ad6573d6000803e3d6000fd5b505050506040513d6020811015612aec57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612ba557600080fd5b505af1158015612bb9573d6000803e3d6000fd5b505050506040513d6020811015612bcf57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612d1257600080fd5b505af1158015612d26573d6000803e3d6000fd5b505050506040513d6060811015612d3c57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612e0f33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612daf57600080fd5b505afa158015612dc3573d6000803e3d6000fd5b505050506040513d6020811015612dd957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000808611612edd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612f2557600080fd5b505afa158015612f39573d6000803e3d6000fd5b505050506040513d6020811015612f4f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1685600181518110612f8657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61304288888373ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b6000808973ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156130c357600080fd5b505af11580156130d7573d6000803e3d6000fd5b505050506040513d60408110156130ed57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848b6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156131ab578082015181840152602081019050613190565b50505050905001935050505060006040518083038186803b1580156131cf57600080fd5b505afa1580156131e3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561320d57600080fd5b810190808051604051939291908464010000000082111561322d57600080fd5b8382019150602082018581111561324357600080fd5b825186602082028301116401000000008211171561326057600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561329757808201518184015260208101905061327c565b5050505090500160405250505090506000808c90506000836001815181106132bb57fe5b60200260200101519050613325816133176103e86133096132e6600388614eca90919063ffffffff16565b6132fb6103e889614eca90919063ffffffff16565b614f5090919063ffffffff16565b614fd890919063ffffffff16565b61502290919063ffffffff16565b925050506133d48e858f73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561337457600080fd5b505afa158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b613401898f838673ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a250505061348586838c73ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b60019350505050979650505050505050565b61349f614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613560576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f684f1de37d9513f098c2f015a75f0cadebf7c963234fb4ea02c61b7045534060405160405180910390a350565b613606614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2fb227ead03d472af81e416891baee9a12e1175e2216d04e5392814d1eeef64460405160405180910390a350565b600080600060149054906101000a900460ff166137ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000899050600061383b8b612438565b905061386a33308c8473ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561393357600080fd5b505af1158015613947573d6000803e3d6000fd5b505050506040513d602081101561395d57600080fd5b81019080805190602001909291905050505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d868e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613a9b57600080fd5b505af1158015613aaf573d6000803e3d6000fd5b505050506040513d6040811015613ac557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bb257600080fd5b505af1158015613bc6573d6000803e3d6000fd5b505050506040513d6020811015613bdc57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c3457600080fd5b505afa158015613c48573d6000803e3d6000fd5b505050506040513d6020811015613c5e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d1557600080fd5b505af1158015613d29573d6000803e3d6000fd5b505050506040513d6020811015613d3f57600080fd5b8101908080519060200190929190505050506000613e778573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613d9c57600080fd5b505afa158015613db0573d6000803e3d6000fd5b505050506040513d6020811015613dc657600080fd5b8101908080519060200190929190505050613e698773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e1f57600080fd5b505afa158015613e33573d6000803e3d6000fd5b505050506040513d6020811015613e4957600080fd5b810190808051906020019092919050505087614eca90919063ffffffff16565b614fd890919063ffffffff16565b9050613f263330838873ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ec557600080fd5b505afa158015613ed9573d6000803e3d6000fd5b505050506040513d6020811015613eef57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b85858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613fe257600080fd5b505af1158015613ff6573d6000803e3d6000fd5b505050506040513d606081101561400c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061405f89838773ffffffffffffffffffffffffffffffffffffffff16614d259092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6140b0614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd1122c000cb7ee1f98b2a8c3d20b186b29f5719b23d1d791f331795286b9676160405160405180910390a350565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61423d614793565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146142fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614384576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ad16026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008061445086853061506c565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156144c157600080fd5b505afa1580156144d5573d6000803e3d6000fd5b505050506040513d60208110156144eb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145a257600080fd5b505af11580156145b6573d6000803e3d6000fd5b505050506040513d60208110156145cc57600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561469a57600080fd5b505af11580156146ae573d6000803e3d6000fd5b505050506040513d60408110156146c457600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b60008060008411614814576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6148c13386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d602081101561488a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561494257600080fd5b505af1158015614956573d6000803e3d6000fd5b505050506040513d604081101561496c57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106149c357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614a54576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614b2257600080fd5b505af1158015614b36573d6000803e3d6000fd5b505050506040513d6020811015614b4c57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614c15578082015181840152602081019050614bfa565b505050509050019650505050505050600060405180830381600087803b158015614c3e57600080fd5b505af1158015614c52573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614c7c57600080fd5b8101908080516040519392919084640100000000821115614c9c57600080fd5b83820191506020820185811115614cb257600080fd5b8251866020820283011164010000000082111715614ccf57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614d06578082015181840152602081019050614ceb565b5050505090500160405250505092506001915050965096945050505050565b614dd88363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156b4565b505050565b614ec4846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156b4565b50505050565b600080831415614edd5760009050614f4a565b6000828402905082848281614eee57fe5b0414614f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615af76021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015614fce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061501a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506158ff565b905092915050565b600061506483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506159c5565b905092915050565b60008060008085116150e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561516457600080fd5b505afa158015615178573d6000803e3d6000fd5b505050506040513d602081101561518e57600080fd5b81019080805190602001909291905050501015615213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006153398773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561525e57600080fd5b505afa158015615272573d6000803e3d6000fd5b505050506040513d602081101561528857600080fd5b810190808051906020019092919050505061532b8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156152e157600080fd5b505afa1580156152f5573d6000803e3d6000fd5b505050506040513d602081101561530b57600080fd5b810190808051906020019092919050505089614eca90919063ffffffff16565b614fd890919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561538257600080fd5b505afa158015615396573d6000803e3d6000fd5b505050506040513d60208110156153ac57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561543957600080fd5b505afa15801561544d573d6000803e3d6000fd5b505050506040513d602081101561546357600080fd5b810190808051906020019092919050505010156154e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6155953388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561553457600080fd5b505afa158015615548573d6000803e3d6000fd5b505050506040513d602081101561555e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6155c23388888a73ffffffffffffffffffffffffffffffffffffffff16614ddd909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561564457600080fd5b505af1158015615658573d6000803e3d6000fd5b505050506040513d606081101561566e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6156d38273ffffffffffffffffffffffffffffffffffffffff16615a85565b615745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106157945780518252602082019150602081019050602083039250615771565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146157f6576040519150601f19603f3d011682016040523d82523d6000602084013e6157fb565b606091505b509150915081615873576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156158f95780806020019051602081101561589257600080fd5b81019080805190602001909291905050506158f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b74602a913960400191505060405180910390fd5b5b50505050565b600080831182906159ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615970578082015181840152602081019050615955565b50505050905090810190601f16801561599d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816159b757fe5b049050809150509392505050565b6000838311158290615a72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a37578082015181840152602081019050615a1c565b50505050905090810190601f168015615a645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ac757506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173686c6f616e4d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c616464726573732c75696e74323536295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d5906128270e3b2736a3bb842d07f3cb9d5d493d5c012eddd7523274b3adabe364736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b61659080620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806395f0ae76116100de578063cd04552411610097578063f2fde38b11610071578063f2fde38b14610db8578063f441e35014610dfc578063f887ea4014610ea2578063ffa1ad7414610eec57610173565b8063cd04552414610bab578063d1dabfcb14610c1b578063d9b3612514610cc957610173565b806395f0ae761461077a578063a911afd7146108a8578063ad5c46481461094f578063b17d057014610999578063c45a015514610add578063c762405014610b2757610173565b80635bc5dbe1116101305780635bc5dbe1146104e65780636af255d714610594578063715018a6146106185780637b103999146106225780638ac323291461066c5780638da5cb5b1461073057610173565b806307f249061461017857806310d1e85c1461021f5780631459457a146102cc5780631758078b14610390578063217a4b70146103da57806351b8498f14610424575b600080fd5b610202600480360360c081101561018e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f10565b604051808381526020018281526020019250505060405180910390f35b6102ca6004803603608081101561023557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561028657600080fd5b82018360208201111561029857600080fd5b803590602001918460018302840111640100000000831117156102ba57600080fd5b90919293919293905050506117d9565b005b61038e600480360360a08110156102e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611908565b005b610398611f4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e2611f71565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104a4600480360360a081101561043a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611f97565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61057a600480360360e08110156104fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061217a565b604051808215151515815260200191505060405180910390f35b6105d6600480360360208110156105aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61062061280c565b005b61062a612994565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610716600480360360e081101561068257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129ba565b604051808215151515815260200191505060405180910390f35b610738612ae4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61088e600480360360c081101561079057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156107e157600080fd5b8201836020820111156107f357600080fd5b8035906020019184602083028401116401000000008311171561081557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b0d565b604051808215151515815260200191505060405180910390f35b610932600480360360c08110156108be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c68565b604051808381526020018281526020019250505060405180910390f35b6109576134fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ac3600480360360c08110156109af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a2057600080fd5b820183602082011115610a3257600080fd5b80359060200191846020830284011164010000000083111715610a5457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613515565b604051808215151515815260200191505060405180910390f35b610ae5613b45565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b6960048036036020811015610b3d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613b6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c0160048036036060811015610bc157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613d4c565b604051808215151515815260200191505060405180910390f35b610caf600480360360e0811015610c3157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614516565b604051808215151515815260200191505060405180910390f35b610d9e600480360360c0811015610cdf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610d3057600080fd5b820183602082011115610d4257600080fd5b80359060200191846020830284011164010000000083111715610d6457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614a62565b604051808215151515815260200191505060405180910390f35b610dfa60048036036020811015610dce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614bf9565b005b610e8860048036036080811015610e1257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614e06565b604051808215151515815260200191505060405180910390f35b610eaa615131565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ef4615157565b604051808260ff1660ff16815260200191505060405180910390f35b600080600060149054906101000a900460ff16610f95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561101e57600080fd5b505afa158015611032573d6000803e3d6000fd5b505050506040513d602081101561104857600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600061108d83613b6b565b90506110bc33308d8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561116357600080fd5b505af1158015611177573d6000803e3d6000fd5b505050506040513d602081101561118d57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde85878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156112a957600080fd5b505af11580156112bd573d6000803e3d6000fd5b505050506040513d60408110156112d357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156113c557600080fd5b505af11580156113d9573d6000803e3d6000fd5b505050506040513d60208110156113ef57600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156114a857600080fd5b505af11580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b810190808051906020019092919050505050600061163e670de0b6b3a76400006116308473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561153a57600080fd5b505afa15801561154e573d6000803e3d6000fd5b505050506040513d602081101561156457600080fd5b8101908080519060200190929190505050611622670de0b6b3a76400006116148873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ca57600080fd5b505afa1580156115de573d6000803e3d6000fd5b505050506040513d60208110156115f457600080fd5b81019080805190602001909291905050508c61524990919063ffffffff16565b61524990919063ffffffff16565b6152cf90919063ffffffff16565b6152cf90919063ffffffff16565b905061166d3330838573ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838f6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561172857600080fd5b505af115801561173c573d6000803e3d6000fd5b505050506040513d606081101561175257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050506117a889828773ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b81819650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611848576040519150601f19603f3d011682016040523d82523d6000602084013e61184d565b606091505b509150915081801561188d575060008151148061188c575080806020019051602081101561187a57600080fd5b81019080805190602001909291905050505b5b6118ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6119106153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ce1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611da5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561208557600080fd5b505afa158015612099573d6000803e3d6000fd5b505050506040513d60208110156120af57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612165576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61216e81613b6b565b91505095945050505050565b60008060149054906101000a900460ff166121fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061229233308a8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000806122a08c8c306153d9565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122ec57600080fd5b505afa158015612300573d6000803e3d6000fd5b505050506040513d602081101561231657600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156123d057600080fd5b505af11580156123e4573d6000803e3d6000fd5b505050506040513d60208110156123fa57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156124b357600080fd5b505af11580156124c7573d6000803e3d6000fd5b505050506040513d60208110156124dd57600080fd5b8101908080519060200190929190505050508473ffffffffffffffffffffffffffffffffffffffff1663e8e3370082600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858f8f8f8f8f6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561262057600080fd5b505af1158015612634573d6000803e3d6000fd5b505050506040513d606081101561264a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061269d33848f73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b6001955050505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156127c657600080fd5b505af11580156127da573d6000803e3d6000fd5b505050506040513d60208110156127f057600080fd5b8101908080519060200190929190505050905080915050919050565b6128146153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146128d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006129cd8a8989898989612c68565b9150915060006129e28a84848b8b8b8b614516565b905080612a57576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612b1d8989306153d9565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b6957600080fd5b505afa158015612b7d573d6000803e3d6000fd5b505050506040513d6020811015612b9357600080fd5b810190808051906020019092919050505090506000612bb682848b8b8b8b6155d9565b91505080612c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612c5787858d73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b809450505050509695505050505050565b600080600060149054906101000a900460ff16612ced576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000612d658c613b6b565b9050612d9433308d8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612e3b57600080fd5b505af1158015612e4f573d6000803e3d6000fd5b505050506040513d6020811015612e6557600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612f8157600080fd5b505af1158015612f95573d6000803e3d6000fd5b505050506040513d6040811015612fab57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303957600080fd5b505afa15801561304d573d6000803e3d6000fd5b505050506040513d602081101561306357600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561311d57600080fd5b505af1158015613131573d6000803e3d6000fd5b505050506040513d602081101561314757600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561320057600080fd5b505af1158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b81019080805190602001909291905050505060006133628773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561328757600080fd5b505afa15801561329b573d6000803e3d6000fd5b505050506040513d60208110156132b157600080fd5b81019080805190602001909291905050506133548973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330a57600080fd5b505afa15801561331e573d6000803e3d6000fd5b505050506040513d602081101561333457600080fd5b81019080805190602001909291905050508861524990919063ffffffff16565b6152cf90919063ffffffff16565b90506133913330838573ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858d6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561344e57600080fd5b505af1158015613462573d6000803e3d6000fd5b505050506040513d606081101561347857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506134cb8a838873ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b8282975097505050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b600080851161358c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156135d457600080fd5b505afa1580156135e8573d6000803e3d6000fd5b505050506040513d60208110156135fe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061363557fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146136c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b6136f187878373ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561377257600080fd5b505af1158015613786573d6000803e3d6000fd5b505050506040513d604081101561379c57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561385a57808201518184015260208101905061383f565b50505050905001935050505060006040518083038186803b15801561387e57600080fd5b505afa158015613892573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156138bc57600080fd5b81019080805160405193929190846401000000008211156138dc57600080fd5b838201915060208201858111156138f257600080fd5b825186602082028301116401000000008211171561390f57600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561394657808201518184015260208101905061392b565b5050505090500160405250505090506000808b905060008360018151811061396a57fe5b602002602001015190506139d4816139c66103e86139b861399560038861524990919063ffffffff16565b6139aa6103e88961524990919063ffffffff16565b61596390919063ffffffff16565b6152cf90919063ffffffff16565b6159eb90919063ffffffff16565b92505050613a838d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613a2357600080fd5b505afa158015613a37573d6000803e3d6000fd5b505050506040513d6020811015613a4d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b613ab0888e838673ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050613b3485838b73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613c6357600080fd5b505afa158015613c77573d6000803e3d6000fd5b505050506040513d6020811015613c8d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613d43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b60008060149054906101000a900460ff16613dcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e3157600080fd5b505afa158015613e45573d6000803e3d6000fd5b505050506040513d6020811015613e5b57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613eb657600080fd5b505afa158015613eca573d6000803e3d6000fd5b505050506040513d6020811015613ee057600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613fc857600080fd5b505afa158015613fdc573d6000803e3d6000fd5b505050506040513d6020811015613ff257600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156140375781602001602082028038833980820191505090505b509050838160008151811061404857fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061409057fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605081526020016164e160509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156141e45780820151818401526020810190506141c9565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156142b257600080fd5b505afa1580156142c6573d6000803e3d6000fd5b505050506040513d60208110156142dc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461430f576000614311565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561437257600080fd5b505afa158015614386573d6000803e3d6000fd5b505050506040513d602081101561439c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146143ce578b6143d1565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614480578082015181840152602081019050614465565b50505050905090810190601f1680156144ad5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156144cf57600080fd5b505af11580156144e3573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16614599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061462e33308a8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b60008061463c8c8c306153d9565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156146e757600080fd5b505af11580156146fb573d6000803e3d6000fd5b505050506040513d602081101561471157600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156147ca57600080fd5b505af11580156147de573d6000803e3d6000fd5b505050506040513d60208110156147f457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561493757600080fd5b505af115801561494b573d6000803e3d6000fd5b505050506040513d606081101561496157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614a3433828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156149d457600080fd5b505afa1580156149e8573d6000803e3d6000fd5b505050506040513d60208110156149fe57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b6000806000614a728a8a306153d9565b915091506000614ac78b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6155d9565b91505080614b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614be886838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b8857600080fd5b505afa158015614b9c573d6000803e3d6000fd5b505050506040513d6020811015614bb257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b809350505050979650505050505050565b614c016153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614cc2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614d48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061649a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614e14868530615a35565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614e8557600080fd5b505afa158015614e99573d6000803e3d6000fd5b505050506040513d6020811015614eaf57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614f6657600080fd5b505af1158015614f7a573d6000803e3d6000fd5b505050506040513d6020811015614f9057600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561505e57600080fd5b505af1158015615072573d6000803e3d6000fd5b505050506040513d604081101561508857600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b615243846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061607d565b50505050565b60008083141561525c57600090506152c9565b600082840290508284828161526d57fe5b04146152c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806164c06021913960400191505060405180910390fd5b809150505b92915050565b600061531183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506162c8565b905092915050565b6153cc8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061607d565b505050565b600033905090565b60008060008411615452576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6154ff3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561549e57600080fd5b505afa1580156154b2573d6000803e3d6000fd5b505050506040513d60208110156154c857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561558057600080fd5b505af1158015615594573d6000803e3d6000fd5b505050506040513d60408110156155aa57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061560157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615692576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561576057600080fd5b505af1158015615774573d6000803e3d6000fd5b505050506040513d602081101561578a57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015615853578082015181840152602081019050615838565b505050509050019650505050505050600060405180830381600087803b15801561587c57600080fd5b505af1158015615890573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156158ba57600080fd5b81019080805160405193929190846401000000008211156158da57600080fd5b838201915060208201858111156158f057600080fd5b825186602082028301116401000000008211171561590d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615944578082015181840152602081019050615929565b5050505090500160405250505092506001915050965096945050505050565b6000808284019050838110156159e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000615a2d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061638e565b905092915050565b6000806000808511615aaf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615b2d57600080fd5b505afa158015615b41573d6000803e3d6000fd5b505050506040513d6020811015615b5757600080fd5b81019080805190602001909291905050501015615bdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000615d028773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015615c2757600080fd5b505afa158015615c3b573d6000803e3d6000fd5b505050506040513d6020811015615c5157600080fd5b8101908080519060200190929190505050615cf48973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015615caa57600080fd5b505afa158015615cbe573d6000803e3d6000fd5b505050506040513d6020811015615cd457600080fd5b81019080805190602001909291905050508961524990919063ffffffff16565b6152cf90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015615d4b57600080fd5b505afa158015615d5f573d6000803e3d6000fd5b505050506040513d6020811015615d7557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615e0257600080fd5b505afa158015615e16573d6000803e3d6000fd5b505050506040513d6020811015615e2c57600080fd5b81019080805190602001909291905050501015615eb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b615f5e3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015615efd57600080fd5b505afa158015615f11573d6000803e3d6000fd5b505050506040513d6020811015615f2757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b615f8b3388888a73ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561600d57600080fd5b505af1158015616021573d6000803e3d6000fd5b505050506040513d606081101561603757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b61609c8273ffffffffffffffffffffffffffffffffffffffff1661644e565b61610e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061615d578051825260208201915060208101905060208303925061613a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146161bf576040519150601f19603f3d011682016040523d82523d6000602084013e6161c4565b606091505b50915091508161623c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156162c25780806020019051602081101561625b57600080fd5b81019080805190602001909291905050506162c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616531602a913960400191505060405180910390fd5b5b50505050565b60008083118290616374576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561633957808201518184015260208101905061631e565b50505050905090810190601f1680156163665780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161638057fe5b049050809150509392505050565b600083831115829061643b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156164005780820151818401526020810190506163e5565b50505050905090810190601f16801561642d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561649057506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122072a1d22bc74d368ae10890a1217a72dacc28ae2d70ba5703641dfd385603e4d164736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c806395f0ae76116100de578063cd04552411610097578063f2fde38b11610071578063f2fde38b14610db8578063f441e35014610dfc578063f887ea4014610ea2578063ffa1ad7414610eec57610173565b8063cd04552414610bab578063d1dabfcb14610c1b578063d9b3612514610cc957610173565b806395f0ae761461077a578063a911afd7146108a8578063ad5c46481461094f578063b17d057014610999578063c45a015514610add578063c762405014610b2757610173565b80635bc5dbe1116101305780635bc5dbe1146104e65780636af255d714610594578063715018a6146106185780637b103999146106225780638ac323291461066c5780638da5cb5b1461073057610173565b806307f249061461017857806310d1e85c1461021f5780631459457a146102cc5780631758078b14610390578063217a4b70146103da57806351b8498f14610424575b600080fd5b610202600480360360c081101561018e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f10565b604051808381526020018281526020019250505060405180910390f35b6102ca6004803603608081101561023557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561028657600080fd5b82018360208201111561029857600080fd5b803590602001918460018302840111640100000000831117156102ba57600080fd5b90919293919293905050506117d9565b005b61038e600480360360a08110156102e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611908565b005b610398611f4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e2611f71565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104a4600480360360a081101561043a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611f97565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61057a600480360360e08110156104fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061217a565b604051808215151515815260200191505060405180910390f35b6105d6600480360360208110156105aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61062061280c565b005b61062a612994565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610716600480360360e081101561068257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129ba565b604051808215151515815260200191505060405180910390f35b610738612ae4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61088e600480360360c081101561079057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156107e157600080fd5b8201836020820111156107f357600080fd5b8035906020019184602083028401116401000000008311171561081557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b0d565b604051808215151515815260200191505060405180910390f35b610932600480360360c08110156108be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c68565b604051808381526020018281526020019250505060405180910390f35b6109576134fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ac3600480360360c08110156109af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a2057600080fd5b820183602082011115610a3257600080fd5b80359060200191846020830284011164010000000083111715610a5457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613515565b604051808215151515815260200191505060405180910390f35b610ae5613b45565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b6960048036036020811015610b3d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613b6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c0160048036036060811015610bc157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613d4c565b604051808215151515815260200191505060405180910390f35b610caf600480360360e0811015610c3157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614516565b604051808215151515815260200191505060405180910390f35b610d9e600480360360c0811015610cdf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610d3057600080fd5b820183602082011115610d4257600080fd5b80359060200191846020830284011164010000000083111715610d6457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614a62565b604051808215151515815260200191505060405180910390f35b610dfa60048036036020811015610dce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614bf9565b005b610e8860048036036080811015610e1257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614e06565b604051808215151515815260200191505060405180910390f35b610eaa615131565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ef4615157565b604051808260ff1660ff16815260200191505060405180910390f35b600080600060149054906101000a900460ff16610f95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561101e57600080fd5b505afa158015611032573d6000803e3d6000fd5b505050506040513d602081101561104857600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600061108d83613b6b565b90506110bc33308d8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561116357600080fd5b505af1158015611177573d6000803e3d6000fd5b505050506040513d602081101561118d57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde85878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156112a957600080fd5b505af11580156112bd573d6000803e3d6000fd5b505050506040513d60408110156112d357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156113c557600080fd5b505af11580156113d9573d6000803e3d6000fd5b505050506040513d60208110156113ef57600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156114a857600080fd5b505af11580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b810190808051906020019092919050505050600061163e670de0b6b3a76400006116308473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561153a57600080fd5b505afa15801561154e573d6000803e3d6000fd5b505050506040513d602081101561156457600080fd5b8101908080519060200190929190505050611622670de0b6b3a76400006116148873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ca57600080fd5b505afa1580156115de573d6000803e3d6000fd5b505050506040513d60208110156115f457600080fd5b81019080805190602001909291905050508c61524990919063ffffffff16565b61524990919063ffffffff16565b6152cf90919063ffffffff16565b6152cf90919063ffffffff16565b905061166d3330838573ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838f6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561172857600080fd5b505af115801561173c573d6000803e3d6000fd5b505050506040513d606081101561175257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050506117a889828773ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b81819650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611848576040519150601f19603f3d011682016040523d82523d6000602084013e61184d565b606091505b509150915081801561188d575060008151148061188c575080806020019051602081101561187a57600080fd5b81019080805190602001909291905050505b5b6118ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6119106153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ce1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611da5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561208557600080fd5b505afa158015612099573d6000803e3d6000fd5b505050506040513d60208110156120af57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612165576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61216e81613b6b565b91505095945050505050565b60008060149054906101000a900460ff166121fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061229233308a8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000806122a08c8c306153d9565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122ec57600080fd5b505afa158015612300573d6000803e3d6000fd5b505050506040513d602081101561231657600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156123d057600080fd5b505af11580156123e4573d6000803e3d6000fd5b505050506040513d60208110156123fa57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156124b357600080fd5b505af11580156124c7573d6000803e3d6000fd5b505050506040513d60208110156124dd57600080fd5b8101908080519060200190929190505050508473ffffffffffffffffffffffffffffffffffffffff1663e8e3370082600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858f8f8f8f8f6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561262057600080fd5b505af1158015612634573d6000803e3d6000fd5b505050506040513d606081101561264a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061269d33848f73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b6001955050505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156127c657600080fd5b505af11580156127da573d6000803e3d6000fd5b505050506040513d60208110156127f057600080fd5b8101908080519060200190929190505050905080915050919050565b6128146153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146128d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006129cd8a8989898989612c68565b9150915060006129e28a84848b8b8b8b614516565b905080612a57576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612b1d8989306153d9565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b6957600080fd5b505afa158015612b7d573d6000803e3d6000fd5b505050506040513d6020811015612b9357600080fd5b810190808051906020019092919050505090506000612bb682848b8b8b8b6155d9565b91505080612c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612c5787858d73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b809450505050509695505050505050565b600080600060149054906101000a900460ff16612ced576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000612d658c613b6b565b9050612d9433308d8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612e3b57600080fd5b505af1158015612e4f573d6000803e3d6000fd5b505050506040513d6020811015612e6557600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612f8157600080fd5b505af1158015612f95573d6000803e3d6000fd5b505050506040513d6040811015612fab57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303957600080fd5b505afa15801561304d573d6000803e3d6000fd5b505050506040513d602081101561306357600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561311d57600080fd5b505af1158015613131573d6000803e3d6000fd5b505050506040513d602081101561314757600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561320057600080fd5b505af1158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b81019080805190602001909291905050505060006133628773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561328757600080fd5b505afa15801561329b573d6000803e3d6000fd5b505050506040513d60208110156132b157600080fd5b81019080805190602001909291905050506133548973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330a57600080fd5b505afa15801561331e573d6000803e3d6000fd5b505050506040513d602081101561333457600080fd5b81019080805190602001909291905050508861524990919063ffffffff16565b6152cf90919063ffffffff16565b90506133913330838573ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858d6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561344e57600080fd5b505af1158015613462573d6000803e3d6000fd5b505050506040513d606081101561347857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506134cb8a838873ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b8282975097505050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b600080851161358c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156135d457600080fd5b505afa1580156135e8573d6000803e3d6000fd5b505050506040513d60208110156135fe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061363557fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146136c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b6136f187878373ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561377257600080fd5b505af1158015613786573d6000803e3d6000fd5b505050506040513d604081101561379c57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561385a57808201518184015260208101905061383f565b50505050905001935050505060006040518083038186803b15801561387e57600080fd5b505afa158015613892573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156138bc57600080fd5b81019080805160405193929190846401000000008211156138dc57600080fd5b838201915060208201858111156138f257600080fd5b825186602082028301116401000000008211171561390f57600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561394657808201518184015260208101905061392b565b5050505090500160405250505090506000808b905060008360018151811061396a57fe5b602002602001015190506139d4816139c66103e86139b861399560038861524990919063ffffffff16565b6139aa6103e88961524990919063ffffffff16565b61596390919063ffffffff16565b6152cf90919063ffffffff16565b6159eb90919063ffffffff16565b92505050613a838d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613a2357600080fd5b505afa158015613a37573d6000803e3d6000fd5b505050506040513d6020811015613a4d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b613ab0888e838673ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050613b3485838b73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613c6357600080fd5b505afa158015613c77573d6000803e3d6000fd5b505050506040513d6020811015613c8d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613d43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b60008060149054906101000a900460ff16613dcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e3157600080fd5b505afa158015613e45573d6000803e3d6000fd5b505050506040513d6020811015613e5b57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613eb657600080fd5b505afa158015613eca573d6000803e3d6000fd5b505050506040513d6020811015613ee057600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613fc857600080fd5b505afa158015613fdc573d6000803e3d6000fd5b505050506040513d6020811015613ff257600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156140375781602001602082028038833980820191505090505b509050838160008151811061404857fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061409057fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605081526020016164e160509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156141e45780820151818401526020810190506141c9565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156142b257600080fd5b505afa1580156142c6573d6000803e3d6000fd5b505050506040513d60208110156142dc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461430f576000614311565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561437257600080fd5b505afa158015614386573d6000803e3d6000fd5b505050506040513d602081101561439c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146143ce578b6143d1565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614480578082015181840152602081019050614465565b50505050905090810190601f1680156144ad5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156144cf57600080fd5b505af11580156144e3573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16614599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061462e33308a8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b60008061463c8c8c306153d9565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156146e757600080fd5b505af11580156146fb573d6000803e3d6000fd5b505050506040513d602081101561471157600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156147ca57600080fd5b505af11580156147de573d6000803e3d6000fd5b505050506040513d60208110156147f457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561493757600080fd5b505af115801561494b573d6000803e3d6000fd5b505050506040513d606081101561496157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614a3433828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156149d457600080fd5b505afa1580156149e8573d6000803e3d6000fd5b505050506040513d60208110156149fe57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b6000806000614a728a8a306153d9565b915091506000614ac78b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6155d9565b91505080614b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614be886838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b8857600080fd5b505afa158015614b9c573d6000803e3d6000fd5b505050506040513d6020811015614bb257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b809350505050979650505050505050565b614c016153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614cc2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614d48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061649a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614e14868530615a35565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614e8557600080fd5b505afa158015614e99573d6000803e3d6000fd5b505050506040513d6020811015614eaf57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614f6657600080fd5b505af1158015614f7a573d6000803e3d6000fd5b505050506040513d6020811015614f9057600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561505e57600080fd5b505af1158015615072573d6000803e3d6000fd5b505050506040513d604081101561508857600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b615243846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061607d565b50505050565b60008083141561525c57600090506152c9565b600082840290508284828161526d57fe5b04146152c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806164c06021913960400191505060405180910390fd5b809150505b92915050565b600061531183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506162c8565b905092915050565b6153cc8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061607d565b505050565b600033905090565b60008060008411615452576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6154ff3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561549e57600080fd5b505afa1580156154b2573d6000803e3d6000fd5b505050506040513d60208110156154c857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561558057600080fd5b505af1158015615594573d6000803e3d6000fd5b505050506040513d60408110156155aa57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061560157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615692576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561576057600080fd5b505af1158015615774573d6000803e3d6000fd5b505050506040513d602081101561578a57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015615853578082015181840152602081019050615838565b505050509050019650505050505050600060405180830381600087803b15801561587c57600080fd5b505af1158015615890573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156158ba57600080fd5b81019080805160405193929190846401000000008211156158da57600080fd5b838201915060208201858111156158f057600080fd5b825186602082028301116401000000008211171561590d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615944578082015181840152602081019050615929565b5050505090500160405250505092506001915050965096945050505050565b6000808284019050838110156159e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000615a2d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061638e565b905092915050565b6000806000808511615aaf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615b2d57600080fd5b505afa158015615b41573d6000803e3d6000fd5b505050506040513d6020811015615b5757600080fd5b81019080805190602001909291905050501015615bdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000615d028773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015615c2757600080fd5b505afa158015615c3b573d6000803e3d6000fd5b505050506040513d6020811015615c5157600080fd5b8101908080519060200190929190505050615cf48973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015615caa57600080fd5b505afa158015615cbe573d6000803e3d6000fd5b505050506040513d6020811015615cd457600080fd5b81019080805190602001909291905050508961524990919063ffffffff16565b6152cf90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015615d4b57600080fd5b505afa158015615d5f573d6000803e3d6000fd5b505050506040513d6020811015615d7557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615e0257600080fd5b505afa158015615e16573d6000803e3d6000fd5b505050506040513d6020811015615e2c57600080fd5b81019080805190602001909291905050501015615eb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b615f5e3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015615efd57600080fd5b505afa158015615f11573d6000803e3d6000fd5b505050506040513d6020811015615f2757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b615f8b3388888a73ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561600d57600080fd5b505af1158015616021573d6000803e3d6000fd5b505050506040513d606081101561603757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b61609c8273ffffffffffffffffffffffffffffffffffffffff1661644e565b61610e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061615d578051825260208201915060208101905060208303925061613a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146161bf576040519150601f19603f3d011682016040523d82523d6000602084013e6161c4565b606091505b50915091508161623c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156162c25780806020019051602081101561625b57600080fd5b81019080805190602001909291905050506162c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616531602a913960400191505060405180910390fd5b5b50505050565b60008083118290616374576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561633957808201518184015260208101905061631e565b50505050905090810190601f1680156163665780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161638057fe5b049050809150509392505050565b600083831115829061643b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156164005780820151818401526020810190506163e5565b50505050905090810190601f16801561642d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561649057506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122072a1d22bc74d368ae10890a1217a72dacc28ae2d70ba5703641dfd385603e4d164736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index 32862ea8..995bbb05 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -33,8 +33,6 @@ import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; -import "@nomiclabs/buidler/console.sol"; - contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { using SafeMath for uint256; using SafeERC20 for IERC20; @@ -46,19 +44,14 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address public quoteToken; // Designated stablecoin for Primitive. address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; + uint8 public constant VERSION = 2; event Initialized(address indexed from, address indexed quoteToken); - event UpdatedRouter(address indexed from, address indexed newRouter); - event UpdatedFactory(address indexed from, address indexed newFactory); - event UpdatedTrader(address indexed from, address indexed newTrader); - event UpdatedRegistry(address indexed from, address indexed newRegistry); - event UpdatedQuoteToken(address indexed from, address indexed newQuote); event FlashedShortOption( address indexed from, uint256 quantity, uint256 premium ); - event RolledOptions( address indexed from, address indexed optionFrom, @@ -97,62 +90,22 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { emit Initialized(msg.sender, quoteToken_); } - /** - * @dev Sets the Uniswap V2 Router address to use. - */ - function setRouter(address router_) external onlyOwner { - router = IUniswapV2Router02(router_); - emit UpdatedRouter(msg.sender, router_); - } - - /** - * @dev Sets the Uniswap V2 Factory address to use. - */ - function setFactory(address factory_) external onlyOwner { - factory = IUniswapV2Factory(factory_); - emit UpdatedFactory(msg.sender, factory_); - } - - /** - * @dev Sets the Primitive V1 Trader address to use. - */ - function setTrader(address trader_) external onlyOwner { - trader = ITrader(trader_); - emit UpdatedTrader(msg.sender, trader_); - } - - /** - * @dev Sets the Primitive V1 Registry address to use. - */ - function setRegistry(address registry_) external onlyOwner { - registry = IRegistry(registry_); - emit UpdatedRegistry(msg.sender, registry_); - } - - /** - * @dev Sets the designated stablecoin to use (paired token in Uniswap pools). - */ - function setQuoteToken(address quoteToken_) external onlyOwner { - quoteToken = quoteToken_; - emit UpdatedQuoteToken(msg.sender, quoteToken_); - } - - // ==== Trading Functions ==== + // ==== Combo Operations ==== /** - * @dev Mints options using underlyingTokens provided by user, then swaps on Uniswap V2. + * @dev Mints longOptionTokens using underlyingTokens provided by user, then swaps on Uniswap V2. * Combines Primitive "mintOptions" function with Uniswap V2 Router "swapExactTokensForTokens" function. * @notice If the first address in the path is not the optionToken address, the tx will fail. * underlyingToken -> optionToken -> quoteToken. * @param optionToken The address of the Oracle-less Primitive option. - * @param amountIn The quantity of options to mint and then sell. - * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens. + * @param amountIn The quantity of longOptionTokens to mint and then sell. + * @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens. * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option. * @param to The address to send the optionToken proceeds and redeem tokens to. * @param deadline The timestamp for a trade to fail at if not successful. * @return bool Whether the transaction was successful or not. */ - function mintOptionsThenSwapToTokens( + function mintLongOptionsThenSwapToTokens( IOption optionToken, uint256 amountIn, uint256 amountOutMin, @@ -161,14 +114,14 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { uint256 deadline ) external returns (bool) { // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract. - // Mints option and redeem tokens to this contract. + // Mints long + short option tokens to this contract. (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( optionToken, amountIn, address(this) ); - // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender. + // Swaps longOptionTokens to the token specified at the end of the path, then sends to msg.sender. // Reverts if the first address in the path is not the optionToken address. (, bool success) = _swapExactOptionsForTokens( address(optionToken), @@ -181,24 +134,25 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Fail early if the swap failed. require(success, "ERR_SWAP_FAILED"); - // Send redeemTokens (short options) to the "to" address. + // Send shortOptionTokens (redeem) to the "to" address. IERC20(optionToken.redeemToken()).safeTransfer(to, outputRedeems); return success; } /** - * @dev Mints long and short option tokens, then swaps the shortTokens (redeemTokens) for tokens. - * @notice If the first address in the path is not the redeemToken address, the tx will fail. - * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens + * @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens. + * @notice If the first address in the path is not the shortOptionToken address, the tx will fail. + * underlyingToken -> shortOptionToken -> quoteToken. + * IMPORTANT: redeemTokens = shortOptionTokens * @param optionToken The address of the Option contract. * @param amountIn The quantity of options to mint. - * @param amountOutMin The minimum quantity of tokens to receive in exchange for the redeemTokens. - * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken. - * @param to The address to send the redeemToken proceeds and optionTokens to. + * @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens. + * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. + * @param to The address to send the shortOptionToken proceeds and longOptionTokens to. * @param deadline The timestamp for a trade to fail at if not successful. * @return bool Whether the transaction was successful or not. */ - /* function mintShortOptionsThenSwapToTokens( + function mintShortOptionsThenSwapToTokens( IOption optionToken, uint256 amountIn, uint256 amountOutMin, @@ -207,15 +161,15 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { uint256 deadline ) public returns (bool) { // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract. - // Mints option and redeem tokens to this contract. + // Mints long + short tokens to this contract. (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( optionToken, amountIn, address(this) ); - // Swaps option tokens to the token specified at the end of the path, then sends to msg.sender. - // Reverts if the first address in the path is not the optionToken address. + // Swaps shortOptionTokens to the token specified at the end of the path, then sends to msg.sender. + // Reverts if the first address in the path is not the shortOptionToken address. address redeemToken = optionToken.redeemToken(); (, bool success) = _swapExactOptionsForTokens( redeemToken, @@ -228,67 +182,62 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Fail early if the swap failed. require(success, "ERR_SWAP_FAILED"); - // Send optionTokens (long options) to the "to" address. + // Send longOptionTokens to the "to" address. IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens return success; - } */ + } /** - * @dev Mints long and short option tokens using a flash loan from UniswapV2. Then sells short tokens, and pays the difference. - * @notice If the first address in the path is not the redeemToken address, the tx will fail. - * underlyingToken -> redeemToken -> quoteToken. ShortTokens = redeemTokens + * @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with + * reserve0 = shortOptionTokens and reserve1 = underlyingTokens. + * Uses underlyingTokens to mint long (option) + short (redeem) tokens. + * Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens, + * AND any remainder quantity of underlyingTokens (paid by msg.sender). + * @notice If the first address in the path is not the shortOptionToken address, the tx will fail. * @param optionAddress The address of the Option contract. - * @param flashLoanQuantity The quantity of options to mint. - * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the redeemTokens. - * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = redeemToken. - * @param to The address to send the redeemToken proceeds and optionTokens to. - * @param deadline The timestamp for a trade to fail at if not successful. + * @param flashLoanQuantity The quantity of options to mint using borrowed underlyingTokens. + * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. + * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. + * @param to The address to send the shortOptionToken proceeds and longOptionTokens to. * @return success bool Whether the transaction was successful or not. */ - function flashloanMintShortOptionsThenSwap( + function flashMintShortOptionsThenSwap( address pairAddress, address optionAddress, uint256 flashLoanQuantity, uint256 amountOutMin, address[] memory path, - address to, - uint256 deadline + address to ) public returns (bool) { require(flashLoanQuantity > 0, "ERR_ZERO"); // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. - // We are flash swapping from an asset <> redeem pair, paying back a portion using minted redeemTokens - // and any remainder of asset. + // We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens + // and any remainder of underlyingToken. - // Mints option and redeem tokens to this contract. address underlyingToken = IOption(optionAddress) .getUnderlyingTokenAddress(); require(path[1] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); - // Mint optionTokens using the underlyingTokens received from UniswapV2 flash swap. + // Mint longOptionTokens using the underlyingTokens received from UniswapV2 flash swap to this contract. // Send underlyingTokens from this contract to the optionToken contract, then call mintOptions. - // This contract receives the newly minted option and redeem tokens. IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity); (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress) .mintOptions(address(this)); - // Need to return tokens from the flash swap by returning redeemTokens and any remainder of underlyingTokens. - // Swaps redeemTokens to the token specified at the end of the path, then sends to UniswapV2Pair. - // Reverts if the first address in the path is not the redeemToken address. - // Reverts if the last address in the path is not the underlyingToken address. - // path[0] = redeemToken, path[1] = underlyingToken + // Need to return tokens from the flash swap by returning shortOptionTokens and any remainder of underlyingTokens. { address underlyingToken_ = underlyingToken; - // Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of redeemTokens. + // Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of shortOptionTokens. uint256[] memory amounts = router.getAmountsOut( outputRedeems, path ); - // The remainder is the flash loan amount - amount paid for from redeemTokens. - uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by returning redeemTokens. + // The remainder is the flash loan amount - amount paid for from shortOptionTokens. + uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by returning shortOptionTokens. { uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed - uint256 paid = amounts[1]; // quantity of underlyingTokens paid by redeemTokens + uint256 paid = amounts[1]; // quantity of underlyingTokens paid by shortOptionTokens // consider the swap fee remainder = quantity .mul(1000) @@ -297,13 +246,13 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { .sub(paid); } - // Pay back the pair in redeemTokens + // Pay back the pair in shortOptionTokens IERC20(IOption(optionAddress).redeemToken()).safeTransfer( pairAddress, outputRedeems ); - // Pull underlyingTokens from the original spender to pay the remainder of the flash swap. + // Pull underlyingTokens from the original msg.sender to pay the remainder of the flash swap. IERC20(underlyingToken_).safeTransferFrom( to, pairAddress, @@ -312,19 +261,31 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { emit FlashedShortOption(msg.sender, outputOptions, remainder); } - // Send optionTokens (long options) to the "original" address. - IERC20(optionAddress).safeTransfer(to, outputOptions); // option = longOptionTokens + // Send longOptionTokens (option) to the original msg.sender. + IERC20(optionAddress).safeTransfer(to, outputOptions); return true; } - function openFlashShort( + /** + * @dev Opens a longOptionToken position by minting long + short tokens, then selling the short tokens. + * @notice IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens. + * IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid. + * @param optionToken The option address. + * @param amountOptions The quantity of longOptionTokens to purchase. + * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. + */ + function openFlashLong( + IOption optionToken, uint256 amountOptions, - uint256 amountOutMin, - IOption optionToken - ) public { + uint256 amountOutMin + ) external nonReentrant returns (bool) { address redeemToken = optionToken.redeemToken(); address underlyingToken = optionToken.getUnderlyingTokenAddress(); address pairAddress = factory.getPair(redeemToken, underlyingToken); + + // Build the path to get the appropriate reserves to borrow from, and then pay back. + // We are borrowing from reserve1 then paying it back mostly in reserve0. + // Borrowing underlyingTokens, paying back in shortOptionTokens (normal swap). Pay any remainder in underlyingTokens. address[] memory path = new address[](2); path[0] = redeemToken; path[1] = underlyingToken; @@ -333,57 +294,232 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { bytes4 selector = bytes4( keccak256( bytes( - "flashloanMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address,uint256)" + "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)" ) ) ); bytes memory params = abi.encodeWithSelector( selector, // function to call in this contract - pairAddress, + pairAddress, // pair contract we are borrowing from optionToken, // option token to mint with flash loaned tokens - amountOptions, // quantity of tokens from flash loan - amountOutMin, // total price paid for selling redeemTokens from the minted optionTokens - path, // redeemToken -> stablecoin -> underlyingToken - msg.sender, // address to pull the remainder loan amount to pay, and send optionTokens to. - now + 15 minutes // deadline of this function call + amountOptions, // quantity of underlyingTokens from flash loan to use to mint options + amountOutMin, // total price paid (in underlyingTokens) for selling shortOptionTokens + path, // redeemToken -> underlyingToken + msg.sender // address to pull the remainder loan amount to pay, and send longOptionTokens to. ); // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address. - // Then executes `flashLoanMintShortOptionsThenSwap`. + // Then executes `flashMintShortOptionsThenSwap`. uint256 amount0Out = pair.token0() == underlyingToken ? amountOptions : 0; uint256 amount1Out = pair.token0() == underlyingToken ? 0 : amountOptions; - pair.swap(amount0Out, amount1Out, address(this), params); // redeemToken <> stablecoin pair swap + + // Borrow the amountOptions quantity of underlyingTokens and execute the callback function using params. + pair.swap(amount0Out, amount1Out, address(this), params); + return true; } - // gets tokens/WETH via a V2 flash swap, mints options, swaps short tokens for tokens, pulls in difference, repays! - function uniswapV2Call( - address sender, - uint256 amount0, - uint256 amount1, - bytes calldata data - ) external override { - (bool success, bytes memory returnData) = address(this).call(data); - require(success, "ERR_UNISWAPV2_CALL_FAIL"); + /** + * @dev Closes an option position and opens a new one using the freed underlyingTokens. + * @notice Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver. + * rollFromOption -> underlyingToken -> rollToOption. + * @param rollFromOption The optionToken to close. + * @param rollToOption The optionToken to mint. + * @param rollQuantity The quantity of underlyingTokens to receive from closed options then use to mint new options. + * @param receiver The address that receives newly minted option and redeem tokens. + */ + function rollOption( + address rollFromOption, + address rollToOption, + uint256 rollQuantity, + address receiver + ) external returns (bool) { + // Close the rollFromOption to receive underlyingTokens. + // Sends the underlyingTokens to this contract. + (, , uint256 outUnderlyings) = TraderLib.safeClose( + IOption(rollFromOption), + rollQuantity, + address(this) + ); + + // Store in memory for gas savings. + ITrader trader_ = trader; + + // Approve underlyingTokens to be sent to the Primitive Trader contract. + IERC20(IOption(rollFromOption).getUnderlyingTokenAddress()).approve( + address(trader_), + uint256(-1) + ); + + // Mint rollToOptions using the underlyingTokens received from closing the rollFromOptions. + // Pulls underlyingTokens from this contract and sends them to the rollToOption contract. + // Sends minted long + short tokens to the "receiver" address. + (uint256 outputOptions, ) = trader_.safeMint( + IOption(rollToOption), + outUnderlyings, + receiver + ); + + // An event is emitted because a position was atomically rolled without additional capital. + emit RolledOptions( + msg.sender, + rollFromOption, + rollToOption, + outputOptions + ); + return true; + } + + // ==== Liquidity Functions ==== + + /** + * @dev Adds liquidity to an option<>quote token pair by minting longOptionTokens with underlyingTokens. + * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + * underlyingToken -> optionToken -> UNI-V2. + * @param optionAddress The address of the optionToken to mint then provide liquidity for. + * @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens. + * @param quantityQuoteTokens The quantity of quoteTokens to add with longOptionTokens to the Uniswap V2 Pair. + * @param minQuantityOptions The minimum quantity of longOptionTokens expected to provide liquidity with. + * @param minQuantityQuoteTokens The minimum quantity of quoteTokens expected to provide liquidity with. + * @param to The address that receives UNI-V2 shares. + * @param deadline The timestamp to expire a pending transaction. + */ + function addLongLiquidityWithUnderlying( + address optionAddress, + uint256 quantityOptions, + uint256 quantityQuoteTokens, + uint256 minQuantityOptions, + uint256 minQuantityQuoteTokens, + address to, + uint256 deadline + ) public nonReentrant returns (bool) { + // Store in memory for gas savings. + IUniswapV2Router02 router_ = router; + address quoteToken_ = quoteToken; + + // Pull quote tokens from msg.sender to add to Uniswap V2 Pair. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + IERC20(quoteToken_).safeTransferFrom( + msg.sender, + address(this), + quantityQuoteTokens + ); + + // Pulls underlyingTokens from msg.sender to this contract. + // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( + IOption(optionAddress), + quantityOptions, + address(this) + ); + + // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. + IERC20(optionAddress).approve(address(router_), uint256(-1)); + IERC20(quoteToken_).approve(address(router_), uint256(-1)); + + // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. + router_.addLiquidity( + optionAddress, + quoteToken, + outputOptions, + quantityQuoteTokens, + minQuantityOptions, + minQuantityQuoteTokens, + to, + deadline + ); + + // Send shortOptionTokens (redeem) from minting option operation to msg.sender. + IERC20(IOption(optionAddress).redeemToken()).safeTransfer( + msg.sender, + outputRedeems + ); + return true; + } + + /** + * @dev Adds redeemToken liquidity to a redeem<>quote token pair by minting shortOptionTokens with underlyingTokens. + * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + * underlyingToken -> redeemToken -> UNI-V2. + * @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for. + * @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens. + * @param quantityQuoteTokens The quantity of quoteTokens to add with shortOptionTokens to the Uniswap V2 Pair. + * @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with. + * @param minQuantityQuoteTokens The minimum quantity of quoteTokens expected to provide liquidity with. + * @param to The address that receives UNI-V2 shares. + * @param deadline The timestamp to expire a pending transaction. + */ + function addShortLiquidityWithUnderlying( + address optionAddress, + uint256 quantityOptions, + uint256 quantityQuoteTokens, + uint256 minShortTokens, + uint256 minQuantityQuoteTokens, + address to, + uint256 deadline + ) public nonReentrant returns (bool) { + // Store in memory for gas savings. + IUniswapV2Router02 router_ = router; + address quoteToken_ = quoteToken; + + // Pull quote tokens from msg.sender to add to Uniswap V2 Pair. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + IERC20(quoteToken_).safeTransferFrom( + msg.sender, + address(this), + quantityQuoteTokens + ); + + // Pulls underlyingTokens from msg.sender to this contract. + // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( + IOption(optionAddress), + quantityOptions, + address(this) + ); + + address redeemToken = IOption(optionAddress).redeemToken(); + + // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. + IERC20(redeemToken).approve(address(router_), uint256(-1)); + IERC20(quoteToken_).approve(address(router_), uint256(-1)); + + // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. + router_.addLiquidity( + redeemToken, + quoteToken, + outputRedeems, + quantityQuoteTokens, + minShortTokens, + minQuantityQuoteTokens, + to, + deadline + ); + + // Send longOptionTokens from minting option operation to msg.sender. + IERC20(optionAddress).safeTransfer(msg.sender, outputOptions); + return true; } /** * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. - * @notice Pulls UNI-V2 liquidity shares with option<>quote token and redeemToken from msg.sender. - * Then closes the optionTokens and withdraws underlyingTokens to the "to" address. + * @notice Pulls UNI-V2 liquidity shares with option<>quote token, and redeemTokens from msg.sender. + * Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. * Sends quoteTokens from the burned UNI-V2 liquidity shares to the "to" address. * UNI-V2 -> optionToken -> underlyingToken. * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. - * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity. + * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options. * @param deadline The timestamp to expire a pending transaction. */ - function removeLiquidityThenCloseOptions( + function removeLongLiquidityThenCloseOptions( address optionAddress, uint256 liquidity, uint256 amountAMin, @@ -394,19 +530,19 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Store in memory for gas savings. address quoteToken_ = quoteToken; IOption optionToken = IOption(optionAddress); - //IUniswapV2Router02 router_ = router; + IUniswapV2Router02 router_ = router; { // Gets the Uniswap V2 Pair address for optionAddress and quoteToken. // Transfers the LP tokens for the pair to this contract. // Warning: external call to a non-trusted address `msg.sender`. - address pair = getUniswapMarketForOption(optionAddress); + address pair = getUniswapMarketForToken(optionAddress); IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity); - IERC20(pair).approve(address(router), uint256(-1)); + IERC20(pair).approve(address(router_), uint256(-1)); } // Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens). - (uint256 amountOptions, uint256 amountQuote) = router.removeLiquidity( + (uint256 amountOptions, uint256 amountQuote) = router_.removeLiquidity( optionAddress, quoteToken_, liquidity, @@ -416,15 +552,12 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { deadline ); - // Approves trader to pull option and redeem tokens from this contract to close options. + // Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options. ITrader trader_ = trader; { - //address redeemToken = optionToken.redeemToken(); + address redeemToken = optionToken.redeemToken(); IERC20(optionAddress).approve(address(trader_), uint256(-1)); - IERC20(optionToken.redeemToken()).approve( - address(trader_), - uint256(-1) - ); + IERC20(redeemToken).approve(address(trader_), uint256(-1)); // Calculate equivalent quantity of redeem (short option) tokens to close the option position. // Need to cancel base units and have quote units remaining. @@ -432,8 +565,8 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { .mul(optionToken.getQuoteValue()) .div(optionToken.getBaseValue()); - // Pull the required redeemTokens from msg.sender to this contract. - IERC20(optionToken.redeemToken()).safeTransferFrom( + // Pull the required shortOptionTokens from msg.sender to this contract. + IERC20(redeemToken).safeTransferFrom( msg.sender, address(this), requiredRedeems @@ -446,18 +579,95 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Send the quoteTokens received from burning liquidity shares to the "to" address. IERC20(quoteToken_).safeTransfer(to, amountQuote); - return (amountOptions, amountQuote); } /** - * @dev Combines "removeLiquidityThenCloseOptions" function with "addLiquidityWithUnderlying" fuction. + * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. + * @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. + * Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. + * Sends quoteTokens from the burned UNI-V2 liquidity shares to the "to" address. + * UNI-V2 -> optionToken -> underlyingToken. + * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. + * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. + * @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity. + * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. + * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options. + * @param deadline The timestamp to expire a pending transaction. + */ + function removeShortLiquidityThenCloseOptions( + address optionAddress, + uint256 liquidity, + uint256 amountAMin, + uint256 amountBMin, + address to, + uint256 deadline + ) public nonReentrant returns (uint256, uint256) { + // Store in memory for gas savings. + address quoteToken_ = quoteToken; + address redeemToken = IOption(optionAddress).redeemToken(); + IUniswapV2Router02 router_ = router; + + { + // Gets the Uniswap V2 Pair address for shortOptionToken and quoteToken. + // Transfers the LP tokens for the pair to this contract. + // Warning: external call to a non-trusted address `msg.sender`. + address pair = getUniswapMarketForToken(redeemToken); + IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity); + IERC20(pair).approve(address(router_), uint256(-1)); + } + + // Remove liquidity from Uniswap V2 pool to receive pool tokens (shortOptionTokens + quoteTokens). + (uint256 amountShortOptions, uint256 amountQuote) = router_ + .removeLiquidity( + redeemToken, + quoteToken_, + liquidity, + amountAMin, + amountBMin, + address(this), + deadline + ); + + // Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options. + { + ITrader trader_ = trader; + IOption optionToken = IOption(optionAddress); + IERC20(address(optionToken)).approve(address(trader_), uint256(-1)); + IERC20(redeemToken).approve(address(trader_), uint256(-1)); + + // Calculate equivalent quantity of redeem (short option) tokens to close the option position. + // Need to cancel base units and have quote units remaining. + uint256 requiredLongOptionTokens = amountShortOptions + .mul(optionToken.getBaseValue()) + .mul(1 ether) + .div(optionToken.getQuoteValue()) + .div(1 ether); + + // Pull the required longOptionTokens from msg.sender to this contract. + IERC20(address(optionToken)).safeTransferFrom( + msg.sender, + address(this), + requiredLongOptionTokens + ); + // Pushes option and redeem tokens to the option contract and calls "closeOption". + // Receives underlyingTokens and sends them to the "to" address. + trader_.safeClose(optionToken, requiredLongOptionTokens, to); + } + + // Send the quoteTokens received from burning liquidity shares to the "to" address. + IERC20(quoteToken_).safeTransfer(to, amountQuote); + return (amountShortOptions, amountQuote); + } + + /** + * @dev Combines "removeLongLiquidityThenCloseOptions" function with "addLongLiquidityWithUnderlying" fuction. * @notice Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair. * UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2. * @param rollFromOption The optionToken address to close a UNI-V2 position. * @param rollToOption The optionToken address to open a UNI-V2 position. * @param liquidity The quantity of UNI-V2 shares to roll from the first Uniswap pool. - * @param amountAMin The minimum quantity of optionTokens to receive from removing liquidity. + * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. * @param to The address that receives the UNI-V2 shares that have been rolled. * @param deadline The timestamp to expire a pending transaction. @@ -474,7 +684,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { ( uint256 outUnderlyings, uint256 outQuote - ) = removeLiquidityThenCloseOptions( + ) = removeLongLiquidityThenCloseOptions( rollFromOption, liquidity, amountAMin, @@ -483,7 +693,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { deadline ); - bool success = addLiquidityWithUnderlying( + bool success = addLongLiquidityWithUnderlying( rollToOption, outUnderlyings, outQuote, @@ -505,140 +715,20 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { return success; } - /** - * @dev Closes an option position and opens a new one using the freed underlyingTokens. - * @notice Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver. - * rollFromOption -> underlyingToken -> rollToOption. - * @param rollFromOption The optionToken to close. - * @param rollToOption The optionToken to mint. - * @param rollQuantity The quantity of underlyingTokens to receive from closed options then use to mint new options. - * @param receiver The address that receives newly minted option and redeem tokens. - */ - function rollOption( - address rollFromOption, - address rollToOption, - uint256 rollQuantity, - address receiver - ) external returns (bool) { - // Close the rollFromOption to receive underlyingTokens. - // Sends the underlyingTokens to this contract. - (, , uint256 outUnderlyings) = TraderLib.safeClose( - IOption(rollFromOption), - rollQuantity, - address(this) - ); - - // Store in memory for gas savings. - ITrader trader_ = trader; - - // Approve underlyingTokens to be sent to the Primitive Trader contract. - IERC20(IOption(rollFromOption).getUnderlyingTokenAddress()).approve( - address(trader_), - uint256(-1) - ); - - // Mint rollToOptions using the underlyingTokens received from closing the rollFromOptions. - // Pulls underlyingTokens from this contract and sends them to the rollToOption contract. - // Sends minted option and redeem tokens to the "receiver" address. - (uint256 outputOptions, ) = trader_.safeMint( - IOption(rollToOption), - outUnderlyings, - receiver - ); - - // An event is emitted because a position was atomically rolled without additional capital. - emit RolledOptions( - msg.sender, - rollFromOption, - rollToOption, - outputOptions - ); - return true; - } - - // ==== Liquidity Functions ==== - - /** - * @dev Adds liquidity to an option<>quote token pair by minting optionTokens with underlyingTokens. - * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. - * underlyingToken -> optionToken -> UNI-V2. - * @param optionAddress The address of the optionToken to mint then provide liquidity for. - * @param quantityOptions The quantity of underlyingTokens to use to mint optionTokens. - * @param quantityQuoteTokens The quantity of quoteTokens to add with optionTokens to the Uniswap V2 Pair. - * @param minQuantityOptions The minimum quantity of optionTokens expected to provide liquidity with. - * @param minQuantityQuoteTokens The minimum quantity of quoteTokens expected to provide liquidity with. - * @param to The address that receives UNI-V2 shares. - * @param deadline The timestamp to expire a pending transaction. - */ - function addLiquidityWithUnderlying( - address optionAddress, - uint256 quantityOptions, - uint256 quantityQuoteTokens, - uint256 minQuantityOptions, - uint256 minQuantityQuoteTokens, - address to, - uint256 deadline - ) public nonReentrant returns (bool) { - // Store in memory for gas savings. - IUniswapV2Router02 router_ = router; - address quoteToken_ = quoteToken; - - // Pull quote tokens from msg.sender to add to Uniswap V2 Pair. - // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - IERC20(quoteToken_).safeTransferFrom( - msg.sender, - address(this), - quantityQuoteTokens - ); - - // Pulls underlyingTokens from msg.sender to this contract. - // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. - // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( - IOption(optionAddress), - quantityOptions, - address(this) - ); - - // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. - IERC20(optionAddress).approve(address(router_), uint256(-1)); - IERC20(quoteToken_).approve(address(router_), uint256(-1)); - - // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. - router_.addLiquidity( - optionAddress, - quoteToken, - outputOptions, - quantityQuoteTokens, - minQuantityOptions, - minQuantityQuoteTokens, - to, - deadline - ); - - // Send redeemTokens (short option tokens) from minting option operation to msg.sender. - IERC20(IOption(optionAddress).redeemToken()).safeTransfer( - msg.sender, - outputRedeems - ); - - return true; - } - // ==== Internal Functions ==== /** * @dev Calls the "swapExactTokensForTokens" function on the Uniswap V2 Router 02 Contract. - * @notice Fails early if the address in the beginning of the path is not the optionToken address. - * @param optionAddress The address of the optionToken to swap from. - * @param amountIn The quantity of optionTokens to swap with. - * @param amountOutMin The minimum quantity of tokens to receive in exchange for the optionTokens swapped. - * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option. - * @param to The address to send the optionToken proceeds and redeem tokens to. + * @notice Fails early if the address in the beginning of the path is not the token address. + * @param tokenAddress The address of the token to swap from. + * @param amountIn The quantity of longOptionTokens to swap with. + * @param amountOutMin The minimum quantity of tokens to receive in exchange for the tokens swapped. + * @param path The token addresses to trade through using their Uniswap V2 pairs. + * @param to The address to send the token proceeds to. * @param deadline The timestamp for a trade to fail at if not successful. */ function _swapExactOptionsForTokens( - address optionAddress, + address tokenAddress, uint256 amountIn, uint256 amountOutMin, address[] memory path, @@ -646,14 +736,14 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { uint256 deadline ) internal returns (uint256[] memory amounts, bool success) { // Fails early if the token being swapped from is not the optionToken. - require(path[0] == optionAddress, "ERR_PATH_OPTION_START"); + require(path[0] == tokenAddress, "ERR_PATH_OPTION_START"); // Store router in memory for gas savings. IUniswapV2Router02 router_ = router; - // Approve the uniswap router to be able to transfer options from this contract. - IERC20(optionAddress).approve(address(router_), uint256(-1)); - // Call the Uniswap V2 function to swap optionTokens to quoteTokens. + // Approve the uniswap router to be able to transfer longOptionTokens from this contract. + IERC20(tokenAddress).approve(address(router_), uint256(-1)); + // Call the Uniswap V2 function to swap longOptionTokens to quoteTokens. (amounts) = router_.swapExactTokensForTokens( amountIn, amountOutMin, @@ -664,6 +754,29 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { success = true; } + // ==== Callback Implementation ==== + + /** + * @dev The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data. + * @param sender The original msg.sender of the UniswapV2Pair.swap() call. + * @param amount0 The quantity of token0 received to the `to` address in the swap() call. + * @param amount1 The quantity of token1 received to the `to` address in the swap() call. + * @param data The payload passed in the `data` parameter of the swap() call. + */ + function uniswapV2Call( + address sender, + uint256 amount0, + uint256 amount1, + bytes calldata data + ) external override { + (bool success, bytes memory returnData) = address(this).call(data); + require( + success && + (returnData.length == 0 || abi.decode(returnData, (bool))), + "ERR_UNISWAPV2_CALL_FAIL" + ); + } + // ==== Management Functions ==== /** @@ -681,24 +794,15 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // ==== View ==== /** - * @dev The maxmium deadline available for each trade. - */ - function getMaxDeadline() public view returns (uint256) { - // solhint-disable-next-line not-rely-on-time - uint256 deadline = now + 15 minutes; - return deadline; - } - - /** - * @dev Gets a Uniswap Pair address for an option token and quote token. - * @param optionAddress The address of the option to get a Uniswap V2 Pair address for (with quoteToken). + * @dev Gets a Uniswap Pair address for a token and quote token. + * @param tokenAddress The address of the token to get a Uniswap V2 Pair address for (with quoteToken). */ - function getUniswapMarketForOption(address optionAddress) + function getUniswapMarketForToken(address tokenAddress) public view returns (address) { - address uniswapPair = factory.getPair(optionAddress, quoteToken); + address uniswapPair = factory.getPair(tokenAddress, quoteToken); require(uniswapPair != address(0x0), "ERR_PAIR_DOES_NOT_EXIST"); return uniswapPair; } @@ -721,6 +825,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { expiry ); require(optionAddress != address(0x0), "ERR_OPTION_DOES_NOT_EXIST"); - return getUniswapMarketForOption(optionAddress); + return getUniswapMarketForToken(optionAddress); } } diff --git a/test/test_uni_connector.js b/test/test_uni_connector.js index 76ca4e0b..39a2c613 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.js @@ -78,13 +78,13 @@ describe("UniswapConnector", () => { trader = await setup.newTrader(Admin, weth.address); // Initialize the uniswap connector with addresses - await uniswapConnector.initialize( + /* await uniswapConnector.initialize( uniswapRouter.address, uniswapFactory.address, trader.address, registry.address, quoteToken.address - ); + ); */ // Approve tokens to be sent to trader contract await underlyingToken @@ -200,42 +200,18 @@ describe("UniswapConnector", () => { .approve(uniswapConnector.address, MILLION_ETHER); }); - describe("setRouter", () => { - it("should set the Router address and emit an event.", async () => { - await expect(uniswapConnector.setRouter(uniswapRouter.address)) - .to.emit(uniswapConnector, "UpdatedRouter") - .withArgs(Alice, uniswapRouter.address); - }); - }); - - describe("setFactory", () => { - it("should set the Factory address and emit an event.", async () => { - await expect(uniswapConnector.setFactory(uniswapFactory.address)) - .to.emit(uniswapConnector, "UpdatedFactory") - .withArgs(Alice, uniswapFactory.address); - }); - }); - - describe("setTrader", () => { - it("should set the Trader address and emit an event.", async () => { - await expect(uniswapConnector.setTrader(trader.address)) - .to.emit(uniswapConnector, "UpdatedTrader") - .withArgs(Alice, trader.address); - }); - }); - - describe("setRegistry", () => { - it("should set the Registry address and emit an event.", async () => { - await expect(uniswapConnector.setRegistry(registry.address)) - .to.emit(uniswapConnector, "UpdatedRegistry") - .withArgs(Alice, registry.address); - }); - }); - - describe("setQuoteToken", () => { - it("should set the QuoteToken address and emit an event.", async () => { - await expect(uniswapConnector.setQuoteToken(quoteToken.address)) - .to.emit(uniswapConnector, "UpdatedQuoteToken") + describe("initialize", () => { + it("should set the initial contract addresses", async () => { + await expect( + uniswapConnector.initialize( + uniswapRouter.address, + uniswapFactory.address, + trader.address, + registry.address, + quoteToken.address + ) + ) + .to.emit(uniswapConnector, "Initialized") .withArgs(Alice, quoteToken.address); }); }); diff --git a/test/test_uni_flash.js b/test/test_uni_flash.js index 1ddc8c7c..049b020b 100644 --- a/test/test_uni_flash.js +++ b/test/test_uni_flash.js @@ -186,7 +186,7 @@ describe("UniswapConnector Flash", () => { .approve(uniswapConnector.address, MILLION_ETHER); }); - /* describe("flashloanMintShortOptionsThenSwap", () => { + /* describe("flashMintShortOptionsThenSwap", () => { it("sends to mimic a flash loan", async () => { let pairAddress = await uniswapFactory.getPair( quoteToken.address, @@ -200,21 +200,19 @@ describe("UniswapConnector Flash", () => { underlyingToken.address, ]; let to = Alice; - const deadline = Math.floor(Date.now() / 1000) + 60 * 20; // send in underlyingTokens as if was flash swap await underlyingToken.transfer( uniswapConnector.address, flashLoanQuantity ); await expect( - uniswapConnector.flashloanMintShortOptionsThenSwap( + uniswapConnector.flashMintShortOptionsThenSwap( pairAddress, optionToken.address, flashLoanQuantity, amountOutMin, path, - to, - deadline + to ) ) .to.emit(uniswapConnector, "FlashedShortOption") @@ -222,7 +220,7 @@ describe("UniswapConnector Flash", () => { }); }); */ - describe("openFlashShort", () => { + describe("openFlashLong", () => { it("gets a flash loan for underlyings, mints options, swaps redeem to underlyings to pay back", async () => { // Create a Uniswap V2 Pair and add liquidity. console.log( @@ -259,10 +257,10 @@ describe("UniswapConnector Flash", () => { .div(1000) .sub(amounts[1]); await expect( - uniswapConnector.openFlashShort( + uniswapConnector.openFlashLong( + optionToken.address, amountOptions, - amountOutMin, - optionToken.address + amountOutMin ) ) .to.emit(uniswapConnector, "FlashedShortOption") From 0887afca38a2b9cb06711950b63cf9c1fd90869e Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Wed, 28 Oct 2020 20:34:49 -0700 Subject: [PATCH 07/20] Removed RollOptions function in favor of scope and contract size. --- artifacts/UniswapConnector.json | 82 +------------------ .../connectors/Uniswap/UniswapConnector.sol | 58 ------------- 2 files changed, 2 insertions(+), 138 deletions(-) diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index 0e7f7f07..5e154de4 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -100,37 +100,6 @@ "name": "RolledOptionLiquidity", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "optionFrom", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "optionTo", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "name": "RolledOptions", - "type": "event" - }, { "inputs": [], "name": "VERSION", @@ -144,19 +113,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "WETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -683,40 +639,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "rollFromOption", - "type": "address" - }, - { - "internalType": "address", - "name": "rollToOption", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rollQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "rollOption", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -834,8 +756,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b61659080620000fb6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806395f0ae76116100de578063cd04552411610097578063f2fde38b11610071578063f2fde38b14610db8578063f441e35014610dfc578063f887ea4014610ea2578063ffa1ad7414610eec57610173565b8063cd04552414610bab578063d1dabfcb14610c1b578063d9b3612514610cc957610173565b806395f0ae761461077a578063a911afd7146108a8578063ad5c46481461094f578063b17d057014610999578063c45a015514610add578063c762405014610b2757610173565b80635bc5dbe1116101305780635bc5dbe1146104e65780636af255d714610594578063715018a6146106185780637b103999146106225780638ac323291461066c5780638da5cb5b1461073057610173565b806307f249061461017857806310d1e85c1461021f5780631459457a146102cc5780631758078b14610390578063217a4b70146103da57806351b8498f14610424575b600080fd5b610202600480360360c081101561018e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f10565b604051808381526020018281526020019250505060405180910390f35b6102ca6004803603608081101561023557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561028657600080fd5b82018360208201111561029857600080fd5b803590602001918460018302840111640100000000831117156102ba57600080fd5b90919293919293905050506117d9565b005b61038e600480360360a08110156102e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611908565b005b610398611f4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e2611f71565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104a4600480360360a081101561043a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611f97565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61057a600480360360e08110156104fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061217a565b604051808215151515815260200191505060405180910390f35b6105d6600480360360208110156105aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61062061280c565b005b61062a612994565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610716600480360360e081101561068257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129ba565b604051808215151515815260200191505060405180910390f35b610738612ae4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61088e600480360360c081101561079057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156107e157600080fd5b8201836020820111156107f357600080fd5b8035906020019184602083028401116401000000008311171561081557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b0d565b604051808215151515815260200191505060405180910390f35b610932600480360360c08110156108be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c68565b604051808381526020018281526020019250505060405180910390f35b6109576134fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ac3600480360360c08110156109af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a2057600080fd5b820183602082011115610a3257600080fd5b80359060200191846020830284011164010000000083111715610a5457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613515565b604051808215151515815260200191505060405180910390f35b610ae5613b45565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b6960048036036020811015610b3d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613b6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c0160048036036060811015610bc157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613d4c565b604051808215151515815260200191505060405180910390f35b610caf600480360360e0811015610c3157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614516565b604051808215151515815260200191505060405180910390f35b610d9e600480360360c0811015610cdf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610d3057600080fd5b820183602082011115610d4257600080fd5b80359060200191846020830284011164010000000083111715610d6457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614a62565b604051808215151515815260200191505060405180910390f35b610dfa60048036036020811015610dce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614bf9565b005b610e8860048036036080811015610e1257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614e06565b604051808215151515815260200191505060405180910390f35b610eaa615131565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ef4615157565b604051808260ff1660ff16815260200191505060405180910390f35b600080600060149054906101000a900460ff16610f95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561101e57600080fd5b505afa158015611032573d6000803e3d6000fd5b505050506040513d602081101561104857600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600061108d83613b6b565b90506110bc33308d8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561116357600080fd5b505af1158015611177573d6000803e3d6000fd5b505050506040513d602081101561118d57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde85878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156112a957600080fd5b505af11580156112bd573d6000803e3d6000fd5b505050506040513d60408110156112d357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156113c557600080fd5b505af11580156113d9573d6000803e3d6000fd5b505050506040513d60208110156113ef57600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156114a857600080fd5b505af11580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b810190808051906020019092919050505050600061163e670de0b6b3a76400006116308473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561153a57600080fd5b505afa15801561154e573d6000803e3d6000fd5b505050506040513d602081101561156457600080fd5b8101908080519060200190929190505050611622670de0b6b3a76400006116148873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ca57600080fd5b505afa1580156115de573d6000803e3d6000fd5b505050506040513d60208110156115f457600080fd5b81019080805190602001909291905050508c61524990919063ffffffff16565b61524990919063ffffffff16565b6152cf90919063ffffffff16565b6152cf90919063ffffffff16565b905061166d3330838573ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838f6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561172857600080fd5b505af115801561173c573d6000803e3d6000fd5b505050506040513d606081101561175257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050506117a889828773ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b81819650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611848576040519150601f19603f3d011682016040523d82523d6000602084013e61184d565b606091505b509150915081801561188d575060008151148061188c575080806020019051602081101561187a57600080fd5b81019080805190602001909291905050505b5b6118ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6119106153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ce1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611da5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561208557600080fd5b505afa158015612099573d6000803e3d6000fd5b505050506040513d60208110156120af57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612165576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61216e81613b6b565b91505095945050505050565b60008060149054906101000a900460ff166121fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061229233308a8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000806122a08c8c306153d9565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122ec57600080fd5b505afa158015612300573d6000803e3d6000fd5b505050506040513d602081101561231657600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156123d057600080fd5b505af11580156123e4573d6000803e3d6000fd5b505050506040513d60208110156123fa57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156124b357600080fd5b505af11580156124c7573d6000803e3d6000fd5b505050506040513d60208110156124dd57600080fd5b8101908080519060200190929190505050508473ffffffffffffffffffffffffffffffffffffffff1663e8e3370082600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858f8f8f8f8f6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561262057600080fd5b505af1158015612634573d6000803e3d6000fd5b505050506040513d606081101561264a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061269d33848f73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b6001955050505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156127c657600080fd5b505af11580156127da573d6000803e3d6000fd5b505050506040513d60208110156127f057600080fd5b8101908080519060200190929190505050905080915050919050565b6128146153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146128d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006129cd8a8989898989612c68565b9150915060006129e28a84848b8b8b8b614516565b905080612a57576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612b1d8989306153d9565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b6957600080fd5b505afa158015612b7d573d6000803e3d6000fd5b505050506040513d6020811015612b9357600080fd5b810190808051906020019092919050505090506000612bb682848b8b8b8b6155d9565b91505080612c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612c5787858d73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b809450505050509695505050505050565b600080600060149054906101000a900460ff16612ced576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000612d658c613b6b565b9050612d9433308d8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612e3b57600080fd5b505af1158015612e4f573d6000803e3d6000fd5b505050506040513d6020811015612e6557600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612f8157600080fd5b505af1158015612f95573d6000803e3d6000fd5b505050506040513d6040811015612fab57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303957600080fd5b505afa15801561304d573d6000803e3d6000fd5b505050506040513d602081101561306357600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561311d57600080fd5b505af1158015613131573d6000803e3d6000fd5b505050506040513d602081101561314757600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561320057600080fd5b505af1158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b81019080805190602001909291905050505060006133628773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561328757600080fd5b505afa15801561329b573d6000803e3d6000fd5b505050506040513d60208110156132b157600080fd5b81019080805190602001909291905050506133548973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330a57600080fd5b505afa15801561331e573d6000803e3d6000fd5b505050506040513d602081101561333457600080fd5b81019080805190602001909291905050508861524990919063ffffffff16565b6152cf90919063ffffffff16565b90506133913330838573ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858d6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561344e57600080fd5b505af1158015613462573d6000803e3d6000fd5b505050506040513d606081101561347857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506134cb8a838873ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b8282975097505050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b600080851161358c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156135d457600080fd5b505afa1580156135e8573d6000803e3d6000fd5b505050506040513d60208110156135fe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061363557fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146136c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b6136f187878373ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561377257600080fd5b505af1158015613786573d6000803e3d6000fd5b505050506040513d604081101561379c57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561385a57808201518184015260208101905061383f565b50505050905001935050505060006040518083038186803b15801561387e57600080fd5b505afa158015613892573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156138bc57600080fd5b81019080805160405193929190846401000000008211156138dc57600080fd5b838201915060208201858111156138f257600080fd5b825186602082028301116401000000008211171561390f57600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561394657808201518184015260208101905061392b565b5050505090500160405250505090506000808b905060008360018151811061396a57fe5b602002602001015190506139d4816139c66103e86139b861399560038861524990919063ffffffff16565b6139aa6103e88961524990919063ffffffff16565b61596390919063ffffffff16565b6152cf90919063ffffffff16565b6159eb90919063ffffffff16565b92505050613a838d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613a2357600080fd5b505afa158015613a37573d6000803e3d6000fd5b505050506040513d6020811015613a4d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b613ab0888e838673ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050613b3485838b73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613c6357600080fd5b505afa158015613c77573d6000803e3d6000fd5b505050506040513d6020811015613c8d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613d43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b60008060149054906101000a900460ff16613dcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e3157600080fd5b505afa158015613e45573d6000803e3d6000fd5b505050506040513d6020811015613e5b57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613eb657600080fd5b505afa158015613eca573d6000803e3d6000fd5b505050506040513d6020811015613ee057600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613fc857600080fd5b505afa158015613fdc573d6000803e3d6000fd5b505050506040513d6020811015613ff257600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156140375781602001602082028038833980820191505090505b509050838160008151811061404857fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061409057fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605081526020016164e160509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156141e45780820151818401526020810190506141c9565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156142b257600080fd5b505afa1580156142c6573d6000803e3d6000fd5b505050506040513d60208110156142dc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461430f576000614311565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561437257600080fd5b505afa158015614386573d6000803e3d6000fd5b505050506040513d602081101561439c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146143ce578b6143d1565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614480578082015181840152602081019050614465565b50505050905090810190601f1680156144ad5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156144cf57600080fd5b505af11580156144e3573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16614599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061462e33308a8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b60008061463c8c8c306153d9565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156146e757600080fd5b505af11580156146fb573d6000803e3d6000fd5b505050506040513d602081101561471157600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156147ca57600080fd5b505af11580156147de573d6000803e3d6000fd5b505050506040513d60208110156147f457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561493757600080fd5b505af115801561494b573d6000803e3d6000fd5b505050506040513d606081101561496157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614a3433828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156149d457600080fd5b505afa1580156149e8573d6000803e3d6000fd5b505050506040513d60208110156149fe57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b6000806000614a728a8a306153d9565b915091506000614ac78b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6155d9565b91505080614b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614be886838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b8857600080fd5b505afa158015614b9c573d6000803e3d6000fd5b505050506040513d6020811015614bb257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b809350505050979650505050505050565b614c016153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614cc2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614d48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061649a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614e14868530615a35565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614e8557600080fd5b505afa158015614e99573d6000803e3d6000fd5b505050506040513d6020811015614eaf57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614f6657600080fd5b505af1158015614f7a573d6000803e3d6000fd5b505050506040513d6020811015614f9057600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561505e57600080fd5b505af1158015615072573d6000803e3d6000fd5b505050506040513d604081101561508857600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b615243846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061607d565b50505050565b60008083141561525c57600090506152c9565b600082840290508284828161526d57fe5b04146152c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806164c06021913960400191505060405180910390fd5b809150505b92915050565b600061531183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506162c8565b905092915050565b6153cc8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061607d565b505050565b600033905090565b60008060008411615452576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6154ff3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561549e57600080fd5b505afa1580156154b2573d6000803e3d6000fd5b505050506040513d60208110156154c857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561558057600080fd5b505af1158015615594573d6000803e3d6000fd5b505050506040513d60408110156155aa57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061560157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615692576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561576057600080fd5b505af1158015615774573d6000803e3d6000fd5b505050506040513d602081101561578a57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015615853578082015181840152602081019050615838565b505050509050019650505050505050600060405180830381600087803b15801561587c57600080fd5b505af1158015615890573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156158ba57600080fd5b81019080805160405193929190846401000000008211156158da57600080fd5b838201915060208201858111156158f057600080fd5b825186602082028301116401000000008211171561590d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615944578082015181840152602081019050615929565b5050505090500160405250505092506001915050965096945050505050565b6000808284019050838110156159e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000615a2d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061638e565b905092915050565b6000806000808511615aaf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615b2d57600080fd5b505afa158015615b41573d6000803e3d6000fd5b505050506040513d6020811015615b5757600080fd5b81019080805190602001909291905050501015615bdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000615d028773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015615c2757600080fd5b505afa158015615c3b573d6000803e3d6000fd5b505050506040513d6020811015615c5157600080fd5b8101908080519060200190929190505050615cf48973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015615caa57600080fd5b505afa158015615cbe573d6000803e3d6000fd5b505050506040513d6020811015615cd457600080fd5b81019080805190602001909291905050508961524990919063ffffffff16565b6152cf90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015615d4b57600080fd5b505afa158015615d5f573d6000803e3d6000fd5b505050506040513d6020811015615d7557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615e0257600080fd5b505afa158015615e16573d6000803e3d6000fd5b505050506040513d6020811015615e2c57600080fd5b81019080805190602001909291905050501015615eb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b615f5e3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015615efd57600080fd5b505afa158015615f11573d6000803e3d6000fd5b505050506040513d6020811015615f2757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b615f8b3388888a73ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561600d57600080fd5b505af1158015616021573d6000803e3d6000fd5b505050506040513d606081101561603757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b61609c8273ffffffffffffffffffffffffffffffffffffffff1661644e565b61610e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061615d578051825260208201915060208101905060208303925061613a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146161bf576040519150601f19603f3d011682016040523d82523d6000602084013e6161c4565b606091505b50915091508161623c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156162c25780806020019051602081101561625b57600080fd5b81019080805190602001909291905050506162c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616531602a913960400191505060405180910390fd5b5b50505050565b60008083118290616374576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561633957808201518184015260208101905061631e565b50505050905090810190601f1680156163665780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161638057fe5b049050809150509392505050565b600083831115829061643b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156164005780820151818401526020810190506163e5565b50505050905090810190601f16801561642d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561649057506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122072a1d22bc74d368ae10890a1217a72dacc28ae2d70ba5703641dfd385603e4d164736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c806395f0ae76116100de578063cd04552411610097578063f2fde38b11610071578063f2fde38b14610db8578063f441e35014610dfc578063f887ea4014610ea2578063ffa1ad7414610eec57610173565b8063cd04552414610bab578063d1dabfcb14610c1b578063d9b3612514610cc957610173565b806395f0ae761461077a578063a911afd7146108a8578063ad5c46481461094f578063b17d057014610999578063c45a015514610add578063c762405014610b2757610173565b80635bc5dbe1116101305780635bc5dbe1146104e65780636af255d714610594578063715018a6146106185780637b103999146106225780638ac323291461066c5780638da5cb5b1461073057610173565b806307f249061461017857806310d1e85c1461021f5780631459457a146102cc5780631758078b14610390578063217a4b70146103da57806351b8498f14610424575b600080fd5b610202600480360360c081101561018e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f10565b604051808381526020018281526020019250505060405180910390f35b6102ca6004803603608081101561023557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561028657600080fd5b82018360208201111561029857600080fd5b803590602001918460018302840111640100000000831117156102ba57600080fd5b90919293919293905050506117d9565b005b61038e600480360360a08110156102e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611908565b005b610398611f4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e2611f71565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104a4600480360360a081101561043a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611f97565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61057a600480360360e08110156104fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061217a565b604051808215151515815260200191505060405180910390f35b6105d6600480360360208110156105aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61062061280c565b005b61062a612994565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610716600480360360e081101561068257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129ba565b604051808215151515815260200191505060405180910390f35b610738612ae4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61088e600480360360c081101561079057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156107e157600080fd5b8201836020820111156107f357600080fd5b8035906020019184602083028401116401000000008311171561081557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b0d565b604051808215151515815260200191505060405180910390f35b610932600480360360c08110156108be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c68565b604051808381526020018281526020019250505060405180910390f35b6109576134fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ac3600480360360c08110156109af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a2057600080fd5b820183602082011115610a3257600080fd5b80359060200191846020830284011164010000000083111715610a5457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613515565b604051808215151515815260200191505060405180910390f35b610ae5613b45565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b6960048036036020811015610b3d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613b6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c0160048036036060811015610bc157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613d4c565b604051808215151515815260200191505060405180910390f35b610caf600480360360e0811015610c3157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614516565b604051808215151515815260200191505060405180910390f35b610d9e600480360360c0811015610cdf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610d3057600080fd5b820183602082011115610d4257600080fd5b80359060200191846020830284011164010000000083111715610d6457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614a62565b604051808215151515815260200191505060405180910390f35b610dfa60048036036020811015610dce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614bf9565b005b610e8860048036036080811015610e1257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614e06565b604051808215151515815260200191505060405180910390f35b610eaa615131565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ef4615157565b604051808260ff1660ff16815260200191505060405180910390f35b600080600060149054906101000a900460ff16610f95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561101e57600080fd5b505afa158015611032573d6000803e3d6000fd5b505050506040513d602081101561104857600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600061108d83613b6b565b90506110bc33308d8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561116357600080fd5b505af1158015611177573d6000803e3d6000fd5b505050506040513d602081101561118d57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde85878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156112a957600080fd5b505af11580156112bd573d6000803e3d6000fd5b505050506040513d60408110156112d357600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156113c557600080fd5b505af11580156113d9573d6000803e3d6000fd5b505050506040513d60208110156113ef57600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156114a857600080fd5b505af11580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b810190808051906020019092919050505050600061163e670de0b6b3a76400006116308473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561153a57600080fd5b505afa15801561154e573d6000803e3d6000fd5b505050506040513d602081101561156457600080fd5b8101908080519060200190929190505050611622670de0b6b3a76400006116148873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ca57600080fd5b505afa1580156115de573d6000803e3d6000fd5b505050506040513d60208110156115f457600080fd5b81019080805190602001909291905050508c61524990919063ffffffff16565b61524990919063ffffffff16565b6152cf90919063ffffffff16565b6152cf90919063ffffffff16565b905061166d3330838573ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838f6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561172857600080fd5b505af115801561173c573d6000803e3d6000fd5b505050506040513d606081101561175257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050506117a889828773ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b81819650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611848576040519150601f19603f3d011682016040523d82523d6000602084013e61184d565b606091505b509150915081801561188d575060008151148061188c575080806020019051602081101561187a57600080fd5b81019080805190602001909291905050505b5b6118ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6119106153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ce1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611da5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561208557600080fd5b505afa158015612099573d6000803e3d6000fd5b505050506040513d60208110156120af57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612165576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61216e81613b6b565b91505095945050505050565b60008060149054906101000a900460ff166121fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061229233308a8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000806122a08c8c306153d9565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122ec57600080fd5b505afa158015612300573d6000803e3d6000fd5b505050506040513d602081101561231657600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156123d057600080fd5b505af11580156123e4573d6000803e3d6000fd5b505050506040513d60208110156123fa57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156124b357600080fd5b505af11580156124c7573d6000803e3d6000fd5b505050506040513d60208110156124dd57600080fd5b8101908080519060200190929190505050508473ffffffffffffffffffffffffffffffffffffffff1663e8e3370082600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858f8f8f8f8f6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561262057600080fd5b505af1158015612634573d6000803e3d6000fd5b505050506040513d606081101561264a57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061269d33848f73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b6001955050505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156127c657600080fd5b505af11580156127da573d6000803e3d6000fd5b505050506040513d60208110156127f057600080fd5b8101908080519060200190929190505050905080915050919050565b6128146153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146128d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006129cd8a8989898989612c68565b9150915060006129e28a84848b8b8b8b614516565b905080612a57576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612b1d8989306153d9565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b6957600080fd5b505afa158015612b7d573d6000803e3d6000fd5b505050506040513d6020811015612b9357600080fd5b810190808051906020019092919050505090506000612bb682848b8b8b8b6155d9565b91505080612c2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612c5787858d73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b809450505050509695505050505050565b600080600060149054906101000a900460ff16612ced576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000612d658c613b6b565b9050612d9433308d8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612e3b57600080fd5b505af1158015612e4f573d6000803e3d6000fd5b505050506040513d6020811015612e6557600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612f8157600080fd5b505af1158015612f95573d6000803e3d6000fd5b505050506040513d6040811015612fab57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303957600080fd5b505afa15801561304d573d6000803e3d6000fd5b505050506040513d602081101561306357600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561311d57600080fd5b505af1158015613131573d6000803e3d6000fd5b505050506040513d602081101561314757600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561320057600080fd5b505af1158015613214573d6000803e3d6000fd5b505050506040513d602081101561322a57600080fd5b81019080805190602001909291905050505060006133628773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561328757600080fd5b505afa15801561329b573d6000803e3d6000fd5b505050506040513d60208110156132b157600080fd5b81019080805190602001909291905050506133548973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330a57600080fd5b505afa15801561331e573d6000803e3d6000fd5b505050506040513d602081101561333457600080fd5b81019080805190602001909291905050508861524990919063ffffffff16565b6152cf90919063ffffffff16565b90506133913330838573ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858d6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561344e57600080fd5b505af1158015613462573d6000803e3d6000fd5b505050506040513d606081101561347857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506134cb8a838873ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b8282975097505050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b600080851161358c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156135d457600080fd5b505afa1580156135e8573d6000803e3d6000fd5b505050506040513d60208110156135fe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061363557fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16146136c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b6136f187878373ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561377257600080fd5b505af1158015613786573d6000803e3d6000fd5b505050506040513d604081101561379c57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561385a57808201518184015260208101905061383f565b50505050905001935050505060006040518083038186803b15801561387e57600080fd5b505afa158015613892573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156138bc57600080fd5b81019080805160405193929190846401000000008211156138dc57600080fd5b838201915060208201858111156138f257600080fd5b825186602082028301116401000000008211171561390f57600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561394657808201518184015260208101905061392b565b5050505090500160405250505090506000808b905060008360018151811061396a57fe5b602002602001015190506139d4816139c66103e86139b861399560038861524990919063ffffffff16565b6139aa6103e88961524990919063ffffffff16565b61596390919063ffffffff16565b6152cf90919063ffffffff16565b6159eb90919063ffffffff16565b92505050613a838d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613a2357600080fd5b505afa158015613a37573d6000803e3d6000fd5b505050506040513d6020811015613a4d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b613ab0888e838673ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050613b3485838b73ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613c6357600080fd5b505afa158015613c77573d6000803e3d6000fd5b505050506040513d6020811015613c8d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613d43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b60008060149054906101000a900460ff16613dcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e3157600080fd5b505afa158015613e45573d6000803e3d6000fd5b505050506040513d6020811015613e5b57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613eb657600080fd5b505afa158015613eca573d6000803e3d6000fd5b505050506040513d6020811015613ee057600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613fc857600080fd5b505afa158015613fdc573d6000803e3d6000fd5b505050506040513d6020811015613ff257600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156140375781602001602082028038833980820191505090505b509050838160008151811061404857fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061409057fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605081526020016164e160509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156141e45780820151818401526020810190506141c9565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156142b257600080fd5b505afa1580156142c6573d6000803e3d6000fd5b505050506040513d60208110156142dc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461430f576000614311565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561437257600080fd5b505afa158015614386573d6000803e3d6000fd5b505050506040513d602081101561439c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146143ce578b6143d1565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614480578082015181840152602081019050614465565b50505050905090810190601f1680156144ad5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156144cf57600080fd5b505af11580156144e3573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16614599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061462e33308a8473ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b60008061463c8c8c306153d9565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156146e757600080fd5b505af11580156146fb573d6000803e3d6000fd5b505050506040513d602081101561471157600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156147ca57600080fd5b505af11580156147de573d6000803e3d6000fd5b505050506040513d60208110156147f457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561493757600080fd5b505af115801561494b573d6000803e3d6000fd5b505050506040513d606081101561496157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614a3433828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156149d457600080fd5b505afa1580156149e8573d6000803e3d6000fd5b505050506040513d60208110156149fe57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b6000806000614a728a8a306153d9565b915091506000614ac78b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a6155d9565b91505080614b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614be886838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b8857600080fd5b505afa158015614b9c573d6000803e3d6000fd5b505050506040513d6020811015614bb257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166153199092919063ffffffff16565b809350505050979650505050505050565b614c016153d1565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614cc2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614d48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061649a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080614e14868530615a35565b925050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614e8557600080fd5b505afa158015614e99573d6000803e3d6000fd5b505050506040513d6020811015614eaf57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614f6657600080fd5b505af1158015614f7a573d6000803e3d6000fd5b505050506040513d6020811015614f9057600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166320e469d68885886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200193505050506040805180830381600087803b15801561505e57600080fd5b505af1158015615072573d6000803e3d6000fd5b505050506040513d604081101561508857600080fd5b8101908080519060200190929190805190602001909291905050505090508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff3ba593321fc56277d51dad4f0bef1650d7ec2e08229bebf53d499c96ec044f0846040518082815260200191505060405180910390a460019350505050949350505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b615243846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061607d565b50505050565b60008083141561525c57600090506152c9565b600082840290508284828161526d57fe5b04146152c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806164c06021913960400191505060405180910390fd5b809150505b92915050565b600061531183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506162c8565b905092915050565b6153cc8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061607d565b505050565b600033905090565b60008060008411615452576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6154ff3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561549e57600080fd5b505afa1580156154b2573d6000803e3d6000fd5b505050506040513d60208110156154c857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561558057600080fd5b505af1158015615594573d6000803e3d6000fd5b505050506040513d60408110156155aa57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061560157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615692576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561576057600080fd5b505af1158015615774573d6000803e3d6000fd5b505050506040513d602081101561578a57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015615853578082015181840152602081019050615838565b505050509050019650505050505050600060405180830381600087803b15801561587c57600080fd5b505af1158015615890573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156158ba57600080fd5b81019080805160405193929190846401000000008211156158da57600080fd5b838201915060208201858111156158f057600080fd5b825186602082028301116401000000008211171561590d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015615944578082015181840152602081019050615929565b5050505090500160405250505092506001915050965096945050505050565b6000808284019050838110156159e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000615a2d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061638e565b905092915050565b6000806000808511615aaf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615b2d57600080fd5b505afa158015615b41573d6000803e3d6000fd5b505050506040513d6020811015615b5757600080fd5b81019080805190602001909291905050501015615bdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000615d028773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015615c2757600080fd5b505afa158015615c3b573d6000803e3d6000fd5b505050506040513d6020811015615c5157600080fd5b8101908080519060200190929190505050615cf48973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015615caa57600080fd5b505afa158015615cbe573d6000803e3d6000fd5b505050506040513d6020811015615cd457600080fd5b81019080805190602001909291905050508961524990919063ffffffff16565b6152cf90919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015615d4b57600080fd5b505afa158015615d5f573d6000803e3d6000fd5b505050506040513d6020811015615d7557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015615e0257600080fd5b505afa158015615e16573d6000803e3d6000fd5b505050506040513d6020811015615e2c57600080fd5b81019080805190602001909291905050501015615eb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b615f5e3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015615efd57600080fd5b505afa158015615f11573d6000803e3d6000fd5b505050506040513d6020811015615f2757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b615f8b3388888a73ffffffffffffffffffffffffffffffffffffffff1661515c909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561600d57600080fd5b505af1158015616021573d6000803e3d6000fd5b505050506040513d606081101561603757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b61609c8273ffffffffffffffffffffffffffffffffffffffff1661644e565b61610e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061615d578051825260208201915060208101905060208303925061613a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146161bf576040519150601f19603f3d011682016040523d82523d6000602084013e6161c4565b606091505b50915091508161623c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156162c25780806020019051602081101561625b57600080fd5b81019080805190602001909291905050506162c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616531602a913960400191505060405180910390fd5b5b50505050565b60008083118290616374576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561633957808201518184015260208101905061631e565b50505050905090810190601f1680156163665780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161638057fe5b049050809150509392505050565b600083831115829061643b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156164005780820151818401526020810190506163e5565b50505050905090810190601f16801561642d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561649057506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122072a1d22bc74d368ae10890a1217a72dacc28ae2d70ba5703641dfd385603e4d164736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615aef80620000fb6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cd0455241161007c578063cd04552414610b3b578063d1dabfcb14610bab578063d9b3612514610c59578063f2fde38b14610d48578063f887ea4014610d8c578063ffa1ad7414610dd65761014d565b80638da5cb5b1461070a57806395f0ae7614610754578063a911afd714610882578063b17d057014610929578063c45a015514610a6d578063c762405014610ab75761014d565b806351b8498f1161011557806351b8498f146103fe5780635bc5dbe1146104c05780636af255d71461056e578063715018a6146105f25780637b103999146105fc5780638ac32329146106465761014d565b806307f249061461015257806310d1e85c146101f95780631459457a146102a65780631758078b1461036a578063217a4b70146103b4575b600080fd5b6101dc600480360360c081101561016857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dfa565b604051808381526020018281526020019250505060405180910390f35b6102a46004803603608081101561020f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561026057600080fd5b82018360208201111561027257600080fd5b8035906020019184600183028401116401000000008311171561029457600080fd5b90919293919293905050506116c3565b005b610368600480360360a08110156102bc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117f2565b005b610372611e35565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103bc611e5b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61047e600480360360a081101561041457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611e81565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610554600480360360e08110156104d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612064565b604051808215151515815260200191505060405180910390f35b6105b06004803603602081101561058457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105fa6126f6565b005b61060461287e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106f0600480360360e081101561065c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128a4565b604051808215151515815260200191505060405180910390f35b6107126129ce565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360c081101561076a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156107bb57600080fd5b8201836020820111156107cd57600080fd5b803590602001918460208302840111640100000000831117156107ef57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129f7565b604051808215151515815260200191505060405180910390f35b61090c600480360360c081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b52565b604051808381526020018281526020019250505060405180910390f35b610a53600480360360c081101561093f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109b057600080fd5b8201836020820111156109c257600080fd5b803590602001918460208302840111640100000000831117156109e457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506133e7565b604051808215151515815260200191505060405180910390f35b610a75613a17565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610af960048036036020811015610acd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613a3d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b9160048036036060811015610b5157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613c1e565b604051808215151515815260200191505060405180910390f35b610c3f600480360360e0811015610bc157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506143e8565b604051808215151515815260200191505060405180910390f35b610d2e600480360360c0811015610c6f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610cc057600080fd5b820183602082011115610cd257600080fd5b80359060200191846020830284011164010000000083111715610cf457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614934565b604051808215151515815260200191505060405180910390f35b610d8a60048036036020811015610d5e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614acb565b005b610d94614cd8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dde614cfe565b604051808260ff1660ff16815260200191505060405180910390f35b600080600060149054906101000a900460ff16610e7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0857600080fd5b505afa158015610f1c573d6000803e3d6000fd5b505050506040513d6020811015610f3257600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000610f7783613a3d565b9050610fa633308d8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561104d57600080fd5b505af1158015611061573d6000803e3d6000fd5b505050506040513d602081101561107757600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde85878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561119357600080fd5b505af11580156111a7573d6000803e3d6000fd5b505050506040513d60408110156111bd57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156112af57600080fd5b505af11580156112c3573d6000803e3d6000fd5b505050506040513d60208110156112d957600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561139257600080fd5b505af11580156113a6573d6000803e3d6000fd5b505050506040513d60208110156113bc57600080fd5b8101908080519060200190929190505050506000611528670de0b6b3a764000061151a8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d602081101561144e57600080fd5b810190808051906020019092919050505061150c670de0b6b3a76400006114fe8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b457600080fd5b505afa1580156114c8573d6000803e3d6000fd5b505050506040513d60208110156114de57600080fd5b81019080805190602001909291905050508c614df090919063ffffffff16565b614df090919063ffffffff16565b614e7690919063ffffffff16565b614e7690919063ffffffff16565b90506115573330838573ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838f6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561161257600080fd5b505af1158015611626573d6000803e3d6000fd5b505050506040513d606081101561163c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050505061169289828773ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b81819650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611732576040519150601f19603f3d011682016040523d82523d6000602084013e611737565b606091505b50915091508180156117775750600081511480611776575080806020019051602081101561176457600080fd5b81019080805190602001909291905050505b5b6117e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6117fa614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461197f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611f6f57600080fd5b505afa158015611f83573d6000803e3d6000fd5b505050506040513d6020811015611f9957600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561204f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61205881613a3d565b91505095945050505050565b60008060149054906101000a900460ff166120e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061217c33308a8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b60008061218a8c8c30614f80565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121d657600080fd5b505afa1580156121ea573d6000803e3d6000fd5b505050506040513d602081101561220057600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156122ba57600080fd5b505af11580156122ce573d6000803e3d6000fd5b505050506040513d60208110156122e457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561239d57600080fd5b505af11580156123b1573d6000803e3d6000fd5b505050506040513d60208110156123c757600080fd5b8101908080519060200190929190505050508473ffffffffffffffffffffffffffffffffffffffff1663e8e3370082600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858f8f8f8f8f6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561250a57600080fd5b505af115801561251e573d6000803e3d6000fd5b505050506040513d606081101561253457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061258733848f73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b6001955050505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156126b057600080fd5b505af11580156126c4573d6000803e3d6000fd5b505050506040513d60208110156126da57600080fd5b8101908080519060200190929190505050905080915050919050565b6126fe614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128b78a8989898989612b52565b9150915060006128cc8a84848b8b8b8b6143e8565b905080612941576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612a07898930614f80565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a5357600080fd5b505afa158015612a67573d6000803e3d6000fd5b505050506040513d6020811015612a7d57600080fd5b810190808051906020019092919050505090506000612aa082848b8b8b8b615180565b91505080612b16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612b4187858d73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b809450505050509695505050505050565b600080600060149054906101000a900460ff16612bd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000612c4f8c613a3d565b9050612c7e33308d8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d2557600080fd5b505af1158015612d39573d6000803e3d6000fd5b505050506040513d6020811015612d4f57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e6b57600080fd5b505af1158015612e7f573d6000803e3d6000fd5b505050506040513d6040811015612e9557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f2357600080fd5b505afa158015612f37573d6000803e3d6000fd5b505050506040513d6020811015612f4d57600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561300757600080fd5b505af115801561301b573d6000803e3d6000fd5b505050506040513d602081101561303157600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156130ea57600080fd5b505af11580156130fe573d6000803e3d6000fd5b505050506040513d602081101561311457600080fd5b810190808051906020019092919050505050600061324c8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561317157600080fd5b505afa158015613185573d6000803e3d6000fd5b505050506040513d602081101561319b57600080fd5b810190808051906020019092919050505061323e8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131f457600080fd5b505afa158015613208573d6000803e3d6000fd5b505050506040513d602081101561321e57600080fd5b810190808051906020019092919050505088614df090919063ffffffff16565b614e7690919063ffffffff16565b905061327b3330838573ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858d6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561333857600080fd5b505af115801561334c573d6000803e3d6000fd5b505050506040513d606081101561336257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506133b58a838873ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b8282975097505050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600080851161345e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156134a657600080fd5b505afa1580156134ba573d6000803e3d6000fd5b505050506040513d60208110156134d057600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061350757fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b6135c387878373ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561364457600080fd5b505af1158015613658573d6000803e3d6000fd5b505050506040513d604081101561366e57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561372c578082015181840152602081019050613711565b50505050905001935050505060006040518083038186803b15801561375057600080fd5b505afa158015613764573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561378e57600080fd5b81019080805160405193929190846401000000008211156137ae57600080fd5b838201915060208201858111156137c457600080fd5b82518660208202830111640100000000821117156137e157600080fd5b8083526020830192505050908051906020019060200280838360005b838110156138185780820151818401526020810190506137fd565b5050505090500160405250505090506000808b905060008360018151811061383c57fe5b602002602001015190506138a6816138986103e861388a613867600388614df090919063ffffffff16565b61387c6103e889614df090919063ffffffff16565b61550a90919063ffffffff16565b614e7690919063ffffffff16565b61559290919063ffffffff16565b925050506139558d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156138f557600080fd5b505afa158015613909573d6000803e3d6000fd5b505050506040513d602081101561391f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b613982888e838673ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050613a0685838b73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613b3557600080fd5b505afa158015613b49573d6000803e3d6000fd5b505050506040513d6020811015613b5f57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613c15576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b60008060149054906101000a900460ff16613ca1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d0357600080fd5b505afa158015613d17573d6000803e3d6000fd5b505050506040513d6020811015613d2d57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613d8857600080fd5b505afa158015613d9c573d6000803e3d6000fd5b505050506040513d6020811015613db257600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613e9a57600080fd5b505afa158015613eae573d6000803e3d6000fd5b505050506040513d6020811015613ec457600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015613f095781602001602082028038833980820191505090505b5090508381600081518110613f1a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110613f6257fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615a4060509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156140b657808201518184015260208101905061409b565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561418457600080fd5b505afa158015614198573d6000803e3d6000fd5b505050506040513d60208110156141ae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146141e15760006141e3565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561424457600080fd5b505afa158015614258573d6000803e3d6000fd5b505050506040513d602081101561426e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146142a0578b6142a3565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614352578082015181840152602081019050614337565b50505050905090810190601f16801561437f5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156143a157600080fd5b505af11580156143b5573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff1661446b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061450033308a8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b60008061450e8c8c30614f80565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145b957600080fd5b505af11580156145cd573d6000803e3d6000fd5b505050506040513d60208110156145e357600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561469c57600080fd5b505af11580156146b0573d6000803e3d6000fd5b505050506040513d60208110156146c657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561480957600080fd5b505af115801561481d573d6000803e3d6000fd5b505050506040513d606081101561483357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061490633828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148a657600080fd5b505afa1580156148ba573d6000803e3d6000fd5b505050506040513d60208110156148d057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060006149448a8a30614f80565b9150915060006149998b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615180565b91505080614a0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614aba86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a5a57600080fd5b505afa158015614a6e573d6000803e3d6000fd5b505050506040513d6020811015614a8457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b809350505050979650505050505050565b614ad3614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614b94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614c1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806159f96026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b614dea846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506155dc565b50505050565b600080831415614e035760009050614e70565b6000828402905082848281614e1457fe5b0414614e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615a1f6021913960400191505060405180910390fd5b809150505b92915050565b6000614eb883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615827565b905092915050565b614f738363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506155dc565b505050565b600033905090565b60008060008411614ff9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6150a63386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561504557600080fd5b505afa158015615059573d6000803e3d6000fd5b505050506040513d602081101561506f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561512757600080fd5b505af115801561513b573d6000803e3d6000fd5b505050506040513d604081101561515157600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106151a857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615239576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561530757600080fd5b505af115801561531b573d6000803e3d6000fd5b505050506040513d602081101561533157600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156153fa5780820151818401526020810190506153df565b505050509050019650505050505050600060405180830381600087803b15801561542357600080fd5b505af1158015615437573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561546157600080fd5b810190808051604051939291908464010000000082111561548157600080fd5b8382019150602082018581111561549757600080fd5b82518660208202830111640100000000821117156154b457600080fd5b8083526020830192505050908051906020019060200280838360005b838110156154eb5780820151818401526020810190506154d0565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006155d483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506158ed565b905092915050565b6155fb8273ffffffffffffffffffffffffffffffffffffffff166159ad565b61566d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106156bc5780518252602082019150602081019050602083039250615699565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461571e576040519150601f19603f3d011682016040523d82523d6000602084013e615723565b606091505b50915091508161579b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615821578080602001905160208110156157ba57600080fd5b8101908080519060200190929190505050615820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615a90602a913960400191505060405180910390fd5b5b50505050565b600080831182906158d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561589857808201518184015260208101905061587d565b50505050905090810190601f1680156158c55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816158df57fe5b049050809150509392505050565b600083831115829061599a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561595f578082015181840152602081019050615944565b50505050905090810190601f16801561598c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156159ef57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220fd448419da74620df20ecfe4ebe82249957f722bb79052b96b56a86923103a8c64736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cd0455241161007c578063cd04552414610b3b578063d1dabfcb14610bab578063d9b3612514610c59578063f2fde38b14610d48578063f887ea4014610d8c578063ffa1ad7414610dd65761014d565b80638da5cb5b1461070a57806395f0ae7614610754578063a911afd714610882578063b17d057014610929578063c45a015514610a6d578063c762405014610ab75761014d565b806351b8498f1161011557806351b8498f146103fe5780635bc5dbe1146104c05780636af255d71461056e578063715018a6146105f25780637b103999146105fc5780638ac32329146106465761014d565b806307f249061461015257806310d1e85c146101f95780631459457a146102a65780631758078b1461036a578063217a4b70146103b4575b600080fd5b6101dc600480360360c081101561016857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dfa565b604051808381526020018281526020019250505060405180910390f35b6102a46004803603608081101561020f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561026057600080fd5b82018360208201111561027257600080fd5b8035906020019184600183028401116401000000008311171561029457600080fd5b90919293919293905050506116c3565b005b610368600480360360a08110156102bc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117f2565b005b610372611e35565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103bc611e5b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61047e600480360360a081101561041457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611e81565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610554600480360360e08110156104d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612064565b604051808215151515815260200191505060405180910390f35b6105b06004803603602081101561058457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105fa6126f6565b005b61060461287e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106f0600480360360e081101561065c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128a4565b604051808215151515815260200191505060405180910390f35b6107126129ce565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360c081101561076a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156107bb57600080fd5b8201836020820111156107cd57600080fd5b803590602001918460208302840111640100000000831117156107ef57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129f7565b604051808215151515815260200191505060405180910390f35b61090c600480360360c081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b52565b604051808381526020018281526020019250505060405180910390f35b610a53600480360360c081101561093f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109b057600080fd5b8201836020820111156109c257600080fd5b803590602001918460208302840111640100000000831117156109e457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506133e7565b604051808215151515815260200191505060405180910390f35b610a75613a17565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610af960048036036020811015610acd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613a3d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b9160048036036060811015610b5157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613c1e565b604051808215151515815260200191505060405180910390f35b610c3f600480360360e0811015610bc157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506143e8565b604051808215151515815260200191505060405180910390f35b610d2e600480360360c0811015610c6f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610cc057600080fd5b820183602082011115610cd257600080fd5b80359060200191846020830284011164010000000083111715610cf457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614934565b604051808215151515815260200191505060405180910390f35b610d8a60048036036020811015610d5e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614acb565b005b610d94614cd8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dde614cfe565b604051808260ff1660ff16815260200191505060405180910390f35b600080600060149054906101000a900460ff16610e7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0857600080fd5b505afa158015610f1c573d6000803e3d6000fd5b505050506040513d6020811015610f3257600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000610f7783613a3d565b9050610fa633308d8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561104d57600080fd5b505af1158015611061573d6000803e3d6000fd5b505050506040513d602081101561107757600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde85878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561119357600080fd5b505af11580156111a7573d6000803e3d6000fd5b505050506040513d60408110156111bd57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156112af57600080fd5b505af11580156112c3573d6000803e3d6000fd5b505050506040513d60208110156112d957600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561139257600080fd5b505af11580156113a6573d6000803e3d6000fd5b505050506040513d60208110156113bc57600080fd5b8101908080519060200190929190505050506000611528670de0b6b3a764000061151a8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d602081101561144e57600080fd5b810190808051906020019092919050505061150c670de0b6b3a76400006114fe8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b457600080fd5b505afa1580156114c8573d6000803e3d6000fd5b505050506040513d60208110156114de57600080fd5b81019080805190602001909291905050508c614df090919063ffffffff16565b614df090919063ffffffff16565b614e7690919063ffffffff16565b614e7690919063ffffffff16565b90506115573330838573ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838f6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561161257600080fd5b505af1158015611626573d6000803e3d6000fd5b505050506040513d606081101561163c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050505061169289828773ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b81819650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611732576040519150601f19603f3d011682016040523d82523d6000602084013e611737565b606091505b50915091508180156117775750600081511480611776575080806020019051602081101561176457600080fd5b81019080805190602001909291905050505b5b6117e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6117fa614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461197f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611f6f57600080fd5b505afa158015611f83573d6000803e3d6000fd5b505050506040513d6020811015611f9957600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561204f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61205881613a3d565b91505095945050505050565b60008060149054906101000a900460ff166120e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061217c33308a8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b60008061218a8c8c30614f80565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121d657600080fd5b505afa1580156121ea573d6000803e3d6000fd5b505050506040513d602081101561220057600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156122ba57600080fd5b505af11580156122ce573d6000803e3d6000fd5b505050506040513d60208110156122e457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561239d57600080fd5b505af11580156123b1573d6000803e3d6000fd5b505050506040513d60208110156123c757600080fd5b8101908080519060200190929190505050508473ffffffffffffffffffffffffffffffffffffffff1663e8e3370082600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858f8f8f8f8f6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561250a57600080fd5b505af115801561251e573d6000803e3d6000fd5b505050506040513d606081101561253457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061258733848f73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b6001955050505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156126b057600080fd5b505af11580156126c4573d6000803e3d6000fd5b505050506040513d60208110156126da57600080fd5b8101908080519060200190929190505050905080915050919050565b6126fe614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128b78a8989898989612b52565b9150915060006128cc8a84848b8b8b8b6143e8565b905080612941576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612a07898930614f80565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a5357600080fd5b505afa158015612a67573d6000803e3d6000fd5b505050506040513d6020811015612a7d57600080fd5b810190808051906020019092919050505090506000612aa082848b8b8b8b615180565b91505080612b16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612b4187858d73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b809450505050509695505050505050565b600080600060149054906101000a900460ff16612bd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000612c4f8c613a3d565b9050612c7e33308d8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d2557600080fd5b505af1158015612d39573d6000803e3d6000fd5b505050506040513d6020811015612d4f57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e6b57600080fd5b505af1158015612e7f573d6000803e3d6000fd5b505050506040513d6040811015612e9557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f2357600080fd5b505afa158015612f37573d6000803e3d6000fd5b505050506040513d6020811015612f4d57600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561300757600080fd5b505af115801561301b573d6000803e3d6000fd5b505050506040513d602081101561303157600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156130ea57600080fd5b505af11580156130fe573d6000803e3d6000fd5b505050506040513d602081101561311457600080fd5b810190808051906020019092919050505050600061324c8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561317157600080fd5b505afa158015613185573d6000803e3d6000fd5b505050506040513d602081101561319b57600080fd5b810190808051906020019092919050505061323e8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131f457600080fd5b505afa158015613208573d6000803e3d6000fd5b505050506040513d602081101561321e57600080fd5b810190808051906020019092919050505088614df090919063ffffffff16565b614e7690919063ffffffff16565b905061327b3330838573ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858d6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561333857600080fd5b505af115801561334c573d6000803e3d6000fd5b505050506040513d606081101561336257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506133b58a838873ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b8282975097505050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600080851161345e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156134a657600080fd5b505afa1580156134ba573d6000803e3d6000fd5b505050506040513d60208110156134d057600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061350757fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b6135c387878373ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561364457600080fd5b505af1158015613658573d6000803e3d6000fd5b505050506040513d604081101561366e57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561372c578082015181840152602081019050613711565b50505050905001935050505060006040518083038186803b15801561375057600080fd5b505afa158015613764573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561378e57600080fd5b81019080805160405193929190846401000000008211156137ae57600080fd5b838201915060208201858111156137c457600080fd5b82518660208202830111640100000000821117156137e157600080fd5b8083526020830192505050908051906020019060200280838360005b838110156138185780820151818401526020810190506137fd565b5050505090500160405250505090506000808b905060008360018151811061383c57fe5b602002602001015190506138a6816138986103e861388a613867600388614df090919063ffffffff16565b61387c6103e889614df090919063ffffffff16565b61550a90919063ffffffff16565b614e7690919063ffffffff16565b61559290919063ffffffff16565b925050506139558d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156138f557600080fd5b505afa158015613909573d6000803e3d6000fd5b505050506040513d602081101561391f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b613982888e838673ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050613a0685838b73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613b3557600080fd5b505afa158015613b49573d6000803e3d6000fd5b505050506040513d6020811015613b5f57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613c15576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b60008060149054906101000a900460ff16613ca1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d0357600080fd5b505afa158015613d17573d6000803e3d6000fd5b505050506040513d6020811015613d2d57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613d8857600080fd5b505afa158015613d9c573d6000803e3d6000fd5b505050506040513d6020811015613db257600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613e9a57600080fd5b505afa158015613eae573d6000803e3d6000fd5b505050506040513d6020811015613ec457600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015613f095781602001602082028038833980820191505090505b5090508381600081518110613f1a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110613f6257fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615a4060509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156140b657808201518184015260208101905061409b565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561418457600080fd5b505afa158015614198573d6000803e3d6000fd5b505050506040513d60208110156141ae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146141e15760006141e3565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561424457600080fd5b505afa158015614258573d6000803e3d6000fd5b505050506040513d602081101561426e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146142a0578b6142a3565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614352578082015181840152602081019050614337565b50505050905090810190601f16801561437f5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156143a157600080fd5b505af11580156143b5573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff1661446b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061450033308a8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b60008061450e8c8c30614f80565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145b957600080fd5b505af11580156145cd573d6000803e3d6000fd5b505050506040513d60208110156145e357600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561469c57600080fd5b505af11580156146b0573d6000803e3d6000fd5b505050506040513d60208110156146c657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561480957600080fd5b505af115801561481d573d6000803e3d6000fd5b505050506040513d606081101561483357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061490633828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148a657600080fd5b505afa1580156148ba573d6000803e3d6000fd5b505050506040513d60208110156148d057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060006149448a8a30614f80565b9150915060006149998b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615180565b91505080614a0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614aba86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a5a57600080fd5b505afa158015614a6e573d6000803e3d6000fd5b505050506040513d6020811015614a8457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b809350505050979650505050505050565b614ad3614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614b94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614c1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806159f96026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b614dea846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506155dc565b50505050565b600080831415614e035760009050614e70565b6000828402905082848281614e1457fe5b0414614e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615a1f6021913960400191505060405180910390fd5b809150505b92915050565b6000614eb883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615827565b905092915050565b614f738363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506155dc565b505050565b600033905090565b60008060008411614ff9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6150a63386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561504557600080fd5b505afa158015615059573d6000803e3d6000fd5b505050506040513d602081101561506f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561512757600080fd5b505af115801561513b573d6000803e3d6000fd5b505050506040513d604081101561515157600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106151a857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615239576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561530757600080fd5b505af115801561531b573d6000803e3d6000fd5b505050506040513d602081101561533157600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156153fa5780820151818401526020810190506153df565b505050509050019650505050505050600060405180830381600087803b15801561542357600080fd5b505af1158015615437573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561546157600080fd5b810190808051604051939291908464010000000082111561548157600080fd5b8382019150602082018581111561549757600080fd5b82518660208202830111640100000000821117156154b457600080fd5b8083526020830192505050908051906020019060200280838360005b838110156154eb5780820151818401526020810190506154d0565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006155d483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506158ed565b905092915050565b6155fb8273ffffffffffffffffffffffffffffffffffffffff166159ad565b61566d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106156bc5780518252602082019150602081019050602083039250615699565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461571e576040519150601f19603f3d011682016040523d82523d6000602084013e615723565b606091505b50915091508161579b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615821578080602001905160208110156157ba57600080fd5b8101908080519060200190929190505050615820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615a90602a913960400191505060405180910390fd5b5b50505050565b600080831182906158d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561589857808201518184015260208101905061587d565b50505050905090810190601f1680156158c55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816158df57fe5b049050809150509392505050565b600083831115829061599a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561595f578082015181840152602081019050615944565b50505050905090810190601f16801561598c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156159ef57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220fd448419da74620df20ecfe4ebe82249957f722bb79052b96b56a86923103a8c64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index 995bbb05..02a27852 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -43,7 +43,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { IRegistry public registry; address public quoteToken; // Designated stablecoin for Primitive. - address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint8 public constant VERSION = 2; event Initialized(address indexed from, address indexed quoteToken); @@ -52,12 +51,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { uint256 quantity, uint256 premium ); - event RolledOptions( - address indexed from, - address indexed optionFrom, - address indexed optionTo, - uint256 quantity - ); event RolledOptionLiquidity( address indexed from, address indexed optionMarketFrom, @@ -322,57 +315,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { return true; } - /** - * @dev Closes an option position and opens a new one using the freed underlyingTokens. - * @notice Pulls option and redeem tokens from msg.sender, then sends minted option + redeems to receiver. - * rollFromOption -> underlyingToken -> rollToOption. - * @param rollFromOption The optionToken to close. - * @param rollToOption The optionToken to mint. - * @param rollQuantity The quantity of underlyingTokens to receive from closed options then use to mint new options. - * @param receiver The address that receives newly minted option and redeem tokens. - */ - function rollOption( - address rollFromOption, - address rollToOption, - uint256 rollQuantity, - address receiver - ) external returns (bool) { - // Close the rollFromOption to receive underlyingTokens. - // Sends the underlyingTokens to this contract. - (, , uint256 outUnderlyings) = TraderLib.safeClose( - IOption(rollFromOption), - rollQuantity, - address(this) - ); - - // Store in memory for gas savings. - ITrader trader_ = trader; - - // Approve underlyingTokens to be sent to the Primitive Trader contract. - IERC20(IOption(rollFromOption).getUnderlyingTokenAddress()).approve( - address(trader_), - uint256(-1) - ); - - // Mint rollToOptions using the underlyingTokens received from closing the rollFromOptions. - // Pulls underlyingTokens from this contract and sends them to the rollToOption contract. - // Sends minted long + short tokens to the "receiver" address. - (uint256 outputOptions, ) = trader_.safeMint( - IOption(rollToOption), - outUnderlyings, - receiver - ); - - // An event is emitted because a position was atomically rolled without additional capital. - emit RolledOptions( - msg.sender, - rollFromOption, - rollToOption, - outputOptions - ); - return true; - } - // ==== Liquidity Functions ==== /** From 1008020a06dc273e3315dc8211f5c133b1bbf3f7 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Wed, 28 Oct 2020 20:39:03 -0700 Subject: [PATCH 08/20] Cleans up test_uni_flash. --- test/test_uni_flash.js | 46 ++---------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/test/test_uni_flash.js b/test/test_uni_flash.js index 049b020b..237c3918 100644 --- a/test/test_uni_flash.js +++ b/test/test_uni_flash.js @@ -2,23 +2,15 @@ const { assert, expect } = require("chai"); const chai = require("chai"); const { solidity } = require("ethereum-waffle"); chai.use(solidity); -const utils = require("./lib/utils"); const setup = require("./lib/setup"); const constants = require("./lib/constants"); const { parseEther, formatEther } = require("ethers/lib/utils"); -const { assertBNEqual } = utils; -const { - ONE_ETHER, - TEN_ETHER, - HUNDRED_ETHER, - THOUSAND_ETHER, - MILLION_ETHER, -} = constants.VALUES; +const { ONE_ETHER, MILLION_ETHER } = constants.VALUES; const UniswapV2Pair = require("@uniswap/v2-core/build/UniswapV2Pair.json"); describe("UniswapConnector Flash", () => { // ACCOUNTS - let Admin, User, Alice, Bob; + let Admin, User, Alice; let trader, weth, dai, optionToken, redeemToken, quoteToken; let underlyingToken, strikeToken; @@ -186,40 +178,6 @@ describe("UniswapConnector Flash", () => { .approve(uniswapConnector.address, MILLION_ETHER); }); - /* describe("flashMintShortOptionsThenSwap", () => { - it("sends to mimic a flash loan", async () => { - let pairAddress = await uniswapFactory.getPair( - quoteToken.address, - underlyingToken.address - ); - let flashLoanQuantity = ONE_ETHER; - let amountOutMin = "0"; - let path = [ - redeemToken.address, - dai.address, - underlyingToken.address, - ]; - let to = Alice; - // send in underlyingTokens as if was flash swap - await underlyingToken.transfer( - uniswapConnector.address, - flashLoanQuantity - ); - await expect( - uniswapConnector.flashMintShortOptionsThenSwap( - pairAddress, - optionToken.address, - flashLoanQuantity, - amountOutMin, - path, - to - ) - ) - .to.emit(uniswapConnector, "FlashedShortOption") - .withArgs(Alice, flashLoanQuantity); - }); - }); */ - describe("openFlashLong", () => { it("gets a flash loan for underlyings, mints options, swaps redeem to underlyings to pay back", async () => { // Create a Uniswap V2 Pair and add liquidity. From 1305446d6242491acacd55b1942a35d371616405 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 09:28:40 -0700 Subject: [PATCH 09/20] Working on more general functions rather than hardcoding quoteToken. --- artifacts/EthTrader.json | 373 -------------- artifacts/IEthTrader.json | 208 -------- artifacts/UniswapConnector.json | 49 +- artifacts/console.json | 8 - .../connectors/Uniswap/UniswapConnector.sol | 124 ++--- test/test_uni_connector.js | 461 ++++++++++++++---- 6 files changed, 468 insertions(+), 755 deletions(-) delete mode 100644 artifacts/EthTrader.json delete mode 100644 artifacts/IEthTrader.json delete mode 100644 artifacts/console.json diff --git a/artifacts/EthTrader.json b/artifacts/EthTrader.json deleted file mode 100644 index 37433973..00000000 --- a/artifacts/EthTrader.json +++ /dev/null @@ -1,373 +0,0 @@ -{ - "contractName": "EthTrader", - "abi": [ - { - "inputs": [ - { - "internalType": "address payable", - "name": "_weth", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "option", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "inOptions", - "type": "uint256" - } - ], - "name": "EthTraderClose", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "option", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outUnderlyings", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "inStrikes", - "type": "uint256" - } - ], - "name": "EthTraderExercise", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "option", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outputOptions", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "outputRedeems", - "type": "uint256" - } - ], - "name": "EthTraderMint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "option", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "inRedeems", - "type": "uint256" - } - ], - "name": "EthTraderRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "option", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "inOptions", - "type": "uint256" - } - ], - "name": "EthTraderUnwind", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "closeQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeCloseForETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "exerciseQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeExerciseForETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeExerciseWithETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeMintWithETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeRedeemForETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "unwindQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeUnwindForETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "weth", - "outputs": [ - { - "internalType": "contract IWETH", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5060405161388d38038061388d8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506137de806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612613565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506129db565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612f6b90919063ffffffff16565b612ff190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b613128565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fabfb4df7c88d988b205cbc629712e5517b647ad5d6b85a524d08d3ae69d6c4d5846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612f6b90919063ffffffff16565b612ff190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b613128565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff42b12bc6ce2f9477c86f93160ca758ea263c9476f27678c23a62bcde9f62706846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612f6b90919063ffffffff16565b612ff190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a613128565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3189e9f239c952a1c3a172a3897ac53e3e251718ae277e746cd5db22e60aa7998b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b8101908080519060200190929190505050905060008673ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561207657600080fd5b505afa15801561208a573d6000803e3d6000fd5b505050506040513d60208110156120a057600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006122a18973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c557600080fd5b505afa1580156121d9573d6000803e3d6000fd5b505050506040513d60208110156121ef57600080fd5b81019080805190602001909291905050506122938b73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561224957600080fd5b505afa15801561225d573d6000803e3d6000fd5b505050506040513d602081101561227357600080fd5b810190808051906020019092919050505085612f6b90919063ffffffff16565b612ff190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561232157600080fd5b505afa158015612335573d6000803e3d6000fd5b505050506040513d602081101561234b57600080fd5b810190808051906020019092919050505010156123d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6123d989613296565b612406338a838c73ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b8873ffffffffffffffffffffffffffffffffffffffff1663787eae30898360006040519080825280601f01601f1916602001820160405280156124585781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156124e05780820151818401526020810190506124c5565b50505050905090810190601f16801561250d5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b15801561252d57600080fd5b505af1158015612541573d6000803e3d6000fd5b505050506040513d604081101561255757600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3189e9f239c952a1c3a172a3897ac53e3e251718ae277e746cd5db22e60aa7998385604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612697576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111612728576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561277057600080fd5b505afa158015612784573d6000803e3d6000fd5b505050506040513d602081101561279a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612870576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b61287986613296565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156128fa57600080fd5b505af115801561290e573d6000803e3d6000fd5b505050506040513d604081101561292457600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb81b27fd6d5e3aa8c9641fcf7f868a5400cb46d029d458ab7c2d49c0e81003ff8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16612a5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612aef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3757600080fd5b505afa158015612b4b573d6000803e3d6000fd5b505050506040513d6020811015612b6157600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612c37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c7f57600080fd5b505afa158015612c93573d6000803e3d6000fd5b505050506040513d6020811015612ca957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d3a57600080fd5b505afa158015612d4e573d6000803e3d6000fd5b505050506040513d6020811015612d6457600080fd5b81019080805190602001909291905050501015612de9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612e163388888473ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e9757600080fd5b505af1158015612eab573d6000803e3d6000fd5b505050506040513d6020811015612ec157600080fd5b81019080805190602001909291905050509050612ede8688613128565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd6ab5246bbdff765abab586ddb9f135a7a0199749e59cc429ef0c4cccfea2366836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612f7e5760009050612feb565b6000828402905082848281612f8f57fe5b0414612fe6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061375e6021913960400191505060405180910390fd5b809150505b92915050565b600061303383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613401565b905092915050565b613122846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506134c7565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561319d57600080fd5b505af11580156131b1573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613215576040519150601f19603f3d011682016040523d82523d6000602084013e61321a565b606091505b5050905080613291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561330057600080fd5b505af1158015613314573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156133c257600080fd5b505af11580156133d6573d6000803e3d6000fd5b505050506040513d60208110156133ec57600080fd5b81019080805190602001909291905050505050565b600080831182906134ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613472578082015181840152602081019050613457565b50505050905090810190601f16801561349f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816134b957fe5b049050809150509392505050565b6134e68273ffffffffffffffffffffffffffffffffffffffff16613712565b613558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106135a75780518252602082019150602081019050602083039250613584565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613609576040519150601f19603f3d011682016040523d82523d6000602084013e61360e565b606091505b509150915081613686576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561370c578080602001905160208110156136a557600080fd5b810190808051906020019092919050505061370b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061377f602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561375457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220db41dd500b82f9792e873804abe25dcc5040e57b26517eec67ef04abf3dbbc0964736f6c63430006020033", - "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612613565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506129db565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612f6b90919063ffffffff16565b612ff190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b613128565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fabfb4df7c88d988b205cbc629712e5517b647ad5d6b85a524d08d3ae69d6c4d5846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612f6b90919063ffffffff16565b612ff190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b613128565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167ff42b12bc6ce2f9477c86f93160ca758ea263c9476f27678c23a62bcde9f62706846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612f6b90919063ffffffff16565b612ff190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a613128565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3189e9f239c952a1c3a172a3897ac53e3e251718ae277e746cd5db22e60aa7998b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b8101908080519060200190929190505050905060008673ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561207657600080fd5b505afa15801561208a573d6000803e3d6000fd5b505050506040513d60208110156120a057600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006122a18973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c557600080fd5b505afa1580156121d9573d6000803e3d6000fd5b505050506040513d60208110156121ef57600080fd5b81019080805190602001909291905050506122938b73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561224957600080fd5b505afa15801561225d573d6000803e3d6000fd5b505050506040513d602081101561227357600080fd5b810190808051906020019092919050505085612f6b90919063ffffffff16565b612ff190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561232157600080fd5b505afa158015612335573d6000803e3d6000fd5b505050506040513d602081101561234b57600080fd5b810190808051906020019092919050505010156123d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6123d989613296565b612406338a838c73ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b8873ffffffffffffffffffffffffffffffffffffffff1663787eae30898360006040519080825280601f01601f1916602001820160405280156124585781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156124e05780820151818401526020810190506124c5565b50505050905090810190601f16801561250d5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b15801561252d57600080fd5b505af1158015612541573d6000803e3d6000fd5b505050506040513d604081101561255757600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3189e9f239c952a1c3a172a3897ac53e3e251718ae277e746cd5db22e60aa7998385604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612697576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111612728576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561277057600080fd5b505afa158015612784573d6000803e3d6000fd5b505050506040513d602081101561279a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612870576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b61287986613296565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156128fa57600080fd5b505af115801561290e573d6000803e3d6000fd5b505050506040513d604081101561292457600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fb81b27fd6d5e3aa8c9641fcf7f868a5400cb46d029d458ab7c2d49c0e81003ff8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16612a5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612aef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3757600080fd5b505afa158015612b4b573d6000803e3d6000fd5b505050506040513d6020811015612b6157600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612c37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c7f57600080fd5b505afa158015612c93573d6000803e3d6000fd5b505050506040513d6020811015612ca957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d3a57600080fd5b505afa158015612d4e573d6000803e3d6000fd5b505050506040513d6020811015612d6457600080fd5b81019080805190602001909291905050501015612de9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612e163388888473ffffffffffffffffffffffffffffffffffffffff1661303b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e9757600080fd5b505af1158015612eab573d6000803e3d6000fd5b505050506040513d6020811015612ec157600080fd5b81019080805190602001909291905050509050612ede8688613128565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd6ab5246bbdff765abab586ddb9f135a7a0199749e59cc429ef0c4cccfea2366836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612f7e5760009050612feb565b6000828402905082848281612f8f57fe5b0414612fe6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061375e6021913960400191505060405180910390fd5b809150505b92915050565b600061303383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613401565b905092915050565b613122846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506134c7565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561319d57600080fd5b505af11580156131b1573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613215576040519150601f19603f3d011682016040523d82523d6000602084013e61321a565b606091505b5050905080613291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561330057600080fd5b505af1158015613314573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156133c257600080fd5b505af11580156133d6573d6000803e3d6000fd5b505050506040513d60208110156133ec57600080fd5b81019080805190602001909291905050505050565b600080831182906134ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613472578082015181840152602081019050613457565b50505050905090810190601f16801561349f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816134b957fe5b049050809150509392505050565b6134e68273ffffffffffffffffffffffffffffffffffffffff16613712565b613558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106135a75780518252602082019150602081019050602083039250613584565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613609576040519150601f19603f3d011682016040523d82523d6000602084013e61360e565b606091505b509150915081613686576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561370c578080602001905160208110156136a557600080fd5b810190808051906020019092919050505061370b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061377f602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561375457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220db41dd500b82f9792e873804abe25dcc5040e57b26517eec67ef04abf3dbbc0964736f6c63430006020033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/artifacts/IEthTrader.json b/artifacts/IEthTrader.json deleted file mode 100644 index accd9a56..00000000 --- a/artifacts/IEthTrader.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "contractName": "IEthTrader", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "closeQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeCloseForETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "exerciseQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeExerciseForETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeExerciseWithETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeMintWithETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeRedeemForETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOption", - "name": "optionToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "unwindQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "safeUnwindForETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index 5e154de4..fd5f2191 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -120,6 +120,11 @@ "name": "optionAddress", "type": "address" }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, { "internalType": "uint256", "name": "quantityOptions", @@ -127,17 +132,17 @@ }, { "internalType": "uint256", - "name": "quantityQuoteTokens", + "name": "quantityOtherTokens", "type": "uint256" }, { "internalType": "uint256", - "name": "minQuantityOptions", + "name": "minOptionTokens", "type": "uint256" }, { "internalType": "uint256", - "name": "minQuantityQuoteTokens", + "name": "minOtherTokens", "type": "uint256" }, { @@ -169,6 +174,11 @@ "name": "optionAddress", "type": "address" }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, { "internalType": "uint256", "name": "quantityOptions", @@ -176,7 +186,7 @@ }, { "internalType": "uint256", - "name": "quantityQuoteTokens", + "name": "quantityOtherTokens", "type": "uint256" }, { @@ -186,7 +196,7 @@ }, { "internalType": "uint256", - "name": "minQuantityQuoteTokens", + "name": "minOtherTokens", "type": "uint256" }, { @@ -541,6 +551,11 @@ "name": "optionAddress", "type": "address" }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, { "internalType": "uint256", "name": "liquidity", @@ -590,6 +605,11 @@ "name": "optionAddress", "type": "address" }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, { "internalType": "uint256", "name": "liquidity", @@ -646,11 +666,26 @@ "name": "rollFromOption", "type": "address" }, + { + "internalType": "address", + "name": "tokenInFromPair", + "type": "address" + }, { "internalType": "address", "name": "rollToOption", "type": "address" }, + { + "internalType": "address", + "name": "tokenInToPair", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOtherToken", + "type": "uint256" + }, { "internalType": "uint256", "name": "liquidity", @@ -756,8 +791,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615aef80620000fb6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cd0455241161007c578063cd04552414610b3b578063d1dabfcb14610bab578063d9b3612514610c59578063f2fde38b14610d48578063f887ea4014610d8c578063ffa1ad7414610dd65761014d565b80638da5cb5b1461070a57806395f0ae7614610754578063a911afd714610882578063b17d057014610929578063c45a015514610a6d578063c762405014610ab75761014d565b806351b8498f1161011557806351b8498f146103fe5780635bc5dbe1146104c05780636af255d71461056e578063715018a6146105f25780637b103999146105fc5780638ac32329146106465761014d565b806307f249061461015257806310d1e85c146101f95780631459457a146102a65780631758078b1461036a578063217a4b70146103b4575b600080fd5b6101dc600480360360c081101561016857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dfa565b604051808381526020018281526020019250505060405180910390f35b6102a46004803603608081101561020f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561026057600080fd5b82018360208201111561027257600080fd5b8035906020019184600183028401116401000000008311171561029457600080fd5b90919293919293905050506116c3565b005b610368600480360360a08110156102bc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117f2565b005b610372611e35565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103bc611e5b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61047e600480360360a081101561041457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611e81565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610554600480360360e08110156104d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612064565b604051808215151515815260200191505060405180910390f35b6105b06004803603602081101561058457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105fa6126f6565b005b61060461287e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106f0600480360360e081101561065c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128a4565b604051808215151515815260200191505060405180910390f35b6107126129ce565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360c081101561076a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156107bb57600080fd5b8201836020820111156107cd57600080fd5b803590602001918460208302840111640100000000831117156107ef57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129f7565b604051808215151515815260200191505060405180910390f35b61090c600480360360c081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b52565b604051808381526020018281526020019250505060405180910390f35b610a53600480360360c081101561093f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109b057600080fd5b8201836020820111156109c257600080fd5b803590602001918460208302840111640100000000831117156109e457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506133e7565b604051808215151515815260200191505060405180910390f35b610a75613a17565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610af960048036036020811015610acd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613a3d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b9160048036036060811015610b5157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613c1e565b604051808215151515815260200191505060405180910390f35b610c3f600480360360e0811015610bc157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506143e8565b604051808215151515815260200191505060405180910390f35b610d2e600480360360c0811015610c6f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610cc057600080fd5b820183602082011115610cd257600080fd5b80359060200191846020830284011164010000000083111715610cf457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614934565b604051808215151515815260200191505060405180910390f35b610d8a60048036036020811015610d5e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614acb565b005b610d94614cd8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dde614cfe565b604051808260ff1660ff16815260200191505060405180910390f35b600080600060149054906101000a900460ff16610e7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0857600080fd5b505afa158015610f1c573d6000803e3d6000fd5b505050506040513d6020811015610f3257600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000610f7783613a3d565b9050610fa633308d8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561104d57600080fd5b505af1158015611061573d6000803e3d6000fd5b505050506040513d602081101561107757600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde85878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561119357600080fd5b505af11580156111a7573d6000803e3d6000fd5b505050506040513d60408110156111bd57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156112af57600080fd5b505af11580156112c3573d6000803e3d6000fd5b505050506040513d60208110156112d957600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561139257600080fd5b505af11580156113a6573d6000803e3d6000fd5b505050506040513d60208110156113bc57600080fd5b8101908080519060200190929190505050506000611528670de0b6b3a764000061151a8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d602081101561144e57600080fd5b810190808051906020019092919050505061150c670de0b6b3a76400006114fe8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b457600080fd5b505afa1580156114c8573d6000803e3d6000fd5b505050506040513d60208110156114de57600080fd5b81019080805190602001909291905050508c614df090919063ffffffff16565b614df090919063ffffffff16565b614e7690919063ffffffff16565b614e7690919063ffffffff16565b90506115573330838573ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838f6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561161257600080fd5b505af1158015611626573d6000803e3d6000fd5b505050506040513d606081101561163c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050505061169289828773ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b81819650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611732576040519150601f19603f3d011682016040523d82523d6000602084013e611737565b606091505b50915091508180156117775750600081511480611776575080806020019051602081101561176457600080fd5b81019080805190602001909291905050505b5b6117e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6117fa614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461197f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611f6f57600080fd5b505afa158015611f83573d6000803e3d6000fd5b505050506040513d6020811015611f9957600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561204f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61205881613a3d565b91505095945050505050565b60008060149054906101000a900460ff166120e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061217c33308a8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b60008061218a8c8c30614f80565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121d657600080fd5b505afa1580156121ea573d6000803e3d6000fd5b505050506040513d602081101561220057600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156122ba57600080fd5b505af11580156122ce573d6000803e3d6000fd5b505050506040513d60208110156122e457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561239d57600080fd5b505af11580156123b1573d6000803e3d6000fd5b505050506040513d60208110156123c757600080fd5b8101908080519060200190929190505050508473ffffffffffffffffffffffffffffffffffffffff1663e8e3370082600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858f8f8f8f8f6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561250a57600080fd5b505af115801561251e573d6000803e3d6000fd5b505050506040513d606081101561253457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061258733848f73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b6001955050505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156126b057600080fd5b505af11580156126c4573d6000803e3d6000fd5b505050506040513d60208110156126da57600080fd5b8101908080519060200190929190505050905080915050919050565b6126fe614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128b78a8989898989612b52565b9150915060006128cc8a84848b8b8b8b6143e8565b905080612941576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612a07898930614f80565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a5357600080fd5b505afa158015612a67573d6000803e3d6000fd5b505050506040513d6020811015612a7d57600080fd5b810190808051906020019092919050505090506000612aa082848b8b8b8b615180565b91505080612b16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612b4187858d73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b809450505050509695505050505050565b600080600060149054906101000a900460ff16612bd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000612c4f8c613a3d565b9050612c7e33308d8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d2557600080fd5b505af1158015612d39573d6000803e3d6000fd5b505050506040513d6020811015612d4f57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e6b57600080fd5b505af1158015612e7f573d6000803e3d6000fd5b505050506040513d6040811015612e9557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f2357600080fd5b505afa158015612f37573d6000803e3d6000fd5b505050506040513d6020811015612f4d57600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561300757600080fd5b505af115801561301b573d6000803e3d6000fd5b505050506040513d602081101561303157600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156130ea57600080fd5b505af11580156130fe573d6000803e3d6000fd5b505050506040513d602081101561311457600080fd5b810190808051906020019092919050505050600061324c8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561317157600080fd5b505afa158015613185573d6000803e3d6000fd5b505050506040513d602081101561319b57600080fd5b810190808051906020019092919050505061323e8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131f457600080fd5b505afa158015613208573d6000803e3d6000fd5b505050506040513d602081101561321e57600080fd5b810190808051906020019092919050505088614df090919063ffffffff16565b614e7690919063ffffffff16565b905061327b3330838573ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858d6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561333857600080fd5b505af115801561334c573d6000803e3d6000fd5b505050506040513d606081101561336257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506133b58a838873ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b8282975097505050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600080851161345e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156134a657600080fd5b505afa1580156134ba573d6000803e3d6000fd5b505050506040513d60208110156134d057600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061350757fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b6135c387878373ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561364457600080fd5b505af1158015613658573d6000803e3d6000fd5b505050506040513d604081101561366e57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561372c578082015181840152602081019050613711565b50505050905001935050505060006040518083038186803b15801561375057600080fd5b505afa158015613764573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561378e57600080fd5b81019080805160405193929190846401000000008211156137ae57600080fd5b838201915060208201858111156137c457600080fd5b82518660208202830111640100000000821117156137e157600080fd5b8083526020830192505050908051906020019060200280838360005b838110156138185780820151818401526020810190506137fd565b5050505090500160405250505090506000808b905060008360018151811061383c57fe5b602002602001015190506138a6816138986103e861388a613867600388614df090919063ffffffff16565b61387c6103e889614df090919063ffffffff16565b61550a90919063ffffffff16565b614e7690919063ffffffff16565b61559290919063ffffffff16565b925050506139558d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156138f557600080fd5b505afa158015613909573d6000803e3d6000fd5b505050506040513d602081101561391f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b613982888e838673ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050613a0685838b73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613b3557600080fd5b505afa158015613b49573d6000803e3d6000fd5b505050506040513d6020811015613b5f57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613c15576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b60008060149054906101000a900460ff16613ca1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d0357600080fd5b505afa158015613d17573d6000803e3d6000fd5b505050506040513d6020811015613d2d57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613d8857600080fd5b505afa158015613d9c573d6000803e3d6000fd5b505050506040513d6020811015613db257600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613e9a57600080fd5b505afa158015613eae573d6000803e3d6000fd5b505050506040513d6020811015613ec457600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015613f095781602001602082028038833980820191505090505b5090508381600081518110613f1a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110613f6257fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615a4060509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156140b657808201518184015260208101905061409b565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561418457600080fd5b505afa158015614198573d6000803e3d6000fd5b505050506040513d60208110156141ae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146141e15760006141e3565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561424457600080fd5b505afa158015614258573d6000803e3d6000fd5b505050506040513d602081101561426e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146142a0578b6142a3565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614352578082015181840152602081019050614337565b50505050905090810190601f16801561437f5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156143a157600080fd5b505af11580156143b5573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff1661446b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061450033308a8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b60008061450e8c8c30614f80565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145b957600080fd5b505af11580156145cd573d6000803e3d6000fd5b505050506040513d60208110156145e357600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561469c57600080fd5b505af11580156146b0573d6000803e3d6000fd5b505050506040513d60208110156146c657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561480957600080fd5b505af115801561481d573d6000803e3d6000fd5b505050506040513d606081101561483357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061490633828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148a657600080fd5b505afa1580156148ba573d6000803e3d6000fd5b505050506040513d60208110156148d057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060006149448a8a30614f80565b9150915060006149998b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615180565b91505080614a0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614aba86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a5a57600080fd5b505afa158015614a6e573d6000803e3d6000fd5b505050506040513d6020811015614a8457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b809350505050979650505050505050565b614ad3614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614b94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614c1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806159f96026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b614dea846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506155dc565b50505050565b600080831415614e035760009050614e70565b6000828402905082848281614e1457fe5b0414614e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615a1f6021913960400191505060405180910390fd5b809150505b92915050565b6000614eb883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615827565b905092915050565b614f738363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506155dc565b505050565b600033905090565b60008060008411614ff9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6150a63386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561504557600080fd5b505afa158015615059573d6000803e3d6000fd5b505050506040513d602081101561506f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561512757600080fd5b505af115801561513b573d6000803e3d6000fd5b505050506040513d604081101561515157600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106151a857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615239576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561530757600080fd5b505af115801561531b573d6000803e3d6000fd5b505050506040513d602081101561533157600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156153fa5780820151818401526020810190506153df565b505050509050019650505050505050600060405180830381600087803b15801561542357600080fd5b505af1158015615437573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561546157600080fd5b810190808051604051939291908464010000000082111561548157600080fd5b8382019150602082018581111561549757600080fd5b82518660208202830111640100000000821117156154b457600080fd5b8083526020830192505050908051906020019060200280838360005b838110156154eb5780820151818401526020810190506154d0565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006155d483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506158ed565b905092915050565b6155fb8273ffffffffffffffffffffffffffffffffffffffff166159ad565b61566d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106156bc5780518252602082019150602081019050602083039250615699565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461571e576040519150601f19603f3d011682016040523d82523d6000602084013e615723565b606091505b50915091508161579b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615821578080602001905160208110156157ba57600080fd5b8101908080519060200190929190505050615820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615a90602a913960400191505060405180910390fd5b5b50505050565b600080831182906158d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561589857808201518184015260208101905061587d565b50505050905090810190601f1680156158c55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816158df57fe5b049050809150509392505050565b600083831115829061599a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561595f578082015181840152602081019050615944565b50505050905090810190601f16801561598c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156159ef57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220fd448419da74620df20ecfe4ebe82249957f722bb79052b96b56a86923103a8c64736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cd0455241161007c578063cd04552414610b3b578063d1dabfcb14610bab578063d9b3612514610c59578063f2fde38b14610d48578063f887ea4014610d8c578063ffa1ad7414610dd65761014d565b80638da5cb5b1461070a57806395f0ae7614610754578063a911afd714610882578063b17d057014610929578063c45a015514610a6d578063c762405014610ab75761014d565b806351b8498f1161011557806351b8498f146103fe5780635bc5dbe1146104c05780636af255d71461056e578063715018a6146105f25780637b103999146105fc5780638ac32329146106465761014d565b806307f249061461015257806310d1e85c146101f95780631459457a146102a65780631758078b1461036a578063217a4b70146103b4575b600080fd5b6101dc600480360360c081101561016857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dfa565b604051808381526020018281526020019250505060405180910390f35b6102a46004803603608081101561020f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561026057600080fd5b82018360208201111561027257600080fd5b8035906020019184600183028401116401000000008311171561029457600080fd5b90919293919293905050506116c3565b005b610368600480360360a08110156102bc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117f2565b005b610372611e35565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103bc611e5b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61047e600480360360a081101561041457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611e81565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610554600480360360e08110156104d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612064565b604051808215151515815260200191505060405180910390f35b6105b06004803603602081101561058457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105fa6126f6565b005b61060461287e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106f0600480360360e081101561065c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128a4565b604051808215151515815260200191505060405180910390f35b6107126129ce565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610868600480360360c081101561076a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156107bb57600080fd5b8201836020820111156107cd57600080fd5b803590602001918460208302840111640100000000831117156107ef57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129f7565b604051808215151515815260200191505060405180910390f35b61090c600480360360c081101561089857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b52565b604051808381526020018281526020019250505060405180910390f35b610a53600480360360c081101561093f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109b057600080fd5b8201836020820111156109c257600080fd5b803590602001918460208302840111640100000000831117156109e457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506133e7565b604051808215151515815260200191505060405180910390f35b610a75613a17565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610af960048036036020811015610acd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613a3d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b9160048036036060811015610b5157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613c1e565b604051808215151515815260200191505060405180910390f35b610c3f600480360360e0811015610bc157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506143e8565b604051808215151515815260200191505060405180910390f35b610d2e600480360360c0811015610c6f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610cc057600080fd5b820183602082011115610cd257600080fd5b80359060200191846020830284011164010000000083111715610cf457600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614934565b604051808215151515815260200191505060405180910390f35b610d8a60048036036020811015610d5e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614acb565b005b610d94614cd8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610dde614cfe565b604051808260ff1660ff16815260200191505060405180910390f35b600080600060149054906101000a900460ff16610e7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0857600080fd5b505afa158015610f1c573d6000803e3d6000fd5b505050506040513d6020811015610f3257600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000610f7783613a3d565b9050610fa633308d8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561104d57600080fd5b505af1158015611061573d6000803e3d6000fd5b505050506040513d602081101561107757600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde85878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561119357600080fd5b505af11580156111a7573d6000803e3d6000fd5b505050506040513d60408110156111bd57600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156112af57600080fd5b505af11580156112c3573d6000803e3d6000fd5b505050506040513d60208110156112d957600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561139257600080fd5b505af11580156113a6573d6000803e3d6000fd5b505050506040513d60208110156113bc57600080fd5b8101908080519060200190929190505050506000611528670de0b6b3a764000061151a8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d602081101561144e57600080fd5b810190808051906020019092919050505061150c670de0b6b3a76400006114fe8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b457600080fd5b505afa1580156114c8573d6000803e3d6000fd5b505050506040513d60208110156114de57600080fd5b81019080805190602001909291905050508c614df090919063ffffffff16565b614df090919063ffffffff16565b614e7690919063ffffffff16565b614e7690919063ffffffff16565b90506115573330838573ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838f6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561161257600080fd5b505af1158015611626573d6000803e3d6000fd5b505050506040513d606081101561163c57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050505061169289828773ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b81819650965050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611732576040519150601f19603f3d011682016040523d82523d6000602084013e611737565b606091505b50915091508180156117775750600081511480611776575080806020019051602081101561176457600080fd5b81019080805190602001909291905050505b5b6117e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b6117fa614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461197f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611f6f57600080fd5b505afa158015611f83573d6000803e3d6000fd5b505050506040513d6020811015611f9957600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561204f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b61205881613a3d565b91505095945050505050565b60008060149054906101000a900460ff166120e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061217c33308a8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b60008061218a8c8c30614f80565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121d657600080fd5b505afa1580156121ea573d6000803e3d6000fd5b505050506040513d602081101561220057600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156122ba57600080fd5b505af11580156122ce573d6000803e3d6000fd5b505050506040513d60208110156122e457600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561239d57600080fd5b505af11580156123b1573d6000803e3d6000fd5b505050506040513d60208110156123c757600080fd5b8101908080519060200190929190505050508473ffffffffffffffffffffffffffffffffffffffff1663e8e3370082600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858f8f8f8f8f6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561250a57600080fd5b505af115801561251e573d6000803e3d6000fd5b505050506040513d606081101561253457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061258733848f73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b6001955050505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156126b057600080fd5b505af11580156126c4573d6000803e3d6000fd5b505050506040513d60208110156126da57600080fd5b8101908080519060200190929190505050905080915050919050565b6126fe614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006128b78a8989898989612b52565b9150915060006128cc8a84848b8b8b8b6143e8565b905080612941576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248c6040518082815260200191505060405180910390a4809350505050979650505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612a07898930614f80565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a5357600080fd5b505afa158015612a67573d6000803e3d6000fd5b505050506040513d6020811015612a7d57600080fd5b810190808051906020019092919050505090506000612aa082848b8b8b8b615180565b91505080612b16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612b4187858d73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b809450505050509695505050505050565b600080600060149054906101000a900460ff16612bd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000612c4f8c613a3d565b9050612c7e33308d8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d2557600080fd5b505af1158015612d39573d6000803e3d6000fd5b505050506040513d6020811015612d4f57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e878f8f8f308f6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e6b57600080fd5b505af1158015612e7f573d6000803e3d6000fd5b505050506040513d6040811015612e9557600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f2357600080fd5b505afa158015612f37573d6000803e3d6000fd5b505050506040513d6020811015612f4d57600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561300757600080fd5b505af115801561301b573d6000803e3d6000fd5b505050506040513d602081101561303157600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156130ea57600080fd5b505af11580156130fe573d6000803e3d6000fd5b505050506040513d602081101561311457600080fd5b810190808051906020019092919050505050600061324c8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561317157600080fd5b505afa158015613185573d6000803e3d6000fd5b505050506040513d602081101561319b57600080fd5b810190808051906020019092919050505061323e8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131f457600080fd5b505afa158015613208573d6000803e3d6000fd5b505050506040513d602081101561321e57600080fd5b810190808051906020019092919050505088614df090919063ffffffff16565b614e7690919063ffffffff16565b905061327b3330838573ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858d6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561333857600080fd5b505af115801561334c573d6000803e3d6000fd5b505050506040513d606081101561336257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506133b58a838873ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b8282975097505050505050506001600060146101000a81548160ff021916908315150217905550965096945050505050565b600080851161345e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156134a657600080fd5b505afa1580156134ba573d6000803e3d6000fd5b505050506040513d60208110156134d057600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061350757fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614613598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b6135c387878373ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561364457600080fd5b505af1158015613658573d6000803e3d6000fd5b505050506040513d604081101561366e57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561372c578082015181840152602081019050613711565b50505050905001935050505060006040518083038186803b15801561375057600080fd5b505afa158015613764573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561378e57600080fd5b81019080805160405193929190846401000000008211156137ae57600080fd5b838201915060208201858111156137c457600080fd5b82518660208202830111640100000000821117156137e157600080fd5b8083526020830192505050908051906020019060200280838360005b838110156138185780820151818401526020810190506137fd565b5050505090500160405250505090506000808b905060008360018151811061383c57fe5b602002602001015190506138a6816138986103e861388a613867600388614df090919063ffffffff16565b61387c6103e889614df090919063ffffffff16565b61550a90919063ffffffff16565b614e7690919063ffffffff16565b61559290919063ffffffff16565b925050506139558d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156138f557600080fd5b505afa158015613909573d6000803e3d6000fd5b505050506040513d602081101561391f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b613982888e838673ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050613a0685838b73ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613b3557600080fd5b505afa158015613b49573d6000803e3d6000fd5b505050506040513d6020811015613b5f57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613c15576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b60008060149054906101000a900460ff16613ca1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d0357600080fd5b505afa158015613d17573d6000803e3d6000fd5b505050506040513d6020811015613d2d57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613d8857600080fd5b505afa158015613d9c573d6000803e3d6000fd5b505050506040513d6020811015613db257600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613e9a57600080fd5b505afa158015613eae573d6000803e3d6000fd5b505050506040513d6020811015613ec457600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015613f095781602001602082028038833980820191505090505b5090508381600081518110613f1a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110613f6257fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615a4060509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156140b657808201518184015260208101905061409b565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561418457600080fd5b505afa158015614198573d6000803e3d6000fd5b505050506040513d60208110156141ae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146141e15760006141e3565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561424457600080fd5b505afa158015614258573d6000803e3d6000fd5b505050506040513d602081101561426e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146142a0578b6142a3565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614352578082015181840152602081019050614337565b50505050905090810190601f16801561437f5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156143a157600080fd5b505af11580156143b5573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff1661446b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061450033308a8473ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b60008061450e8c8c30614f80565b915091508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156145b957600080fd5b505af11580156145cd573d6000803e3d6000fd5b505050506040513d60208110156145e357600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561469c57600080fd5b505af11580156146b0573d6000803e3d6000fd5b505050506040513d60208110156146c657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e337008d600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561480957600080fd5b505af115801561481d573d6000803e3d6000fd5b505050506040513d606081101561483357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061490633828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148a657600080fd5b505afa1580156148ba573d6000803e3d6000fd5b505050506040513d60208110156148d057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b60019450505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b60008060006149448a8a30614f80565b9150915060006149998b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615180565b91505080614a0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614aba86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a5a57600080fd5b505afa158015614a6e573d6000803e3d6000fd5b505050506040513d6020811015614a8457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614ec09092919063ffffffff16565b809350505050979650505050505050565b614ad3614f78565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614b94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614c1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806159f96026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b614dea846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506155dc565b50505050565b600080831415614e035760009050614e70565b6000828402905082848281614e1457fe5b0414614e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615a1f6021913960400191505060405180910390fd5b809150505b92915050565b6000614eb883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615827565b905092915050565b614f738363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506155dc565b505050565b600033905090565b60008060008411614ff9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6150a63386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561504557600080fd5b505afa158015615059573d6000803e3d6000fd5b505050506040513d602081101561506f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614d03909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561512757600080fd5b505af115801561513b573d6000803e3d6000fd5b505050506040513d604081101561515157600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106151a857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615239576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561530757600080fd5b505af115801561531b573d6000803e3d6000fd5b505050506040513d602081101561533157600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156153fa5780820151818401526020810190506153df565b505050509050019650505050505050600060405180830381600087803b15801561542357600080fd5b505af1158015615437573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561546157600080fd5b810190808051604051939291908464010000000082111561548157600080fd5b8382019150602082018581111561549757600080fd5b82518660208202830111640100000000821117156154b457600080fd5b8083526020830192505050908051906020019060200280838360005b838110156154eb5780820151818401526020810190506154d0565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006155d483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506158ed565b905092915050565b6155fb8273ffffffffffffffffffffffffffffffffffffffff166159ad565b61566d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106156bc5780518252602082019150602081019050602083039250615699565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461571e576040519150601f19603f3d011682016040523d82523d6000602084013e615723565b606091505b50915091508161579b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615821578080602001905160208110156157ba57600080fd5b8101908080519060200190929190505050615820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615a90602a913960400191505060405180910390fd5b5b50505050565b600080831182906158d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561589857808201518184015260208101905061587d565b50505050905090810190601f1680156158c55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816158df57fe5b049050809150509392505050565b600083831115829061599a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561595f578082015181840152602081019050615944565b50505050905090810190601f16801561598c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156159ef57506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220fd448419da74620df20ecfe4ebe82249957f722bb79052b96b56a86923103a8c64736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615cf080620000fb6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cd0455241161007c578063cd04552414610be7578063d580c62214610c57578063d9b3612514610d26578063f2fde38b14610e15578063f887ea4014610e59578063ffa1ad7414610ea35761014d565b80638da5cb5b1461079657806395f0ae76146107e0578063b17d05701461090e578063c45a015514610a52578063c762405014610a9c578063cc84fde714610b205761014d565b806351b8498f1161011557806351b8498f1461042657806366787256146104e857806369d12e14146105f75780636af255d7146106be578063715018a6146107425780637b1039991461074c5761014d565b806301c6a4501461015257806310d1e85c146102215780631459457a146102ce5780631758078b14610392578063217a4b70146103dc575b600080fd5b610207600480360361010081101561016957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ec7565b604051808215151515815260200191505060405180910390f35b6102cc6004803603608081101561023757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561028857600080fd5b82018360208201111561029a57600080fd5b803590602001918460018302840111640100000000831117156102bc57600080fd5b90919293919293905050506113d3565b005b610390600480360360a08110156102e457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611502565b005b61039a611b45565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e4611b6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104a6600480360360a081101561043c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611b91565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105dd60048036036101408110156104ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d74565b604051808215151515815260200191505060405180910390f35b6106a1600480360360e081101561060d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611e9f565b604051808381526020018281526020019250505060405180910390f35b610700600480360360208110156106d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612846565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61074a612986565b005b610754612b0e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61079e612b34565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108f4600480360360c08110156107f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561084757600080fd5b82018360208201111561085957600080fd5b8035906020019184602083028401116401000000008311171561087b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b5d565b604051808215151515815260200191505060405180910390f35b610a38600480360360c081101561092457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561099557600080fd5b8201836020820111156109a757600080fd5b803590602001918460208302840111640100000000831117156109c957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612cb8565b604051808215151515815260200191505060405180910390f35b610a5a6132e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ade60048036036020811015610ab257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061330e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bca600480360360e0811015610b3657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506134ef565b604051808381526020018281526020019250505060405180910390f35b610c3d60048036036060811015610bfd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613e62565b604051808215151515815260200191505060405180910390f35b610d0c6004803603610100811015610c6e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061462c565b604051808215151515815260200191505060405180910390f35b610dfb600480360360c0811015610d3c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610d8d57600080fd5b820183602082011115610d9f57600080fd5b80359060200191846020830284011164010000000083111715610dc157600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614b35565b604051808215151515815260200191505060405180910390f35b610e5760048036036020811015610e2b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614ccc565b005b610e61614ed9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610eab614eff565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610f4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610fb83330898c73ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b600080610fc68c8b30614ff1565b91509150898214610fd357fe5b8b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561107a57600080fd5b505af115801561108e573d6000803e3d6000fd5b505050506040513d60208110156110a457600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561115d57600080fd5b505af1158015611171573d6000803e3d6000fd5b505050506040513d602081101561118757600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008d8d8d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156112a857600080fd5b505af11580156112bc573d6000803e3d6000fd5b505050506040513d60608110156112d257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506113a533828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561134557600080fd5b505afa158015611359573d6000803e3d6000fd5b505050506040513d602081101561136f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b600193505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611442576040519150601f19603f3d011682016040523d82523d6000602084013e611447565b606091505b50915091508180156114875750600081511480611486575080806020019051602081101561147457600080fd5b81019080805190602001909291905050505b5b6114f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b61150a6152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461168f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461199f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611c7f57600080fd5b505afa158015611c93573d6000803e3d6000fd5b505050506040513d6020811015611ca957600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b611d688161330e565b91505095945050505050565b600080611d868c8c89898989896134ef565b5090506000611d9b8b8b848c8b8b8b8b610ec7565b905080611e10576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248b6040518082815260200191505060405180910390a480925050509a9950505050505050505050565b600080600060149054906101000a900460ff16611f24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f8657600080fd5b505afa158015611f9a573d6000803e3d6000fd5b505050506040513d6020811015611fb057600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905848d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156120bf57600080fd5b505afa1580156120d3573d6000803e3d6000fd5b505050506040513d60208110156120e957600080fd5b8101908080519060200190929190505050905061212933308c8473ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156121d057600080fd5b505af11580156121e4573d6000803e3d6000fd5b505050506040513d60208110156121fa57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde858e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561231657600080fd5b505af115801561232a573d6000803e3d6000fd5b505050506040513d604081101561234057600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561243257600080fd5b505af1158015612446573d6000803e3d6000fd5b505050506040513d602081101561245c57600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561251557600080fd5b505af1158015612529573d6000803e3d6000fd5b505050506040513d602081101561253f57600080fd5b81019080805190602001909291905050505060006126ab670de0b6b3a764000061269d8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125a757600080fd5b505afa1580156125bb573d6000803e3d6000fd5b505050506040513d60208110156125d157600080fd5b810190808051906020019092919050505061268f670de0b6b3a76400006126818873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561263757600080fd5b505afa15801561264b573d6000803e3d6000fd5b505050506040513d602081101561266157600080fd5b81019080805190602001909291905050508c6152b190919063ffffffff16565b6152b190919063ffffffff16565b61533790919063ffffffff16565b61533790919063ffffffff16565b90506126da3330838573ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838e6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561279557600080fd5b505af11580156127a9573d6000803e3d6000fd5b505050506040513d60608110156127bf57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050505061281588828e73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b818195509550505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561294057600080fd5b505af1158015612954573d6000803e3d6000fd5b505050506040513d602081101561296a57600080fd5b8101908080519060200190929190505050905080915050919050565b61298e6152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612b6d898930614ff1565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bb957600080fd5b505afa158015612bcd573d6000803e3d6000fd5b505050506040513d6020811015612be357600080fd5b810190808051906020019092919050505090506000612c0682848b8b8b8b615381565b91505080612c7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612ca787858d73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b809450505050509695505050505050565b6000808511612d2f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612d7757600080fd5b505afa158015612d8b573d6000803e3d6000fd5b505050506040513d6020811015612da157600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1684600181518110612dd857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612e69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b612e9487878373ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1557600080fd5b505af1158015612f29573d6000803e3d6000fd5b505050506040513d6040811015612f3f57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015612ffd578082015181840152602081019050612fe2565b50505050905001935050505060006040518083038186803b15801561302157600080fd5b505afa158015613035573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561305f57600080fd5b810190808051604051939291908464010000000082111561307f57600080fd5b8382019150602082018581111561309557600080fd5b82518660208202830111640100000000821117156130b257600080fd5b8083526020830192505050908051906020019060200280838360005b838110156130e95780820151818401526020810190506130ce565b5050505090500160405250505090506000808b905060008360018151811061310d57fe5b60200260200101519050613177816131696103e861315b6131386003886152b190919063ffffffff16565b61314d6103e8896152b190919063ffffffff16565b61570b90919063ffffffff16565b61533790919063ffffffff16565b61579390919063ffffffff16565b925050506132268d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131c657600080fd5b505afa1580156131da573d6000803e3d6000fd5b505050506040513d60208110156131f057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b613253888e838673ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a25050506132d785838b73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561340657600080fd5b505afa15801561341a573d6000803e3d6000fd5b505050506040513d602081101561343057600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156134e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b600080600060149054906101000a900460ff16613574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a439058d8d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561368f57600080fd5b505afa1580156136a3573d6000803e3d6000fd5b505050506040513d60208110156136b957600080fd5b810190808051906020019092919050505090506136f933308c8473ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b505050506040513d60208110156137ca57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e8e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156138e657600080fd5b505af11580156138fa573d6000803e3d6000fd5b505050506040513d604081101561391057600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561399e57600080fd5b505afa1580156139b2573d6000803e3d6000fd5b505050506040513d60208110156139c857600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a8257600080fd5b505af1158015613a96573d6000803e3d6000fd5b505050506040513d6020811015613aac57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613b6557600080fd5b505af1158015613b79573d6000803e3d6000fd5b505050506040513d6020811015613b8f57600080fd5b8101908080519060200190929190505050506000613cc78773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613bec57600080fd5b505afa158015613c00573d6000803e3d6000fd5b505050506040513d6020811015613c1657600080fd5b8101908080519060200190929190505050613cb98973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6f57600080fd5b505afa158015613c83573d6000803e3d6000fd5b505050506040513d6020811015613c9957600080fd5b8101908080519060200190929190505050886152b190919063ffffffff16565b61533790919063ffffffff16565b9050613cf63330838573ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613db357600080fd5b505af1158015613dc7573d6000803e3d6000fd5b505050506040513d6060811015613ddd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050613e3089838f73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff16613ee5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4757600080fd5b505afa158015613f5b573d6000803e3d6000fd5b505050506040513d6020811015613f7157600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613fcc57600080fd5b505afa158015613fe0573d6000803e3d6000fd5b505050506040513d6020811015613ff657600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156140de57600080fd5b505afa1580156140f2573d6000803e3d6000fd5b505050506040513d602081101561410857600080fd5b810190808051906020019092919050505090506060600260405190808252806020026020018201604052801561414d5781602001602082028038833980820191505090505b509050838160008151811061415e57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082816001815181106141a657fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615c4160509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156142fa5780820151818401526020810190506142df565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156143c857600080fd5b505afa1580156143dc573d6000803e3d6000fd5b505050506040513d60208110156143f257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614614425576000614427565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561448857600080fd5b505afa15801561449c573d6000803e3d6000fd5b505050506040513d60208110156144b257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146144e4578b6144e7565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561459657808201518184015260208101905061457b565b50505050905090810190601f1680156145c35780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156145e557600080fd5b505af11580156145f9573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff166146af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061471d3330898c73ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b60008061472b8c8b30614ff1565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561477757600080fd5b505afa15801561478b573d6000803e3d6000fd5b505050506040513d60208110156147a157600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561485b57600080fd5b505af115801561486f573d6000803e3d6000fd5b505050506040513d602081101561488557600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561493e57600080fd5b505af1158015614952573d6000803e3d6000fd5b505050506040513d602081101561496857600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700828e858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614a8957600080fd5b505af1158015614a9d573d6000803e3d6000fd5b505050506040513d6060811015614ab357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614b0633848f73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b60019450505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b6000806000614b458a8a30614ff1565b915091506000614b9a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615381565b91505080614c10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614cbb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614c5b57600080fd5b505afa158015614c6f573d6000803e3d6000fd5b505050506040513d6020811015614c8557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b809350505050979650505050505050565b614cd46152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614d95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615bfa6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b614feb846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506157dd565b50505050565b6000806000841161506a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6151173386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156150b657600080fd5b505afa1580156150ca573d6000803e3d6000fd5b505050506040513d60208110156150e057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561519857600080fd5b505af11580156151ac573d6000803e3d6000fd5b505050506040513d60408110156151c257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6152a48363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506157dd565b505050565b600033905090565b6000808314156152c45760009050615331565b60008284029050828482816152d557fe5b041461532c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615c206021913960400191505060405180910390fd5b809150505b92915050565b600061537983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615a28565b905092915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106153a957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461543a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561550857600080fd5b505af115801561551c573d6000803e3d6000fd5b505050506040513d602081101561553257600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156155fb5780820151818401526020810190506155e0565b505050509050019650505050505050600060405180830381600087803b15801561562457600080fd5b505af1158015615638573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561566257600080fd5b810190808051604051939291908464010000000082111561568257600080fd5b8382019150602082018581111561569857600080fd5b82518660208202830111640100000000821117156156b557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156156ec5780820151818401526020810190506156d1565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006157d583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615aee565b905092915050565b6157fc8273ffffffffffffffffffffffffffffffffffffffff16615bae565b61586e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106158bd578051825260208201915060208101905060208303925061589a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461591f576040519150601f19603f3d011682016040523d82523d6000602084013e615924565b606091505b50915091508161599c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615a22578080602001905160208110156159bb57600080fd5b8101908080519060200190929190505050615a21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615c91602a913960400191505060405180910390fd5b5b50505050565b60008083118290615ad4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a99578082015181840152602081019050615a7e565b50505050905090810190601f168015615ac65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615ae057fe5b049050809150509392505050565b6000838311158290615b9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615b60578082015181840152602081019050615b45565b50505050905090810190601f168015615b8d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615bf057506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220acfbcfb26c1d5b367ee1b01690a21ffcd15484f6381acf08d067cbaf17d2b5f464736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cd0455241161007c578063cd04552414610be7578063d580c62214610c57578063d9b3612514610d26578063f2fde38b14610e15578063f887ea4014610e59578063ffa1ad7414610ea35761014d565b80638da5cb5b1461079657806395f0ae76146107e0578063b17d05701461090e578063c45a015514610a52578063c762405014610a9c578063cc84fde714610b205761014d565b806351b8498f1161011557806351b8498f1461042657806366787256146104e857806369d12e14146105f75780636af255d7146106be578063715018a6146107425780637b1039991461074c5761014d565b806301c6a4501461015257806310d1e85c146102215780631459457a146102ce5780631758078b14610392578063217a4b70146103dc575b600080fd5b610207600480360361010081101561016957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ec7565b604051808215151515815260200191505060405180910390f35b6102cc6004803603608081101561023757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561028857600080fd5b82018360208201111561029a57600080fd5b803590602001918460018302840111640100000000831117156102bc57600080fd5b90919293919293905050506113d3565b005b610390600480360360a08110156102e457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611502565b005b61039a611b45565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e4611b6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104a6600480360360a081101561043c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611b91565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105dd60048036036101408110156104ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d74565b604051808215151515815260200191505060405180910390f35b6106a1600480360360e081101561060d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611e9f565b604051808381526020018281526020019250505060405180910390f35b610700600480360360208110156106d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612846565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61074a612986565b005b610754612b0e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61079e612b34565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108f4600480360360c08110156107f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561084757600080fd5b82018360208201111561085957600080fd5b8035906020019184602083028401116401000000008311171561087b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b5d565b604051808215151515815260200191505060405180910390f35b610a38600480360360c081101561092457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561099557600080fd5b8201836020820111156109a757600080fd5b803590602001918460208302840111640100000000831117156109c957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612cb8565b604051808215151515815260200191505060405180910390f35b610a5a6132e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ade60048036036020811015610ab257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061330e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bca600480360360e0811015610b3657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506134ef565b604051808381526020018281526020019250505060405180910390f35b610c3d60048036036060811015610bfd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613e62565b604051808215151515815260200191505060405180910390f35b610d0c6004803603610100811015610c6e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061462c565b604051808215151515815260200191505060405180910390f35b610dfb600480360360c0811015610d3c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610d8d57600080fd5b820183602082011115610d9f57600080fd5b80359060200191846020830284011164010000000083111715610dc157600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614b35565b604051808215151515815260200191505060405180910390f35b610e5760048036036020811015610e2b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614ccc565b005b610e61614ed9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610eab614eff565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610f4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610fb83330898c73ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b600080610fc68c8b30614ff1565b91509150898214610fd357fe5b8b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561107a57600080fd5b505af115801561108e573d6000803e3d6000fd5b505050506040513d60208110156110a457600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561115d57600080fd5b505af1158015611171573d6000803e3d6000fd5b505050506040513d602081101561118757600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008d8d8d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156112a857600080fd5b505af11580156112bc573d6000803e3d6000fd5b505050506040513d60608110156112d257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506113a533828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561134557600080fd5b505afa158015611359573d6000803e3d6000fd5b505050506040513d602081101561136f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b600193505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611442576040519150601f19603f3d011682016040523d82523d6000602084013e611447565b606091505b50915091508180156114875750600081511480611486575080806020019051602081101561147457600080fd5b81019080805190602001909291905050505b5b6114f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b61150a6152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461168f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461199f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611c7f57600080fd5b505afa158015611c93573d6000803e3d6000fd5b505050506040513d6020811015611ca957600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b611d688161330e565b91505095945050505050565b600080611d868c8c89898989896134ef565b5090506000611d9b8b8b848c8b8b8b8b610ec7565b905080611e10576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248b6040518082815260200191505060405180910390a480925050509a9950505050505050505050565b600080600060149054906101000a900460ff16611f24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f8657600080fd5b505afa158015611f9a573d6000803e3d6000fd5b505050506040513d6020811015611fb057600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905848d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156120bf57600080fd5b505afa1580156120d3573d6000803e3d6000fd5b505050506040513d60208110156120e957600080fd5b8101908080519060200190929190505050905061212933308c8473ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156121d057600080fd5b505af11580156121e4573d6000803e3d6000fd5b505050506040513d60208110156121fa57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde858e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561231657600080fd5b505af115801561232a573d6000803e3d6000fd5b505050506040513d604081101561234057600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561243257600080fd5b505af1158015612446573d6000803e3d6000fd5b505050506040513d602081101561245c57600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561251557600080fd5b505af1158015612529573d6000803e3d6000fd5b505050506040513d602081101561253f57600080fd5b81019080805190602001909291905050505060006126ab670de0b6b3a764000061269d8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125a757600080fd5b505afa1580156125bb573d6000803e3d6000fd5b505050506040513d60208110156125d157600080fd5b810190808051906020019092919050505061268f670de0b6b3a76400006126818873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561263757600080fd5b505afa15801561264b573d6000803e3d6000fd5b505050506040513d602081101561266157600080fd5b81019080805190602001909291905050508c6152b190919063ffffffff16565b6152b190919063ffffffff16565b61533790919063ffffffff16565b61533790919063ffffffff16565b90506126da3330838573ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838e6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561279557600080fd5b505af11580156127a9573d6000803e3d6000fd5b505050506040513d60608110156127bf57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050505061281588828e73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b818195509550505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561294057600080fd5b505af1158015612954573d6000803e3d6000fd5b505050506040513d602081101561296a57600080fd5b8101908080519060200190929190505050905080915050919050565b61298e6152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612b6d898930614ff1565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bb957600080fd5b505afa158015612bcd573d6000803e3d6000fd5b505050506040513d6020811015612be357600080fd5b810190808051906020019092919050505090506000612c0682848b8b8b8b615381565b91505080612c7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612ca787858d73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b809450505050509695505050505050565b6000808511612d2f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612d7757600080fd5b505afa158015612d8b573d6000803e3d6000fd5b505050506040513d6020811015612da157600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1684600181518110612dd857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612e69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b612e9487878373ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1557600080fd5b505af1158015612f29573d6000803e3d6000fd5b505050506040513d6040811015612f3f57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015612ffd578082015181840152602081019050612fe2565b50505050905001935050505060006040518083038186803b15801561302157600080fd5b505afa158015613035573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561305f57600080fd5b810190808051604051939291908464010000000082111561307f57600080fd5b8382019150602082018581111561309557600080fd5b82518660208202830111640100000000821117156130b257600080fd5b8083526020830192505050908051906020019060200280838360005b838110156130e95780820151818401526020810190506130ce565b5050505090500160405250505090506000808b905060008360018151811061310d57fe5b60200260200101519050613177816131696103e861315b6131386003886152b190919063ffffffff16565b61314d6103e8896152b190919063ffffffff16565b61570b90919063ffffffff16565b61533790919063ffffffff16565b61579390919063ffffffff16565b925050506132268d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131c657600080fd5b505afa1580156131da573d6000803e3d6000fd5b505050506040513d60208110156131f057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b613253888e838673ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a25050506132d785838b73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561340657600080fd5b505afa15801561341a573d6000803e3d6000fd5b505050506040513d602081101561343057600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156134e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b600080600060149054906101000a900460ff16613574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a439058d8d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561368f57600080fd5b505afa1580156136a3573d6000803e3d6000fd5b505050506040513d60208110156136b957600080fd5b810190808051906020019092919050505090506136f933308c8473ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b505050506040513d60208110156137ca57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e8e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156138e657600080fd5b505af11580156138fa573d6000803e3d6000fd5b505050506040513d604081101561391057600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561399e57600080fd5b505afa1580156139b2573d6000803e3d6000fd5b505050506040513d60208110156139c857600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a8257600080fd5b505af1158015613a96573d6000803e3d6000fd5b505050506040513d6020811015613aac57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613b6557600080fd5b505af1158015613b79573d6000803e3d6000fd5b505050506040513d6020811015613b8f57600080fd5b8101908080519060200190929190505050506000613cc78773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613bec57600080fd5b505afa158015613c00573d6000803e3d6000fd5b505050506040513d6020811015613c1657600080fd5b8101908080519060200190929190505050613cb98973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6f57600080fd5b505afa158015613c83573d6000803e3d6000fd5b505050506040513d6020811015613c9957600080fd5b8101908080519060200190929190505050886152b190919063ffffffff16565b61533790919063ffffffff16565b9050613cf63330838573ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613db357600080fd5b505af1158015613dc7573d6000803e3d6000fd5b505050506040513d6060811015613ddd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050613e3089838f73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff16613ee5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4757600080fd5b505afa158015613f5b573d6000803e3d6000fd5b505050506040513d6020811015613f7157600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613fcc57600080fd5b505afa158015613fe0573d6000803e3d6000fd5b505050506040513d6020811015613ff657600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156140de57600080fd5b505afa1580156140f2573d6000803e3d6000fd5b505050506040513d602081101561410857600080fd5b810190808051906020019092919050505090506060600260405190808252806020026020018201604052801561414d5781602001602082028038833980820191505090505b509050838160008151811061415e57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082816001815181106141a657fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615c4160509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156142fa5780820151818401526020810190506142df565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156143c857600080fd5b505afa1580156143dc573d6000803e3d6000fd5b505050506040513d60208110156143f257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614614425576000614427565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561448857600080fd5b505afa15801561449c573d6000803e3d6000fd5b505050506040513d60208110156144b257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146144e4578b6144e7565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561459657808201518184015260208101905061457b565b50505050905090810190601f1680156145c35780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156145e557600080fd5b505af11580156145f9573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff166146af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061471d3330898c73ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b60008061472b8c8b30614ff1565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561477757600080fd5b505afa15801561478b573d6000803e3d6000fd5b505050506040513d60208110156147a157600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561485b57600080fd5b505af115801561486f573d6000803e3d6000fd5b505050506040513d602081101561488557600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561493e57600080fd5b505af1158015614952573d6000803e3d6000fd5b505050506040513d602081101561496857600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700828e858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614a8957600080fd5b505af1158015614a9d573d6000803e3d6000fd5b505050506040513d6060811015614ab357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614b0633848f73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b60019450505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b6000806000614b458a8a30614ff1565b915091506000614b9a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615381565b91505080614c10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614cbb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614c5b57600080fd5b505afa158015614c6f573d6000803e3d6000fd5b505050506040513d6020811015614c8557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b809350505050979650505050505050565b614cd46152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614d95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615bfa6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b614feb846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506157dd565b50505050565b6000806000841161506a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6151173386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156150b657600080fd5b505afa1580156150ca573d6000803e3d6000fd5b505050506040513d60208110156150e057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561519857600080fd5b505af11580156151ac573d6000803e3d6000fd5b505050506040513d60408110156151c257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6152a48363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506157dd565b505050565b600033905090565b6000808314156152c45760009050615331565b60008284029050828482816152d557fe5b041461532c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615c206021913960400191505060405180910390fd5b809150505b92915050565b600061537983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615a28565b905092915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106153a957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461543a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561550857600080fd5b505af115801561551c573d6000803e3d6000fd5b505050506040513d602081101561553257600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156155fb5780820151818401526020810190506155e0565b505050509050019650505050505050600060405180830381600087803b15801561562457600080fd5b505af1158015615638573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561566257600080fd5b810190808051604051939291908464010000000082111561568257600080fd5b8382019150602082018581111561569857600080fd5b82518660208202830111640100000000821117156156b557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156156ec5780820151818401526020810190506156d1565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006157d583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615aee565b905092915050565b6157fc8273ffffffffffffffffffffffffffffffffffffffff16615bae565b61586e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106158bd578051825260208201915060208101905060208303925061589a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461591f576040519150601f19603f3d011682016040523d82523d6000602084013e615924565b606091505b50915091508161599c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615a22578080602001905160208110156159bb57600080fd5b8101908080519060200190929190505050615a21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615c91602a913960400191505060405180910390fd5b5b50505050565b60008083118290615ad4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a99578082015181840152602081019050615a7e565b50505050905090810190601f168015615ac65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615ae057fe5b049050809150509392505050565b6000838311158290615b9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615b60578082015181840152602081019050615b45565b50505050905090810190601f168015615b8d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615bf057506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220acfbcfb26c1d5b367ee1b01690a21ffcd15484f6381acf08d067cbaf17d2b5f464736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/console.json b/artifacts/console.json deleted file mode 100644 index 7144fbf7..00000000 --- a/artifacts/console.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "contractName": "console", - "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ec5679d9f2af30eff638fce547cffb66894bb80904481d8ef2332dc9ac6fb0ac64736f6c63430006020033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ec5679d9f2af30eff638fce547cffb66894bb80904481d8ef2332dc9ac6fb0ac64736f6c63430006020033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index 02a27852..b564d2c6 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -86,7 +86,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // ==== Combo Operations ==== /** - * @dev Mints longOptionTokens using underlyingTokens provided by user, then swaps on Uniswap V2. + * @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. * Combines Primitive "mintOptions" function with Uniswap V2 Router "swapExactTokensForTokens" function. * @notice If the first address in the path is not the optionToken address, the tx will fail. * underlyingToken -> optionToken -> quoteToken. @@ -318,36 +318,37 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // ==== Liquidity Functions ==== /** - * @dev Adds liquidity to an option<>quote token pair by minting longOptionTokens with underlyingTokens. + * @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. * underlyingToken -> optionToken -> UNI-V2. * @param optionAddress The address of the optionToken to mint then provide liquidity for. + * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. * @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens. - * @param quantityQuoteTokens The quantity of quoteTokens to add with longOptionTokens to the Uniswap V2 Pair. - * @param minQuantityOptions The minimum quantity of longOptionTokens expected to provide liquidity with. - * @param minQuantityQuoteTokens The minimum quantity of quoteTokens expected to provide liquidity with. + * @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. + * @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. + * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. * @param to The address that receives UNI-V2 shares. * @param deadline The timestamp to expire a pending transaction. */ function addLongLiquidityWithUnderlying( address optionAddress, + address otherTokenAddress, uint256 quantityOptions, - uint256 quantityQuoteTokens, - uint256 minQuantityOptions, - uint256 minQuantityQuoteTokens, + uint256 quantityOtherTokens, + uint256 minOptionTokens, + uint256 minOtherTokens, address to, uint256 deadline ) public nonReentrant returns (bool) { // Store in memory for gas savings. IUniswapV2Router02 router_ = router; - address quoteToken_ = quoteToken; - // Pull quote tokens from msg.sender to add to Uniswap V2 Pair. + // Pull otherTokens from msg.sender to add to Uniswap V2 Pair. // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - IERC20(quoteToken_).safeTransferFrom( + IERC20(otherTokenAddress).safeTransferFrom( msg.sender, address(this), - quantityQuoteTokens + quantityOtherTokens ); // Pulls underlyingTokens from msg.sender to this contract. @@ -358,19 +359,20 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { quantityOptions, address(this) ); + assert(outputOptions == quantityOptions); // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. IERC20(optionAddress).approve(address(router_), uint256(-1)); - IERC20(quoteToken_).approve(address(router_), uint256(-1)); + IERC20(otherTokenAddress).approve(address(router_), uint256(-1)); // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. router_.addLiquidity( optionAddress, - quoteToken, - outputOptions, - quantityQuoteTokens, - minQuantityOptions, - minQuantityQuoteTokens, + otherTokenAddress, + quantityOptions, + quantityOtherTokens, + minOptionTokens, + minOtherTokens, to, deadline ); @@ -388,32 +390,33 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. * underlyingToken -> redeemToken -> UNI-V2. * @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for. + * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. * @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens. - * @param quantityQuoteTokens The quantity of quoteTokens to add with shortOptionTokens to the Uniswap V2 Pair. + * @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair. * @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with. - * @param minQuantityQuoteTokens The minimum quantity of quoteTokens expected to provide liquidity with. + * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. * @param to The address that receives UNI-V2 shares. * @param deadline The timestamp to expire a pending transaction. */ function addShortLiquidityWithUnderlying( address optionAddress, + address otherTokenAddress, uint256 quantityOptions, - uint256 quantityQuoteTokens, + uint256 quantityOtherTokens, uint256 minShortTokens, - uint256 minQuantityQuoteTokens, + uint256 minOtherTokens, address to, uint256 deadline ) public nonReentrant returns (bool) { // Store in memory for gas savings. IUniswapV2Router02 router_ = router; - address quoteToken_ = quoteToken; // Pull quote tokens from msg.sender to add to Uniswap V2 Pair. // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - IERC20(quoteToken_).safeTransferFrom( + IERC20(otherTokenAddress).safeTransferFrom( msg.sender, address(this), - quantityQuoteTokens + quantityOtherTokens ); // Pulls underlyingTokens from msg.sender to this contract. @@ -424,21 +427,20 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { quantityOptions, address(this) ); - address redeemToken = IOption(optionAddress).redeemToken(); // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. IERC20(redeemToken).approve(address(router_), uint256(-1)); - IERC20(quoteToken_).approve(address(router_), uint256(-1)); + IERC20(otherTokenAddress).approve(address(router_), uint256(-1)); // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. router_.addLiquidity( redeemToken, - quoteToken, + otherTokenAddress, outputRedeems, - quantityQuoteTokens, + quantityOtherTokens, minShortTokens, - minQuantityQuoteTokens, + minOtherTokens, to, deadline ); @@ -450,19 +452,21 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { /** * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. - * @notice Pulls UNI-V2 liquidity shares with option<>quote token, and redeemTokens from msg.sender. + * @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. * Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. - * Sends quoteTokens from the burned UNI-V2 liquidity shares to the "to" address. + * Sends otherTokens from the burned UNI-V2 liquidity shares to the "to" address. * UNI-V2 -> optionToken -> underlyingToken. * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. + * @param otherTokenAddress The address of the other token in the pair with the options. * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. - * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. - * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options. + * @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity. + * @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options. * @param deadline The timestamp to expire a pending transaction. */ function removeLongLiquidityThenCloseOptions( address optionAddress, + address otherTokenAddress, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, @@ -470,23 +474,23 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { uint256 deadline ) public nonReentrant returns (uint256, uint256) { // Store in memory for gas savings. - address quoteToken_ = quoteToken; IOption optionToken = IOption(optionAddress); IUniswapV2Router02 router_ = router; { - // Gets the Uniswap V2 Pair address for optionAddress and quoteToken. + // Gets the Uniswap V2 Pair address for optionAddress and otherToken. // Transfers the LP tokens for the pair to this contract. // Warning: external call to a non-trusted address `msg.sender`. - address pair = getUniswapMarketForToken(optionAddress); + address pair = factory.getPair(optionAddress, otherTokenAddress); IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity); IERC20(pair).approve(address(router_), uint256(-1)); } // Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens). - (uint256 amountOptions, uint256 amountQuote) = router_.removeLiquidity( + (uint256 amountOptions, uint256 amountOtherTokens) = router_ + .removeLiquidity( optionAddress, - quoteToken_, + otherTokenAddress, liquidity, amountAMin, amountBMin, @@ -519,9 +523,9 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // Receives underlyingTokens and sends them to the "to" address. trader_.safeClose(optionToken, amountOptions, to); - // Send the quoteTokens received from burning liquidity shares to the "to" address. - IERC20(quoteToken_).safeTransfer(to, amountQuote); - return (amountOptions, amountQuote); + // Send the otherTokens received from burning liquidity shares to the "to" address. + IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens); + return (amountOptions, amountOtherTokens); } /** @@ -531,6 +535,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { * Sends quoteTokens from the burned UNI-V2 liquidity shares to the "to" address. * UNI-V2 -> optionToken -> underlyingToken. * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. + * @param otherTokenAddress The address of the other token in the option pair. * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. * @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity. * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. @@ -539,6 +544,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { */ function removeShortLiquidityThenCloseOptions( address optionAddress, + address otherTokenAddress, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, @@ -546,24 +552,23 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { uint256 deadline ) public nonReentrant returns (uint256, uint256) { // Store in memory for gas savings. - address quoteToken_ = quoteToken; address redeemToken = IOption(optionAddress).redeemToken(); IUniswapV2Router02 router_ = router; { - // Gets the Uniswap V2 Pair address for shortOptionToken and quoteToken. + // Gets the Uniswap V2 Pair address for shortOptionToken and otherTokens. // Transfers the LP tokens for the pair to this contract. // Warning: external call to a non-trusted address `msg.sender`. - address pair = getUniswapMarketForToken(redeemToken); + address pair = factory.getPair(redeemToken, otherTokenAddress); IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity); IERC20(pair).approve(address(router_), uint256(-1)); } - // Remove liquidity from Uniswap V2 pool to receive pool tokens (shortOptionTokens + quoteTokens). - (uint256 amountShortOptions, uint256 amountQuote) = router_ + // Remove liquidity from Uniswap V2 pool to receive pool tokens (shortOptionTokens + otherTokens). + (uint256 amountShortOptions, uint256 amountOtherTokens) = router_ .removeLiquidity( redeemToken, - quoteToken_, + otherTokenAddress, liquidity, amountAMin, amountBMin, @@ -597,17 +602,20 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { trader_.safeClose(optionToken, requiredLongOptionTokens, to); } - // Send the quoteTokens received from burning liquidity shares to the "to" address. - IERC20(quoteToken_).safeTransfer(to, amountQuote); - return (amountShortOptions, amountQuote); + // Send the otherTokens received from burning liquidity shares to the "to" address. + IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens); + return (amountShortOptions, amountOtherTokens); } /** * @dev Combines "removeLongLiquidityThenCloseOptions" function with "addLongLiquidityWithUnderlying" fuction. - * @notice Rolls UNI-V2 liquidity in an option<>quote pair to a different option<>quote pair. + * @notice Rolls UNI-V2 liquidity in an option<>otherToken pair to a different option<>otherToken pair. * UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2. * @param rollFromOption The optionToken address to close a UNI-V2 position. + * @param tokenInFromPair The address of the otherToken in the pair liquidity is being removed from. * @param rollToOption The optionToken address to open a UNI-V2 position. + * @param tokenInToPair The address of the otherToken in the pair liquidity is being added to. + * @param quantityOtherToken The quantity of the otherToken to add to the new liquidity pair. * @param liquidity The quantity of UNI-V2 shares to roll from the first Uniswap pool. * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. @@ -616,18 +624,19 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { */ function rollOptionLiquidity( address rollFromOption, + address tokenInFromPair, address rollToOption, + address tokenInToPair, + uint256 quantityOtherToken, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (bool) { - ( - uint256 outUnderlyings, - uint256 outQuote - ) = removeLongLiquidityThenCloseOptions( + (uint256 outUnderlyings, ) = removeLongLiquidityThenCloseOptions( rollFromOption, + tokenInFromPair, liquidity, amountAMin, amountBMin, @@ -637,8 +646,9 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { bool success = addLongLiquidityWithUnderlying( rollToOption, + tokenInToPair, outUnderlyings, - outQuote, + quantityOtherToken, amountAMin, amountBMin, to, diff --git a/test/test_uni_connector.js b/test/test_uni_connector.js index 39a2c613..86e2e7e7 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.js @@ -216,7 +216,7 @@ describe("UniswapConnector", () => { }); }); - describe("mintOptionsThenSwapToTokens", () => { + describe("mintLongOptionsThenSwapToTokens", () => { it("should mint Primitive V1 Options then swap them on Uniswap V2", async () => { // Get the pair address. let pair = await uniswapFactory.getPair( @@ -232,7 +232,7 @@ describe("UniswapConnector", () => { let optionBalanceBefore = await optionToken.balanceOf(pair); /* Function ABI - function mintOptionsThenSwapToTokens( + function mintLongOptionsThenSwapToTokens( IOption optionToken, uint256 amountIn, uint256 amountOutMin, @@ -249,7 +249,7 @@ describe("UniswapConnector", () => { let deadline = Math.floor(Date.now() / 1000) + 60 * 20; // Call the function - await uniswapConnector.mintOptionsThenSwapToTokens( + await uniswapConnector.mintLongOptionsThenSwapToTokens( optionTokenAddress, amountIn, amountOutMin, @@ -281,93 +281,69 @@ describe("UniswapConnector", () => { }); }); - describe("rollOption()", () => { - it("should roll option 1 (shorter expiry) to option 2 (longer expiry)", async () => { - // Get the tokens needed - - // Use the current option as a shorter dated expiry option - let rollFromOptionToken = optionToken; - - // Create a new option with a longer dated expiry - let longerExpiry = "1690868900"; - let rollToOptionToken = await setup.newOption( - Admin, - registry, - underlyingToken.address, - strikeToken.address, - base, - quote, - longerExpiry - ); - let rollFromRedeemToken = await setup.newRedeem( - Admin, - rollFromOptionToken + describe("mintShortOptionsThenSwapToTokens", () => { + it("should mint Primitive V1 Options then swap shortTokens on Uniswap V2", async () => { + // Get the pair address. + let pair = await uniswapFactory.getPair( + optionToken.address, + dai.address ); - // Approvals - await rollToOptionToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - await rollFromRedeemToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - - // Function parameters - let rollFromOption = rollFromOptionToken.address; - let rollToOption = rollToOptionToken.address; - let rollQuantity = ONE_ETHER; - let receiver = Alice; - - // Mint some options roll - await trader.safeMint(rollFromOption, rollQuantity, receiver); - - // Get startning balances - let rollFromOptionBalanceBefore = await rollFromOptionToken.balanceOf( - Alice - ); - let rollToOptionBalanceBefore = await rollToOptionToken.balanceOf( + // Get the affected balances before the operation. + let underlyingBalanceBefore = await underlyingToken.balanceOf( Alice ); + let quoteBalanceBefore = await quoteToken.balanceOf(Alice); + let redeemBalanceBefore = await redeemToken.balanceOf(pair); /* Function ABI - function rollOption( - address rollFromOption, - address rollToOption, - uint256 rollQuantity, - address receiver - ) external returns (bool) { + function mintShortOptionsThenSwapToTokens( + IOption optionToken, + uint256 amountIn, + uint256 amountOutMin, + address[] calldata path, + address to, + uint256 deadline + ) external returns (bool) { */ + let optionTokenAddress = optionToken.address; + let amountIn = ONE_ETHER; + let amountOut = amountIn.mul(quote).div(base); + let amountOutMin = 0; + let path = [redeemToken.address, quoteToken.address]; // path[0] MUST be the optionToken address. + let to = Alice; + let deadline = Math.floor(Date.now() / 1000) + 60 * 20; // Call the function - await expect( - uniswapConnector.rollOption( - rollFromOption, - rollToOption, - rollQuantity, - receiver - ) - ) - .to.emit(uniswapConnector, "RolledOptions") - .withArgs(Alice, rollFromOption, rollToOption, rollQuantity); - - // Get the new balances and calculate their differences - let rollFromOptionBalanceAfter = await rollFromOptionToken.balanceOf( - Alice - ); - let rollToOptionBalanceAfter = await rollToOptionToken.balanceOf( - Alice + await uniswapConnector.mintShortOptionsThenSwapToTokens( + optionTokenAddress, + amountIn, + amountOutMin, + path, + to, + deadline ); - let rollFromOptionBalanceChange = rollFromOptionBalanceAfter - .sub(rollFromOptionBalanceBefore) + let underlyingBalanceAfter = await underlyingToken.balanceOf(Alice); + let quoteBalanceAfter = await quoteToken.balanceOf(Alice); + let redeemBalanceAfter = await redeemToken.balanceOf(pair); + + // Used underlyings to mint options (Alice) + let underlyingChange = underlyingBalanceAfter + .sub(underlyingBalanceBefore) + .toString(); + // Purchased quoteTokens with our options (Alice) + let quoteChange = quoteBalanceAfter + .sub(quoteBalanceBefore) .toString(); - let rollToOptionBalanceChange = rollToOptionBalanceAfter - .sub(rollToOptionBalanceBefore) + // Sold options for quoteTokens to the pair, pair has more options (Pair) + let redeemChange = redeemBalanceAfter + .sub(redeemBalanceBefore) .toString(); - // Assert the balances changed appropriately - assertBNEqual(rollFromOptionBalanceChange, rollQuantity.mul(-1)); - assertBNEqual(rollToOptionBalanceChange, rollQuantity); + assertBNEqual(underlyingChange, amountIn.mul(-1)); + /* expect(+(quoteChange.toString())).to.be.greaterThan(amountOutMin); */ + assertBNEqual(redeemChange, "0"); }); }); @@ -453,10 +429,14 @@ describe("UniswapConnector", () => { */ // Call the function + let amountDesired = await uniswapRouter.quote(); await expect( uniswapConnector.rollOptionLiquidity( rollFromOption, + quoteToken.address, rollToOption, + quoteToken.address, + amountBMin, liquidity, amountAMin, amountBMin, @@ -484,10 +464,44 @@ describe("UniswapConnector", () => { }); }); - describe("addLiquidityWithUnderlying", () => { + describe("addLongLiquidityWithUnderlying", () => { + it("use underlyings to mint options, then provide options and quote tokens as liquidity", async () => { + /* Function ABI + function addLongLiquidityWithUnderlying( + address optionAddress, + uint256 quantityOptions, + uint256 quantityQuoteTokens, + uint256 minQuantityOptions, + uint256 minQuantityQuoteTokens, + address to, + uint256 deadline + ) public nonReentrant returns (bool) { + */ + + let optionAddress = optionToken.address; + let quantityOptions = ONE_ETHER; + let quantityQuoteTokens = ONE_ETHER; + let minQuantityOptions = 0; + let minQuantityQuoteTokens = 0; + let to = Alice; + let deadline = Math.floor(Date.now() / 1000) + 60 * 20; + await uniswapConnector.addLongLiquidityWithUnderlying( + optionAddress, + quoteToken.address, + quantityOptions, + quantityQuoteTokens, + minQuantityOptions, + minQuantityQuoteTokens, + to, + deadline + ); + }); + }); + + describe("addShortLiquidityWithUnderlying", () => { it("use underlyings to mint options, then provide options and quote tokens as liquidity", async () => { /* Function ABI - function addLiquidityWithUnderlying( + function addShortLiquidityWithUnderlying( address optionAddress, uint256 quantityOptions, uint256 quantityQuoteTokens, @@ -505,8 +519,9 @@ describe("UniswapConnector", () => { let minQuantityQuoteTokens = 0; let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; - await uniswapConnector.addLiquidityWithUnderlying( + await uniswapConnector.addShortLiquidityWithUnderlying( optionAddress, + weth.address, quantityOptions, quantityQuoteTokens, minQuantityOptions, @@ -517,10 +532,62 @@ describe("UniswapConnector", () => { }); }); - describe("removeLiquidityThenCloseOptions", () => { + describe("removeLongLiquidityThenCloseOptions", () => { + it("burns UNI-V2 lp shares, then closes the withdrawn optionTokens", async () => { + /* Function ABI + function removeLongLiquidityThenCloseOptions( + address optionAddress, + uint256 liquidity, + uint256 amountAMin, + uint256 amountBMin, + address to, + uint256 deadline + ) public nonReentrant returns (uint256, uint256) { + */ + + let optionAddress = optionToken.address; + let liquidity = ONE_ETHER; + let pairAddress = await uniswapConnector.getUniswapMarketForToken( + optionToken.address + ); + let pair = new ethers.Contract( + pairAddress, + UniswapV2Pair.abi, + Admin + ); + await pair + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + assert.equal( + (await pair.balanceOf(Alice)) >= liquidity, + true, + "err not enough pair tokens" + ); + assert.equal( + pairAddress != constants.ADDRESSES.ZERO_ADDRESS, + true, + "err pair not deployed" + ); + let amountAMin = 0; + let amountBMin = 0; + let to = Alice; + let deadline = Math.floor(Date.now() / 1000) + 60 * 20; + await uniswapConnector.removeLongLiquidityThenCloseOptions( + optionAddress, + quoteToken.address, + liquidity, + amountAMin, + amountBMin, + to, + deadline + ); + }); + }); + + describe("removeShortLiquidityThenCloseOptions", () => { it("burns UNI-V2 lp shares, then closes the withdrawn optionTokens", async () => { /* Function ABI - function removeLiquidityThenCloseOptions( + function removeShortLiquidityThenCloseOptions( address optionAddress, uint256 liquidity, uint256 amountAMin, @@ -532,7 +599,7 @@ describe("UniswapConnector", () => { let optionAddress = optionToken.address; let liquidity = ONE_ETHER; - let pairAddress = await uniswapConnector.getUniswapMarketForOption( + let pairAddress = await uniswapConnector.getUniswapMarketForToken( optionToken.address ); let pair = new ethers.Contract( @@ -557,8 +624,9 @@ describe("UniswapConnector", () => { let amountBMin = 0; let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; - await uniswapConnector.removeLiquidityThenCloseOptions( + await uniswapConnector.removeShortLiquidityThenCloseOptions( optionAddress, + quoteToken.address, liquidity, amountAMin, amountBMin, @@ -568,9 +636,182 @@ describe("UniswapConnector", () => { }); }); - describe("openFlashShort", () => { + describe("openFlashLong", () => { + before(async () => { + let signers = await setup.newWallets(); + + // Signers + Admin = signers[0]; + User = signers[1]; + + // Addresses of Signers + Alice = Admin._address; + Bob = User._address; + + // Underlying and quote token instances + weth = await setup.newWeth(Admin); + dai = await setup.newERC20(Admin, "TEST DAI", "DAI", MILLION_ETHER); + quoteToken = dai; + + // Administrative contract instances + registry = await setup.newRegistry(Admin); + + // Uniswap V2 + const uniswap = await setup.newUniswap(Admin, Alice, weth); + uniswapFactory = uniswap.uniswapFactory; + uniswapRouter = uniswap.uniswapRouter; + + // Uniswap Connector contract + uniswapConnector = await setup.newUniswapConnector(Admin); + + // Option parameters + underlyingToken = weth; + strikeToken = dai; + base = parseEther("1"); + quote = parseEther("100"); + expiry = "1690868800"; // May 30, 2020, 8PM UTC + + // Option and redeem instances + Primitive = await setup.newPrimitive( + Admin, + registry, + underlyingToken, + strikeToken, + base, + quote, + expiry + ); + + optionToken = Primitive.optionToken; + redeemToken = Primitive.redeemToken; + + // Trader Instance + trader = await setup.newTrader(Admin, weth.address); + + // Initialize the uniswap connector with addresses + await uniswapConnector.initialize( + uniswapRouter.address, + uniswapFactory.address, + trader.address, + registry.address, + quoteToken.address + ); + + // Approve tokens to be sent to trader contract + await underlyingToken + .connect(Admin) + .approve(trader.address, MILLION_ETHER); + await strikeToken + .connect(Admin) + .approve(trader.address, MILLION_ETHER); + await optionToken + .connect(Admin) + .approve(trader.address, MILLION_ETHER); + await redeemToken + .connect(Admin) + .approve(trader.address, MILLION_ETHER); + + // Approve tokens to be sent to uniswapConnector + await underlyingToken + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + await strikeToken + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + await optionToken + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + await redeemToken + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + + // Approve tokens to be sent to uniswapRouter + await underlyingToken + .connect(Admin) + .approve(uniswapRouter.address, MILLION_ETHER); + await strikeToken + .connect(Admin) + .approve(uniswapRouter.address, MILLION_ETHER); + await optionToken + .connect(Admin) + .approve(uniswapRouter.address, MILLION_ETHER); + await redeemToken + .connect(Admin) + .approve(uniswapRouter.address, MILLION_ETHER); + + // Create UNISWAP PAIRS + // option <> dai: 1:10 ($10 option) 1,000 options and 10,000 dai (1,000 weth) + // redeem <> weth: 100:1 ($1 redeem) 100,000 redeems and 1,000 weth + + const totalOptions = parseEther("1000"); + const daiForOptionsPair = parseEther("100000"); + const totalDai = parseEther("210000"); + const totalWethForPair = parseEther("1000"); + const totalRedeemForPair = parseEther("100000"); + + // MINT 2,010 WETH + await weth.deposit({ from: Alice, value: parseEther("2500") }); + + // MINT 1,000 OPTIONS + await trader.safeMint(optionToken.address, totalOptions, Alice); + + // Mint some options for tests + await trader.safeMint(optionToken.address, parseEther("10"), Alice); + + // MINT 210,000 DAI + await dai.mint(Alice, totalDai); + + // regular deadline + const deadline = Math.floor(Date.now() / 1000) + 60 * 20; + + // Add liquidity to option <> dai pair + await uniswapRouter.addLiquidity( + optionToken.address, + dai.address, + totalOptions, + daiForOptionsPair, + 0, + 0, + Alice, + deadline + ); + + // Add liquidity to redeem <> weth pair + await uniswapRouter.addLiquidity( + redeemToken.address, + weth.address, + totalRedeemForPair, + totalWethForPair, + 0, + 0, + Alice, + deadline + ); + + // Get the pair instance to approve it to the uniswapConnector + let pairAddress = await uniswapFactory.getPair( + optionToken.address, + dai.address + ); + let pair = new ethers.Contract( + pairAddress, + UniswapV2Pair.abi, + Admin + ); + await pair + .connect(Admin) + .approve(uniswapConnector.address, MILLION_ETHER); + + await pair + .connect(User) + .approve(uniswapConnector.address, MILLION_ETHER); + }); + it("gets a flash loan for underlyings, mints options, swaps redeem to underlyings to pay back", async () => { // Create a Uniswap V2 Pair and add liquidity. + console.log( + `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` + ); console.log( `Redeem balance: ${formatEther( await redeemToken.balanceOf(Alice) @@ -583,20 +824,6 @@ describe("UniswapConnector", () => { )}` ); - console.log( - `redeem dai pair: ${await uniswapFactory.getPair( - redeemToken.address, - dai.address - )}` - ); - - console.log( - `dai weth pair: ${await uniswapFactory.getPair( - weth.address, - dai.address - )}` - ); - // Get the pair instance to approve it to the uniswapConnector assert.equal( quoteToken.address, @@ -604,11 +831,41 @@ describe("UniswapConnector", () => { "QuoteToken mismatch" ); let amountOptions = ONE_ETHER; + let amountRedeems = amountOptions.mul(quote).div(base); let amountOutMin = "0"; - await uniswapConnector.openFlashShort( - amountOptions, - amountOutMin, - optionToken.address + let amounts = await uniswapRouter.getAmountsOut(amountRedeems, [ + redeemToken.address, + weth.address, + ]); + let remainder = amountOptions + .mul(1000) + .add(amountOptions.mul(3)) + .div(1000) + .sub(amounts[1]); + await expect( + uniswapConnector.openFlashLong( + optionToken.address, + amountOptions, + amountOutMin + ) + ) + .to.emit(uniswapConnector, "FlashedShortOption") + .withArgs(uniswapConnector.address, amountOptions, remainder); + + console.log( + `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` + ); + + console.log( + `Redeem balance: ${formatEther( + await redeemToken.balanceOf(Alice) + )}` + ); + + console.log( + `Option balance: ${formatEther( + await optionToken.balanceOf(Alice) + )}` ); }); }); From 40aa26bcd8194fe90c62efed2e2e560d68f3628c Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 10:44:47 -0700 Subject: [PATCH 10/20] Added WethRouterLib in style of current Trader. Migrated WethConnector to new version. --- artifacts/UniswapConnector.json | 168 ++++---- artifacts/WethConnector.json | 4 +- artifacts/WethRouterLib.json | 8 + .../connectors/Uniswap/UniswapConnector.sol | 122 +++--- contracts/connectors/WETH/WethConnector.sol | 258 ++---------- contracts/connectors/WETH/WethRouterLib.sol | 393 ++++++++++++++++++ test/lib/setup.js | 4 +- test/test_uni_connector.js | 11 +- 8 files changed, 586 insertions(+), 382 deletions(-) create mode 100644 artifacts/WethRouterLib.json create mode 100644 contracts/connectors/WETH/WethRouterLib.sol diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index fd5f2191..c3e9b7fd 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -39,12 +39,6 @@ "internalType": "address", "name": "from", "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "quoteToken", - "type": "address" } ], "name": "Initialized", @@ -113,6 +107,55 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOtherTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOptionTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOtherTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLongLiquidityWithETHUnderlying", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "payable", + "type": "function" + }, { "inputs": [ { @@ -227,6 +270,11 @@ "internalType": "address", "name": "optionAddress", "type": "address" + }, + { + "internalType": "address", + "name": "otherToken", + "type": "address" } ], "name": "deployUniswapMarket", @@ -297,64 +345,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "underlyingToken", - "type": "address" - }, - { - "internalType": "address", - "name": "strikeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "base", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "quote", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - } - ], - "name": "getUniswapMarketForSeries", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getUniswapMarketForToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -374,12 +364,7 @@ }, { "internalType": "address", - "name": "registry_", - "type": "address" - }, - { - "internalType": "address", - "name": "quoteToken_", + "name": "wethConnector_", "type": "address" } ], @@ -518,32 +503,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "quoteToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "registry", - "outputs": [ - { - "internalType": "contract IRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -789,10 +748,23 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [], + "name": "wethConnector", + "outputs": [ + { + "internalType": "contract IWethConnector", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615cf080620000fb6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cd0455241161007c578063cd04552414610be7578063d580c62214610c57578063d9b3612514610d26578063f2fde38b14610e15578063f887ea4014610e59578063ffa1ad7414610ea35761014d565b80638da5cb5b1461079657806395f0ae76146107e0578063b17d05701461090e578063c45a015514610a52578063c762405014610a9c578063cc84fde714610b205761014d565b806351b8498f1161011557806351b8498f1461042657806366787256146104e857806369d12e14146105f75780636af255d7146106be578063715018a6146107425780637b1039991461074c5761014d565b806301c6a4501461015257806310d1e85c146102215780631459457a146102ce5780631758078b14610392578063217a4b70146103dc575b600080fd5b610207600480360361010081101561016957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ec7565b604051808215151515815260200191505060405180910390f35b6102cc6004803603608081101561023757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561028857600080fd5b82018360208201111561029a57600080fd5b803590602001918460018302840111640100000000831117156102bc57600080fd5b90919293919293905050506113d3565b005b610390600480360360a08110156102e457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611502565b005b61039a611b45565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e4611b6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104a6600480360360a081101561043c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611b91565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105dd60048036036101408110156104ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d74565b604051808215151515815260200191505060405180910390f35b6106a1600480360360e081101561060d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611e9f565b604051808381526020018281526020019250505060405180910390f35b610700600480360360208110156106d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612846565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61074a612986565b005b610754612b0e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61079e612b34565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108f4600480360360c08110156107f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561084757600080fd5b82018360208201111561085957600080fd5b8035906020019184602083028401116401000000008311171561087b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b5d565b604051808215151515815260200191505060405180910390f35b610a38600480360360c081101561092457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561099557600080fd5b8201836020820111156109a757600080fd5b803590602001918460208302840111640100000000831117156109c957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612cb8565b604051808215151515815260200191505060405180910390f35b610a5a6132e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ade60048036036020811015610ab257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061330e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bca600480360360e0811015610b3657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506134ef565b604051808381526020018281526020019250505060405180910390f35b610c3d60048036036060811015610bfd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613e62565b604051808215151515815260200191505060405180910390f35b610d0c6004803603610100811015610c6e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061462c565b604051808215151515815260200191505060405180910390f35b610dfb600480360360c0811015610d3c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610d8d57600080fd5b820183602082011115610d9f57600080fd5b80359060200191846020830284011164010000000083111715610dc157600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614b35565b604051808215151515815260200191505060405180910390f35b610e5760048036036020811015610e2b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614ccc565b005b610e61614ed9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610eab614eff565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610f4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610fb83330898c73ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b600080610fc68c8b30614ff1565b91509150898214610fd357fe5b8b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561107a57600080fd5b505af115801561108e573d6000803e3d6000fd5b505050506040513d60208110156110a457600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561115d57600080fd5b505af1158015611171573d6000803e3d6000fd5b505050506040513d602081101561118757600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008d8d8d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156112a857600080fd5b505af11580156112bc573d6000803e3d6000fd5b505050506040513d60608110156112d257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506113a533828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561134557600080fd5b505afa158015611359573d6000803e3d6000fd5b505050506040513d602081101561136f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b600193505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611442576040519150601f19603f3d011682016040523d82523d6000602084013e611447565b606091505b50915091508180156114875750600081511480611486575080806020019051602081101561147457600080fd5b81019080805190602001909291905050505b5b6114f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b61150a6152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461168f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461199f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611c7f57600080fd5b505afa158015611c93573d6000803e3d6000fd5b505050506040513d6020811015611ca957600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b611d688161330e565b91505095945050505050565b600080611d868c8c89898989896134ef565b5090506000611d9b8b8b848c8b8b8b8b610ec7565b905080611e10576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248b6040518082815260200191505060405180910390a480925050509a9950505050505050505050565b600080600060149054906101000a900460ff16611f24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f8657600080fd5b505afa158015611f9a573d6000803e3d6000fd5b505050506040513d6020811015611fb057600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905848d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156120bf57600080fd5b505afa1580156120d3573d6000803e3d6000fd5b505050506040513d60208110156120e957600080fd5b8101908080519060200190929190505050905061212933308c8473ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156121d057600080fd5b505af11580156121e4573d6000803e3d6000fd5b505050506040513d60208110156121fa57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde858e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561231657600080fd5b505af115801561232a573d6000803e3d6000fd5b505050506040513d604081101561234057600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561243257600080fd5b505af1158015612446573d6000803e3d6000fd5b505050506040513d602081101561245c57600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561251557600080fd5b505af1158015612529573d6000803e3d6000fd5b505050506040513d602081101561253f57600080fd5b81019080805190602001909291905050505060006126ab670de0b6b3a764000061269d8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125a757600080fd5b505afa1580156125bb573d6000803e3d6000fd5b505050506040513d60208110156125d157600080fd5b810190808051906020019092919050505061268f670de0b6b3a76400006126818873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561263757600080fd5b505afa15801561264b573d6000803e3d6000fd5b505050506040513d602081101561266157600080fd5b81019080805190602001909291905050508c6152b190919063ffffffff16565b6152b190919063ffffffff16565b61533790919063ffffffff16565b61533790919063ffffffff16565b90506126da3330838573ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838e6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561279557600080fd5b505af11580156127a9573d6000803e3d6000fd5b505050506040513d60608110156127bf57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050505061281588828e73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b818195509550505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561294057600080fd5b505af1158015612954573d6000803e3d6000fd5b505050506040513d602081101561296a57600080fd5b8101908080519060200190929190505050905080915050919050565b61298e6152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612b6d898930614ff1565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bb957600080fd5b505afa158015612bcd573d6000803e3d6000fd5b505050506040513d6020811015612be357600080fd5b810190808051906020019092919050505090506000612c0682848b8b8b8b615381565b91505080612c7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612ca787858d73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b809450505050509695505050505050565b6000808511612d2f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612d7757600080fd5b505afa158015612d8b573d6000803e3d6000fd5b505050506040513d6020811015612da157600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1684600181518110612dd857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612e69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b612e9487878373ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1557600080fd5b505af1158015612f29573d6000803e3d6000fd5b505050506040513d6040811015612f3f57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015612ffd578082015181840152602081019050612fe2565b50505050905001935050505060006040518083038186803b15801561302157600080fd5b505afa158015613035573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561305f57600080fd5b810190808051604051939291908464010000000082111561307f57600080fd5b8382019150602082018581111561309557600080fd5b82518660208202830111640100000000821117156130b257600080fd5b8083526020830192505050908051906020019060200280838360005b838110156130e95780820151818401526020810190506130ce565b5050505090500160405250505090506000808b905060008360018151811061310d57fe5b60200260200101519050613177816131696103e861315b6131386003886152b190919063ffffffff16565b61314d6103e8896152b190919063ffffffff16565b61570b90919063ffffffff16565b61533790919063ffffffff16565b61579390919063ffffffff16565b925050506132268d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131c657600080fd5b505afa1580156131da573d6000803e3d6000fd5b505050506040513d60208110156131f057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b613253888e838673ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a25050506132d785838b73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561340657600080fd5b505afa15801561341a573d6000803e3d6000fd5b505050506040513d602081101561343057600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156134e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b600080600060149054906101000a900460ff16613574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a439058d8d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561368f57600080fd5b505afa1580156136a3573d6000803e3d6000fd5b505050506040513d60208110156136b957600080fd5b810190808051906020019092919050505090506136f933308c8473ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b505050506040513d60208110156137ca57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e8e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156138e657600080fd5b505af11580156138fa573d6000803e3d6000fd5b505050506040513d604081101561391057600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561399e57600080fd5b505afa1580156139b2573d6000803e3d6000fd5b505050506040513d60208110156139c857600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a8257600080fd5b505af1158015613a96573d6000803e3d6000fd5b505050506040513d6020811015613aac57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613b6557600080fd5b505af1158015613b79573d6000803e3d6000fd5b505050506040513d6020811015613b8f57600080fd5b8101908080519060200190929190505050506000613cc78773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613bec57600080fd5b505afa158015613c00573d6000803e3d6000fd5b505050506040513d6020811015613c1657600080fd5b8101908080519060200190929190505050613cb98973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6f57600080fd5b505afa158015613c83573d6000803e3d6000fd5b505050506040513d6020811015613c9957600080fd5b8101908080519060200190929190505050886152b190919063ffffffff16565b61533790919063ffffffff16565b9050613cf63330838573ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613db357600080fd5b505af1158015613dc7573d6000803e3d6000fd5b505050506040513d6060811015613ddd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050613e3089838f73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff16613ee5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4757600080fd5b505afa158015613f5b573d6000803e3d6000fd5b505050506040513d6020811015613f7157600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613fcc57600080fd5b505afa158015613fe0573d6000803e3d6000fd5b505050506040513d6020811015613ff657600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156140de57600080fd5b505afa1580156140f2573d6000803e3d6000fd5b505050506040513d602081101561410857600080fd5b810190808051906020019092919050505090506060600260405190808252806020026020018201604052801561414d5781602001602082028038833980820191505090505b509050838160008151811061415e57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082816001815181106141a657fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615c4160509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156142fa5780820151818401526020810190506142df565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156143c857600080fd5b505afa1580156143dc573d6000803e3d6000fd5b505050506040513d60208110156143f257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614614425576000614427565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561448857600080fd5b505afa15801561449c573d6000803e3d6000fd5b505050506040513d60208110156144b257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146144e4578b6144e7565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561459657808201518184015260208101905061457b565b50505050905090810190601f1680156145c35780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156145e557600080fd5b505af11580156145f9573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff166146af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061471d3330898c73ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b60008061472b8c8b30614ff1565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561477757600080fd5b505afa15801561478b573d6000803e3d6000fd5b505050506040513d60208110156147a157600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561485b57600080fd5b505af115801561486f573d6000803e3d6000fd5b505050506040513d602081101561488557600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561493e57600080fd5b505af1158015614952573d6000803e3d6000fd5b505050506040513d602081101561496857600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700828e858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614a8957600080fd5b505af1158015614a9d573d6000803e3d6000fd5b505050506040513d6060811015614ab357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614b0633848f73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b60019450505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b6000806000614b458a8a30614ff1565b915091506000614b9a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615381565b91505080614c10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614cbb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614c5b57600080fd5b505afa158015614c6f573d6000803e3d6000fd5b505050506040513d6020811015614c8557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b809350505050979650505050505050565b614cd46152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614d95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615bfa6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b614feb846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506157dd565b50505050565b6000806000841161506a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6151173386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156150b657600080fd5b505afa1580156150ca573d6000803e3d6000fd5b505050506040513d60208110156150e057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561519857600080fd5b505af11580156151ac573d6000803e3d6000fd5b505050506040513d60408110156151c257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6152a48363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506157dd565b505050565b600033905090565b6000808314156152c45760009050615331565b60008284029050828482816152d557fe5b041461532c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615c206021913960400191505060405180910390fd5b809150505b92915050565b600061537983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615a28565b905092915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106153a957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461543a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561550857600080fd5b505af115801561551c573d6000803e3d6000fd5b505050506040513d602081101561553257600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156155fb5780820151818401526020810190506155e0565b505050509050019650505050505050600060405180830381600087803b15801561562457600080fd5b505af1158015615638573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561566257600080fd5b810190808051604051939291908464010000000082111561568257600080fd5b8382019150602082018581111561569857600080fd5b82518660208202830111640100000000821117156156b557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156156ec5780820151818401526020810190506156d1565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006157d583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615aee565b905092915050565b6157fc8273ffffffffffffffffffffffffffffffffffffffff16615bae565b61586e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106158bd578051825260208201915060208101905060208303925061589a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461591f576040519150601f19603f3d011682016040523d82523d6000602084013e615924565b606091505b50915091508161599c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615a22578080602001905160208110156159bb57600080fd5b8101908080519060200190929190505050615a21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615c91602a913960400191505060405180910390fd5b5b50505050565b60008083118290615ad4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a99578082015181840152602081019050615a7e565b50505050905090810190601f168015615ac65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615ae057fe5b049050809150509392505050565b6000838311158290615b9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615b60578082015181840152602081019050615b45565b50505050905090810190601f168015615b8d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615bf057506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220acfbcfb26c1d5b367ee1b01690a21ffcd15484f6381acf08d067cbaf17d2b5f464736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063cd0455241161007c578063cd04552414610be7578063d580c62214610c57578063d9b3612514610d26578063f2fde38b14610e15578063f887ea4014610e59578063ffa1ad7414610ea35761014d565b80638da5cb5b1461079657806395f0ae76146107e0578063b17d05701461090e578063c45a015514610a52578063c762405014610a9c578063cc84fde714610b205761014d565b806351b8498f1161011557806351b8498f1461042657806366787256146104e857806369d12e14146105f75780636af255d7146106be578063715018a6146107425780637b1039991461074c5761014d565b806301c6a4501461015257806310d1e85c146102215780631459457a146102ce5780631758078b14610392578063217a4b70146103dc575b600080fd5b610207600480360361010081101561016957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ec7565b604051808215151515815260200191505060405180910390f35b6102cc6004803603608081101561023757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561028857600080fd5b82018360208201111561029a57600080fd5b803590602001918460018302840111640100000000831117156102bc57600080fd5b90919293919293905050506113d3565b005b610390600480360360a08110156102e457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611502565b005b61039a611b45565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e4611b6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104a6600480360360a081101561043c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611b91565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105dd60048036036101408110156104ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d74565b604051808215151515815260200191505060405180910390f35b6106a1600480360360e081101561060d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611e9f565b604051808381526020018281526020019250505060405180910390f35b610700600480360360208110156106d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612846565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61074a612986565b005b610754612b0e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61079e612b34565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108f4600480360360c08110156107f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561084757600080fd5b82018360208201111561085957600080fd5b8035906020019184602083028401116401000000008311171561087b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612b5d565b604051808215151515815260200191505060405180910390f35b610a38600480360360c081101561092457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561099557600080fd5b8201836020820111156109a757600080fd5b803590602001918460208302840111640100000000831117156109c957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612cb8565b604051808215151515815260200191505060405180910390f35b610a5a6132e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ade60048036036020811015610ab257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061330e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bca600480360360e0811015610b3657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506134ef565b604051808381526020018281526020019250505060405180910390f35b610c3d60048036036060811015610bfd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613e62565b604051808215151515815260200191505060405180910390f35b610d0c6004803603610100811015610c6e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061462c565b604051808215151515815260200191505060405180910390f35b610dfb600480360360c0811015610d3c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610d8d57600080fd5b820183602082011115610d9f57600080fd5b80359060200191846020830284011164010000000083111715610dc157600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614b35565b604051808215151515815260200191505060405180910390f35b610e5760048036036020811015610e2b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614ccc565b005b610e61614ed9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610eab614eff565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610f4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610fb83330898c73ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b600080610fc68c8b30614ff1565b91509150898214610fd357fe5b8b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561107a57600080fd5b505af115801561108e573d6000803e3d6000fd5b505050506040513d60208110156110a457600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561115d57600080fd5b505af1158015611171573d6000803e3d6000fd5b505050506040513d602081101561118757600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008d8d8d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156112a857600080fd5b505af11580156112bc573d6000803e3d6000fd5b505050506040513d60608110156112d257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506113a533828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561134557600080fd5b505afa158015611359573d6000803e3d6000fd5b505050506040513d602081101561136f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b600193505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611442576040519150601f19603f3d011682016040523d82523d6000602084013e611447565b606091505b50915091508180156114875750600081511480611486575080806020019051602081101561147457600080fd5b81019080805190602001909291905050505b5b6114f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b61150a6152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461168f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461199f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3cd5ec01b1ae7cfec6ca1863e2cd6aa25d6d1702825803ff2b7cc95010fffdc260405160405180910390a35050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b000e9ec88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b158015611c7f57600080fd5b505afa158015611c93573d6000803e3d6000fd5b505050506040513d6020811015611ca957600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552525f4f5054494f4e5f444f45535f4e4f545f45584953540000000000000081525060200191505060405180910390fd5b611d688161330e565b91505095945050505050565b600080611d868c8c89898989896134ef565b5090506000611d9b8b8b848c8b8b8b8b610ec7565b905080611e10576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248b6040518082815260200191505060405180910390a480925050509a9950505050505050505050565b600080600060149054906101000a900460ff16611f24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f8657600080fd5b505afa158015611f9a573d6000803e3d6000fd5b505050506040513d6020811015611fb057600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905848d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156120bf57600080fd5b505afa1580156120d3573d6000803e3d6000fd5b505050506040513d60208110156120e957600080fd5b8101908080519060200190929190505050905061212933308c8473ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156121d057600080fd5b505af11580156121e4573d6000803e3d6000fd5b505050506040513d60208110156121fa57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde858e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561231657600080fd5b505af115801561232a573d6000803e3d6000fd5b505050506040513d604081101561234057600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561243257600080fd5b505af1158015612446573d6000803e3d6000fd5b505050506040513d602081101561245c57600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561251557600080fd5b505af1158015612529573d6000803e3d6000fd5b505050506040513d602081101561253f57600080fd5b81019080805190602001909291905050505060006126ab670de0b6b3a764000061269d8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125a757600080fd5b505afa1580156125bb573d6000803e3d6000fd5b505050506040513d60208110156125d157600080fd5b810190808051906020019092919050505061268f670de0b6b3a76400006126818873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561263757600080fd5b505afa15801561264b573d6000803e3d6000fd5b505050506040513d602081101561266157600080fd5b81019080805190602001909291905050508c6152b190919063ffffffff16565b6152b190919063ffffffff16565b61533790919063ffffffff16565b61533790919063ffffffff16565b90506126da3330838573ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838e6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561279557600080fd5b505af11580156127a9573d6000803e3d6000fd5b505050506040513d60608110156127bf57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050505061281588828e73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b818195509550505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539684600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561294057600080fd5b505af1158015612954573d6000803e3d6000fd5b505050506040513d602081101561296a57600080fd5b8101908080519060200190929190505050905080915050919050565b61298e6152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806000612b6d898930614ff1565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bb957600080fd5b505afa158015612bcd573d6000803e3d6000fd5b505050506040513d6020811015612be357600080fd5b810190808051906020019092919050505090506000612c0682848b8b8b8b615381565b91505080612c7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b612ca787858d73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b809450505050509695505050505050565b6000808511612d2f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612d7757600080fd5b505afa158015612d8b573d6000803e3d6000fd5b505050506040513d6020811015612da157600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1684600181518110612dd857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612e69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b612e9487878373ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1557600080fd5b505af1158015612f29573d6000803e3d6000fd5b505050506040513d6040811015612f3f57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015612ffd578082015181840152602081019050612fe2565b50505050905001935050505060006040518083038186803b15801561302157600080fd5b505afa158015613035573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561305f57600080fd5b810190808051604051939291908464010000000082111561307f57600080fd5b8382019150602082018581111561309557600080fd5b82518660208202830111640100000000821117156130b257600080fd5b8083526020830192505050908051906020019060200280838360005b838110156130e95780820151818401526020810190506130ce565b5050505090500160405250505090506000808b905060008360018151811061310d57fe5b60200260200101519050613177816131696103e861315b6131386003886152b190919063ffffffff16565b61314d6103e8896152b190919063ffffffff16565b61570b90919063ffffffff16565b61533790919063ffffffff16565b61579390919063ffffffff16565b925050506132268d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131c657600080fd5b505afa1580156131da573d6000803e3d6000fd5b505050506040513d60208110156131f057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b613253888e838673ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a25050506132d785838b73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561340657600080fd5b505afa15801561341a573d6000803e3d6000fd5b505050506040513d602081101561343057600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156134e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b80915050919050565b600080600060149054906101000a900460ff16613574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a439058d8d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561368f57600080fd5b505afa1580156136a3573d6000803e3d6000fd5b505050506040513d60208110156136b957600080fd5b810190808051906020019092919050505090506136f933308c8473ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b505050506040513d60208110156137ca57600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e8e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156138e657600080fd5b505af11580156138fa573d6000803e3d6000fd5b505050506040513d604081101561391057600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561399e57600080fd5b505afa1580156139b2573d6000803e3d6000fd5b505050506040513d60208110156139c857600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613a8257600080fd5b505af1158015613a96573d6000803e3d6000fd5b505050506040513d6020811015613aac57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613b6557600080fd5b505af1158015613b79573d6000803e3d6000fd5b505050506040513d6020811015613b8f57600080fd5b8101908080519060200190929190505050506000613cc78773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613bec57600080fd5b505afa158015613c00573d6000803e3d6000fd5b505050506040513d6020811015613c1657600080fd5b8101908080519060200190929190505050613cb98973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6f57600080fd5b505afa158015613c83573d6000803e3d6000fd5b505050506040513d6020811015613c9957600080fd5b8101908080519060200190929190505050886152b190919063ffffffff16565b61533790919063ffffffff16565b9050613cf63330838573ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613db357600080fd5b505af1158015613dc7573d6000803e3d6000fd5b505050506040513d6060811015613ddd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050613e3089838f73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff16613ee5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4757600080fd5b505afa158015613f5b573d6000803e3d6000fd5b505050506040513d6020811015613f7157600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015613fcc57600080fd5b505afa158015613fe0573d6000803e3d6000fd5b505050506040513d6020811015613ff657600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156140de57600080fd5b505afa1580156140f2573d6000803e3d6000fd5b505050506040513d602081101561410857600080fd5b810190808051906020019092919050505090506060600260405190808252806020026020018201604052801561414d5781602001602082028038833980820191505090505b509050838160008151811061415e57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082816001815181106141a657fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615c4160509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156142fa5780820151818401526020810190506142df565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156143c857600080fd5b505afa1580156143dc573d6000803e3d6000fd5b505050506040513d60208110156143f257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614614425576000614427565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561448857600080fd5b505afa15801561449c573d6000803e3d6000fd5b505050506040513d60208110156144b257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146144e4578b6144e7565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561459657808201518184015260208101905061457b565b50505050905090810190601f1680156145c35780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156145e557600080fd5b505af11580156145f9573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff166146af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061471d3330898c73ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b60008061472b8c8b30614ff1565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561477757600080fd5b505afa15801561478b573d6000803e3d6000fd5b505050506040513d60208110156147a157600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561485b57600080fd5b505af115801561486f573d6000803e3d6000fd5b505050506040513d602081101561488557600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561493e57600080fd5b505af1158015614952573d6000803e3d6000fd5b505050506040513d602081101561496857600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700828e858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614a8957600080fd5b505af1158015614a9d573d6000803e3d6000fd5b505050506040513d6060811015614ab357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614b0633848f73ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b60019450505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b6000806000614b458a8a30614ff1565b915091506000614b9a8b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615381565b91505080614c10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b614cbb86838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614c5b57600080fd5b505afa158015614c6f573d6000803e3d6000fd5b505050506040513d6020811015614c8557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166151f19092919063ffffffff16565b809350505050979650505050505050565b614cd46152a9565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614d95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615bfa6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b614feb846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506157dd565b50505050565b6000806000841161506a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6151173386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156150b657600080fd5b505afa1580156150ca573d6000803e3d6000fd5b505050506040513d60208110156150e057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16614f04909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561519857600080fd5b505af11580156151ac573d6000803e3d6000fd5b505050506040513d60408110156151c257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6152a48363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506157dd565b505050565b600033905090565b6000808314156152c45760009050615331565b60008284029050828482816152d557fe5b041461532c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615c206021913960400191505060405180910390fd5b809150505b92915050565b600061537983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615a28565b905092915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106153a957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461543a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561550857600080fd5b505af115801561551c573d6000803e3d6000fd5b505050506040513d602081101561553257600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156155fb5780820151818401526020810190506155e0565b505050509050019650505050505050600060405180830381600087803b15801561562457600080fd5b505af1158015615638573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561566257600080fd5b810190808051604051939291908464010000000082111561568257600080fd5b8382019150602082018581111561569857600080fd5b82518660208202830111640100000000821117156156b557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156156ec5780820151818401526020810190506156d1565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006157d583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615aee565b905092915050565b6157fc8273ffffffffffffffffffffffffffffffffffffffff16615bae565b61586e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106158bd578051825260208201915060208101905060208303925061589a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461591f576040519150601f19603f3d011682016040523d82523d6000602084013e615924565b606091505b50915091508161599c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615a22578080602001905160208110156159bb57600080fd5b8101908080519060200190929190505050615a21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615c91602a913960400191505060405180910390fd5b5b50505050565b60008083118290615ad4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a99578082015181840152602081019050615a7e565b50505050905090810190601f168015615ac65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615ae057fe5b049050809150509392505050565b6000838311158290615b9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615b60578082015181840152602081019050615b45565b50505050905090810190601f168015615b8d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615bf057506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220acfbcfb26c1d5b367ee1b01690a21ffcd15484f6381acf08d067cbaf17d2b5f464736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615df780620000fb6000396000f3fe60806040526004361061012a5760003560e01c8063b17d0570116100ab578063d9b361251161006f578063d9b3612514610b92578063f2fde38b14610c8e578063f887ea4014610cdf578063f8c8765e14610d36578063fdf9145c14610de7578063ffa1ad7414610eab5761012a565b8063b17d0570146107bd578063c45a01551461090e578063cc84fde714610965578063cd04552414610a39578063d580c62214610ab65761012a565b806369d12e14116100f257806369d12e14146104e9578063715018a6146105bd5780638658ded9146105d45780638da5cb5b1461062b57806395f0ae76146106825761012a565b806301c6a4501461012f57806310d1e85c1461020b5780631758078b146102c5578063667872561461031c57806369bd26cd14610438575b600080fd5b34801561013b57600080fd5b506101f1600480360361010081101561015357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610edc565b604051808215151515815260200191505060405180910390f35b34801561021757600080fd5b506102c36004803603608081101561022e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561027f57600080fd5b82018360208201111561029157600080fd5b803590602001918460018302840111640100000000831117156102b357600080fd5b90919293919293905050506113e8565b005b3480156102d157600080fd5b506102da611517565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032857600080fd5b5061041e600480360361014081101561034057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061153d565b604051808215151515815260200191505060405180910390f35b34801561044457600080fd5b506104a76004803603604081101561045b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611668565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104f557600080fd5b506105a0600480360360e081101561050c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611787565b604051808381526020018281526020019250505060405180910390f35b3480156105c957600080fd5b506105d261212e565b005b3480156105e057600080fd5b506105e96122b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561063757600080fd5b506106406122dc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068e57600080fd5b506107a3600480360360c08110156106a557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156106f657600080fd5b82018360208201111561070857600080fd5b8035906020019184602083028401116401000000008311171561072a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612305565b604051808215151515815260200191505060405180910390f35b3480156107c957600080fd5b506108f4600480360360c08110156107e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561085157600080fd5b82018360208201111561086357600080fd5b8035906020019184602083028401116401000000008311171561088557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612460565b604051808215151515815260200191505060405180910390f35b34801561091a57600080fd5b50610923612a90565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561097157600080fd5b50610a1c600480360360e081101561098857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ab6565b604051808381526020018281526020019250505060405180910390f35b348015610a4557600080fd5b50610a9c60048036036060811015610a5c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613429565b604051808215151515815260200191505060405180910390f35b348015610ac257600080fd5b50610b786004803603610100811015610ada57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613bf3565b604051808215151515815260200191505060405180910390f35b348015610b9e57600080fd5b50610c74600480360360c0811015610bb557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610c0657600080fd5b820183602082011115610c1857600080fd5b80359060200191846020830284011164010000000083111715610c3a57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506140fc565b604051808215151515815260200191505060405180910390f35b348015610c9a57600080fd5b50610cdd60048036036020811015610cb157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614293565b005b348015610ceb57600080fd5b50610cf46144a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d4257600080fd5b50610de560048036036080811015610d5957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506144c6565b005b610e91600480360360e0811015610dfd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506149ec565b604051808215151515815260200191505060405180910390f35b348015610eb757600080fd5b50610ec0615006565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610f5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610fcd3330898c73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080610fdb8c8b306150f8565b91509150898214610fe857fe5b8b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561108f57600080fd5b505af11580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561117257600080fd5b505af1158015611186573d6000803e3d6000fd5b505050506040513d602081101561119c57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008d8d8d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156112bd57600080fd5b505af11580156112d1573d6000803e3d6000fd5b505050506040513d60608110156112e757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506113ba33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561135a57600080fd5b505afa15801561136e573d6000803e3d6000fd5b505050506040513d602081101561138457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611457576040519150601f19603f3d011682016040523d82523d6000602084013e61145c565b606091505b509150915081801561149c575060008151148061149b575080806020019051602081101561148957600080fd5b81019080805190602001909291905050505b5b61150e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008061154f8c8c8989898989612ab6565b50905060006115648b8b848c8b8b8b8b610edc565b9050806115d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248b6040518082815260200191505060405180910390a480925050509a9950505050505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561174057600080fd5b505af1158015611754573d6000803e3d6000fd5b505050506040513d602081101561176a57600080fd5b810190808051906020019092919050505090508091505092915050565b600080600060149054906101000a900460ff1661180c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561186e57600080fd5b505afa158015611882573d6000803e3d6000fd5b505050506040513d602081101561189857600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905848d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156119a757600080fd5b505afa1580156119bb573d6000803e3d6000fd5b505050506040513d60208110156119d157600080fd5b81019080805190602001909291905050509050611a1133308c8473ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611ab857600080fd5b505af1158015611acc573d6000803e3d6000fd5b505050506040513d6020811015611ae257600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde858e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015611bfe57600080fd5b505af1158015611c12573d6000803e3d6000fd5b505050506040513d6040811015611c2857600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611d1a57600080fd5b505af1158015611d2e573d6000803e3d6000fd5b505050506040513d6020811015611d4457600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611dfd57600080fd5b505af1158015611e11573d6000803e3d6000fd5b505050506040513d6020811015611e2757600080fd5b8101908080519060200190929190505050506000611f93670de0b6b3a7640000611f858473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8f57600080fd5b505afa158015611ea3573d6000803e3d6000fd5b505050506040513d6020811015611eb957600080fd5b8101908080519060200190929190505050611f77670de0b6b3a7640000611f698873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611f1f57600080fd5b505afa158015611f33573d6000803e3d6000fd5b505050506040513d6020811015611f4957600080fd5b81019080805190602001909291905050508c6153b090919063ffffffff16565b6153b090919063ffffffff16565b61543690919063ffffffff16565b61543690919063ffffffff16565b9050611fc23330838573ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838e6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561207d57600080fd5b505af1158015612091573d6000803e3d6000fd5b505050506040513d60608110156120a757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050506120fd88828e73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b818195509550505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b612136615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060006123158989306150f8565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561236157600080fd5b505afa158015612375573d6000803e3d6000fd5b505050506040513d602081101561238b57600080fd5b8101908080519060200190929190505050905060006123ae82848b8b8b8b615488565b91505080612424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61244f87858d73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b809450505050509695505050505050565b60008085116124d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561251f57600080fd5b505afa158015612533573d6000803e3d6000fd5b505050506040513d602081101561254957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061258057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61263c87878373ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156126bd57600080fd5b505af11580156126d1573d6000803e3d6000fd5b505050506040513d60408110156126e757600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156127a557808201518184015260208101905061278a565b50505050905001935050505060006040518083038186803b1580156127c957600080fd5b505afa1580156127dd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561280757600080fd5b810190808051604051939291908464010000000082111561282757600080fd5b8382019150602082018581111561283d57600080fd5b825186602082028301116401000000008211171561285a57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015612891578082015181840152602081019050612876565b5050505090500160405250505090506000808b90506000836001815181106128b557fe5b6020026020010151905061291f816129116103e86129036128e06003886153b090919063ffffffff16565b6128f56103e8896153b090919063ffffffff16565b61581290919063ffffffff16565b61543690919063ffffffff16565b61589a90919063ffffffff16565b925050506129ce8d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561296e57600080fd5b505afa158015612982573d6000803e3d6000fd5b505050506040513d602081101561299857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b6129fb888e838673ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050612a7f85838b73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff16612b3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a439058d8d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612c5657600080fd5b505afa158015612c6a573d6000803e3d6000fd5b505050506040513d6020811015612c8057600080fd5b81019080805190602001909291905050509050612cc033308c8473ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d6757600080fd5b505af1158015612d7b573d6000803e3d6000fd5b505050506040513d6020811015612d9157600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e8e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612ead57600080fd5b505af1158015612ec1573d6000803e3d6000fd5b505050506040513d6040811015612ed757600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f6557600080fd5b505afa158015612f79573d6000803e3d6000fd5b505050506040513d6020811015612f8f57600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561304957600080fd5b505af115801561305d573d6000803e3d6000fd5b505050506040513d602081101561307357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561312c57600080fd5b505af1158015613140573d6000803e3d6000fd5b505050506040513d602081101561315657600080fd5b810190808051906020019092919050505050600061328e8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156131b357600080fd5b505afa1580156131c7573d6000803e3d6000fd5b505050506040513d60208110156131dd57600080fd5b81019080805190602001909291905050506132808973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561323657600080fd5b505afa15801561324a573d6000803e3d6000fd5b505050506040513d602081101561326057600080fd5b8101908080519060200190929190505050886153b090919063ffffffff16565b61543690919063ffffffff16565b90506132bd3330838573ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561337a57600080fd5b505af115801561338e573d6000803e3d6000fd5b505050506040513d60608110156133a457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506133f789838f73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff166134ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561350e57600080fd5b505afa158015613522573d6000803e3d6000fd5b505050506040513d602081101561353857600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561359357600080fd5b505afa1580156135a7573d6000803e3d6000fd5b505050506040513d60208110156135bd57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156136a557600080fd5b505afa1580156136b9573d6000803e3d6000fd5b505050506040513d60208110156136cf57600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156137145781602001602082028038833980820191505090505b509050838160008151811061372557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061376d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615d4860509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156138c15780820151818401526020810190506138a6565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561398f57600080fd5b505afa1580156139a3573d6000803e3d6000fd5b505050506040513d60208110156139b957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146139ec5760006139ee565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015613a4f57600080fd5b505afa158015613a63573d6000803e3d6000fd5b505050506040513d6020811015613a7957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614613aab578b613aae565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613b5d578082015181840152602081019050613b42565b50505050905090810190601f168015613b8a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613bac57600080fd5b505af1158015613bc0573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16613c76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050613ce43330898c73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080613cf28c8b306150f8565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d3e57600080fd5b505afa158015613d52573d6000803e3d6000fd5b505050506040513d6020811015613d6857600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613e2257600080fd5b505af1158015613e36573d6000803e3d6000fd5b505050506040513d6020811015613e4c57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f0557600080fd5b505af1158015613f19573d6000803e3d6000fd5b505050506040513d6020811015613f2f57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700828e858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561405057600080fd5b505af1158015614064573d6000803e3d6000fd5b505050506040513d606081101561407a57600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506140cd33848f73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b60019450505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600080600061410c8a8a306150f8565b9150915060006141618b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615488565b915050806141d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61428286838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561422257600080fd5b505afa158015614236573d6000803e3d6000fd5b505050506040513d602081101561424c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b809350505050979650505050505050565b61429b615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461435c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615d016026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6144ce615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461458f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614717576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146147db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461489f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a250505050565b60008060149054906101000a900460ff16614a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050614add3330898b73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638549780b348d306040518463ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060408051808303818588803b158015614bb457600080fd5b505af1158015614bc8573d6000803e3d6000fd5b50505050506040513d6040811015614bdf57600080fd5b81019080805190602001909291908051906020019092919050505091509150348214614c0757fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614cae57600080fd5b505af1158015614cc2573d6000803e3d6000fd5b505050506040513d6020811015614cd857600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d9157600080fd5b505af1158015614da5573d6000803e3d6000fd5b505050506040513d6020811015614dbb57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c348d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614edc57600080fd5b505af1158015614ef0573d6000803e3d6000fd5b505050506040513d6060811015614f0657600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614fd933828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f7957600080fd5b505afa158015614f8d573d6000803e3d6000fd5b505050506040513d6020811015614fa357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600281565b6150f2846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506158e4565b50505050565b60008060008411615171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61521e3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156151bd57600080fd5b505afa1580156151d1573d6000803e3d6000fd5b505050506040513d60208110156151e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561529f57600080fd5b505af11580156152b3573d6000803e3d6000fd5b505050506040513d60408110156152c957600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6153ab8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506158e4565b505050565b6000808314156153c35760009050615430565b60008284029050828482816153d457fe5b041461542b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615d276021913960400191505060405180910390fd5b809150505b92915050565b600061547883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615b2f565b905092915050565b600033905090565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106154b057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615541576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561560f57600080fd5b505af1158015615623573d6000803e3d6000fd5b505050506040513d602081101561563957600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156157025780820151818401526020810190506156e7565b505050509050019650505050505050600060405180830381600087803b15801561572b57600080fd5b505af115801561573f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561576957600080fd5b810190808051604051939291908464010000000082111561578957600080fd5b8382019150602082018581111561579f57600080fd5b82518660208202830111640100000000821117156157bc57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156157f35780820151818401526020810190506157d8565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006158dc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615bf5565b905092915050565b6159038273ffffffffffffffffffffffffffffffffffffffff16615cb5565b615975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106159c457805182526020820191506020810190506020830392506159a1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615a26576040519150601f19603f3d011682016040523d82523d6000602084013e615a2b565b606091505b509150915081615aa3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615b2957808060200190516020811015615ac257600080fd5b8101908080519060200190929190505050615b28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615d98602a913960400191505060405180910390fd5b5b50505050565b60008083118290615bdb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615ba0578082015181840152602081019050615b85565b50505050905090810190601f168015615bcd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615be757fe5b049050809150509392505050565b6000838311158290615ca2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c67578082015181840152602081019050615c4c565b50505050905090810190601f168015615c945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615cf757506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209b44027644546b20f3a65e84ef16fc05ef47100869f1cad2fd3a672860678eec64736f6c63430006020033", + "deployedBytecode": "0x60806040526004361061012a5760003560e01c8063b17d0570116100ab578063d9b361251161006f578063d9b3612514610b92578063f2fde38b14610c8e578063f887ea4014610cdf578063f8c8765e14610d36578063fdf9145c14610de7578063ffa1ad7414610eab5761012a565b8063b17d0570146107bd578063c45a01551461090e578063cc84fde714610965578063cd04552414610a39578063d580c62214610ab65761012a565b806369d12e14116100f257806369d12e14146104e9578063715018a6146105bd5780638658ded9146105d45780638da5cb5b1461062b57806395f0ae76146106825761012a565b806301c6a4501461012f57806310d1e85c1461020b5780631758078b146102c5578063667872561461031c57806369bd26cd14610438575b600080fd5b34801561013b57600080fd5b506101f1600480360361010081101561015357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610edc565b604051808215151515815260200191505060405180910390f35b34801561021757600080fd5b506102c36004803603608081101561022e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561027f57600080fd5b82018360208201111561029157600080fd5b803590602001918460018302840111640100000000831117156102b357600080fd5b90919293919293905050506113e8565b005b3480156102d157600080fd5b506102da611517565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032857600080fd5b5061041e600480360361014081101561034057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061153d565b604051808215151515815260200191505060405180910390f35b34801561044457600080fd5b506104a76004803603604081101561045b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611668565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104f557600080fd5b506105a0600480360360e081101561050c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611787565b604051808381526020018281526020019250505060405180910390f35b3480156105c957600080fd5b506105d261212e565b005b3480156105e057600080fd5b506105e96122b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561063757600080fd5b506106406122dc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068e57600080fd5b506107a3600480360360c08110156106a557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156106f657600080fd5b82018360208201111561070857600080fd5b8035906020019184602083028401116401000000008311171561072a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612305565b604051808215151515815260200191505060405180910390f35b3480156107c957600080fd5b506108f4600480360360c08110156107e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561085157600080fd5b82018360208201111561086357600080fd5b8035906020019184602083028401116401000000008311171561088557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612460565b604051808215151515815260200191505060405180910390f35b34801561091a57600080fd5b50610923612a90565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561097157600080fd5b50610a1c600480360360e081101561098857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ab6565b604051808381526020018281526020019250505060405180910390f35b348015610a4557600080fd5b50610a9c60048036036060811015610a5c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613429565b604051808215151515815260200191505060405180910390f35b348015610ac257600080fd5b50610b786004803603610100811015610ada57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613bf3565b604051808215151515815260200191505060405180910390f35b348015610b9e57600080fd5b50610c74600480360360c0811015610bb557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610c0657600080fd5b820183602082011115610c1857600080fd5b80359060200191846020830284011164010000000083111715610c3a57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506140fc565b604051808215151515815260200191505060405180910390f35b348015610c9a57600080fd5b50610cdd60048036036020811015610cb157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614293565b005b348015610ceb57600080fd5b50610cf46144a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d4257600080fd5b50610de560048036036080811015610d5957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506144c6565b005b610e91600480360360e0811015610dfd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506149ec565b604051808215151515815260200191505060405180910390f35b348015610eb757600080fd5b50610ec0615006565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610f5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610fcd3330898c73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080610fdb8c8b306150f8565b91509150898214610fe857fe5b8b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561108f57600080fd5b505af11580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561117257600080fd5b505af1158015611186573d6000803e3d6000fd5b505050506040513d602081101561119c57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008d8d8d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156112bd57600080fd5b505af11580156112d1573d6000803e3d6000fd5b505050506040513d60608110156112e757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506113ba33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561135a57600080fd5b505afa15801561136e573d6000803e3d6000fd5b505050506040513d602081101561138457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611457576040519150601f19603f3d011682016040523d82523d6000602084013e61145c565b606091505b509150915081801561149c575060008151148061149b575080806020019051602081101561148957600080fd5b81019080805190602001909291905050505b5b61150e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008061154f8c8c8989898989612ab6565b50905060006115648b8b848c8b8b8b8b610edc565b9050806115d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248b6040518082815260200191505060405180910390a480925050509a9950505050505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561174057600080fd5b505af1158015611754573d6000803e3d6000fd5b505050506040513d602081101561176a57600080fd5b810190808051906020019092919050505090508091505092915050565b600080600060149054906101000a900460ff1661180c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561186e57600080fd5b505afa158015611882573d6000803e3d6000fd5b505050506040513d602081101561189857600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905848d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156119a757600080fd5b505afa1580156119bb573d6000803e3d6000fd5b505050506040513d60208110156119d157600080fd5b81019080805190602001909291905050509050611a1133308c8473ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611ab857600080fd5b505af1158015611acc573d6000803e3d6000fd5b505050506040513d6020811015611ae257600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde858e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015611bfe57600080fd5b505af1158015611c12573d6000803e3d6000fd5b505050506040513d6040811015611c2857600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611d1a57600080fd5b505af1158015611d2e573d6000803e3d6000fd5b505050506040513d6020811015611d4457600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611dfd57600080fd5b505af1158015611e11573d6000803e3d6000fd5b505050506040513d6020811015611e2757600080fd5b8101908080519060200190929190505050506000611f93670de0b6b3a7640000611f858473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8f57600080fd5b505afa158015611ea3573d6000803e3d6000fd5b505050506040513d6020811015611eb957600080fd5b8101908080519060200190929190505050611f77670de0b6b3a7640000611f698873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611f1f57600080fd5b505afa158015611f33573d6000803e3d6000fd5b505050506040513d6020811015611f4957600080fd5b81019080805190602001909291905050508c6153b090919063ffffffff16565b6153b090919063ffffffff16565b61543690919063ffffffff16565b61543690919063ffffffff16565b9050611fc23330838573ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838e6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561207d57600080fd5b505af1158015612091573d6000803e3d6000fd5b505050506040513d60608110156120a757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050506120fd88828e73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b818195509550505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b612136615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060006123158989306150f8565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561236157600080fd5b505afa158015612375573d6000803e3d6000fd5b505050506040513d602081101561238b57600080fd5b8101908080519060200190929190505050905060006123ae82848b8b8b8b615488565b91505080612424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61244f87858d73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b809450505050509695505050505050565b60008085116124d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561251f57600080fd5b505afa158015612533573d6000803e3d6000fd5b505050506040513d602081101561254957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061258057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61263c87878373ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156126bd57600080fd5b505af11580156126d1573d6000803e3d6000fd5b505050506040513d60408110156126e757600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156127a557808201518184015260208101905061278a565b50505050905001935050505060006040518083038186803b1580156127c957600080fd5b505afa1580156127dd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561280757600080fd5b810190808051604051939291908464010000000082111561282757600080fd5b8382019150602082018581111561283d57600080fd5b825186602082028301116401000000008211171561285a57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015612891578082015181840152602081019050612876565b5050505090500160405250505090506000808b90506000836001815181106128b557fe5b6020026020010151905061291f816129116103e86129036128e06003886153b090919063ffffffff16565b6128f56103e8896153b090919063ffffffff16565b61581290919063ffffffff16565b61543690919063ffffffff16565b61589a90919063ffffffff16565b925050506129ce8d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561296e57600080fd5b505afa158015612982573d6000803e3d6000fd5b505050506040513d602081101561299857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b6129fb888e838673ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050612a7f85838b73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff16612b3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a439058d8d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612c5657600080fd5b505afa158015612c6a573d6000803e3d6000fd5b505050506040513d6020811015612c8057600080fd5b81019080805190602001909291905050509050612cc033308c8473ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d6757600080fd5b505af1158015612d7b573d6000803e3d6000fd5b505050506040513d6020811015612d9157600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e8e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612ead57600080fd5b505af1158015612ec1573d6000803e3d6000fd5b505050506040513d6040811015612ed757600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f6557600080fd5b505afa158015612f79573d6000803e3d6000fd5b505050506040513d6020811015612f8f57600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561304957600080fd5b505af115801561305d573d6000803e3d6000fd5b505050506040513d602081101561307357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561312c57600080fd5b505af1158015613140573d6000803e3d6000fd5b505050506040513d602081101561315657600080fd5b810190808051906020019092919050505050600061328e8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156131b357600080fd5b505afa1580156131c7573d6000803e3d6000fd5b505050506040513d60208110156131dd57600080fd5b81019080805190602001909291905050506132808973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561323657600080fd5b505afa15801561324a573d6000803e3d6000fd5b505050506040513d602081101561326057600080fd5b8101908080519060200190929190505050886153b090919063ffffffff16565b61543690919063ffffffff16565b90506132bd3330838573ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561337a57600080fd5b505af115801561338e573d6000803e3d6000fd5b505050506040513d60608110156133a457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506133f789838f73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff166134ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561350e57600080fd5b505afa158015613522573d6000803e3d6000fd5b505050506040513d602081101561353857600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561359357600080fd5b505afa1580156135a7573d6000803e3d6000fd5b505050506040513d60208110156135bd57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156136a557600080fd5b505afa1580156136b9573d6000803e3d6000fd5b505050506040513d60208110156136cf57600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156137145781602001602082028038833980820191505090505b509050838160008151811061372557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061376d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615d4860509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156138c15780820151818401526020810190506138a6565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561398f57600080fd5b505afa1580156139a3573d6000803e3d6000fd5b505050506040513d60208110156139b957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146139ec5760006139ee565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015613a4f57600080fd5b505afa158015613a63573d6000803e3d6000fd5b505050506040513d6020811015613a7957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614613aab578b613aae565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613b5d578082015181840152602081019050613b42565b50505050905090810190601f168015613b8a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613bac57600080fd5b505af1158015613bc0573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16613c76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050613ce43330898c73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080613cf28c8b306150f8565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d3e57600080fd5b505afa158015613d52573d6000803e3d6000fd5b505050506040513d6020811015613d6857600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613e2257600080fd5b505af1158015613e36573d6000803e3d6000fd5b505050506040513d6020811015613e4c57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f0557600080fd5b505af1158015613f19573d6000803e3d6000fd5b505050506040513d6020811015613f2f57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700828e858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561405057600080fd5b505af1158015614064573d6000803e3d6000fd5b505050506040513d606081101561407a57600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506140cd33848f73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b60019450505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600080600061410c8a8a306150f8565b9150915060006141618b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615488565b915050806141d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61428286838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561422257600080fd5b505afa158015614236573d6000803e3d6000fd5b505050506040513d602081101561424c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b809350505050979650505050505050565b61429b615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461435c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615d016026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6144ce615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461458f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614717576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146147db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461489f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a250505050565b60008060149054906101000a900460ff16614a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050614add3330898b73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638549780b348d306040518463ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060408051808303818588803b158015614bb457600080fd5b505af1158015614bc8573d6000803e3d6000fd5b50505050506040513d6040811015614bdf57600080fd5b81019080805190602001909291908051906020019092919050505091509150348214614c0757fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614cae57600080fd5b505af1158015614cc2573d6000803e3d6000fd5b505050506040513d6020811015614cd857600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d9157600080fd5b505af1158015614da5573d6000803e3d6000fd5b505050506040513d6020811015614dbb57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c348d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614edc57600080fd5b505af1158015614ef0573d6000803e3d6000fd5b505050506040513d6060811015614f0657600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614fd933828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f7957600080fd5b505afa158015614f8d573d6000803e3d6000fd5b505050506040513d6020811015614fa357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600281565b6150f2846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506158e4565b50505050565b60008060008411615171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61521e3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156151bd57600080fd5b505afa1580156151d1573d6000803e3d6000fd5b505050506040513d60208110156151e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561529f57600080fd5b505af11580156152b3573d6000803e3d6000fd5b505050506040513d60408110156152c957600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6153ab8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506158e4565b505050565b6000808314156153c35760009050615430565b60008284029050828482816153d457fe5b041461542b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615d276021913960400191505060405180910390fd5b809150505b92915050565b600061547883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615b2f565b905092915050565b600033905090565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106154b057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615541576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561560f57600080fd5b505af1158015615623573d6000803e3d6000fd5b505050506040513d602081101561563957600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156157025780820151818401526020810190506156e7565b505050509050019650505050505050600060405180830381600087803b15801561572b57600080fd5b505af115801561573f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561576957600080fd5b810190808051604051939291908464010000000082111561578957600080fd5b8382019150602082018581111561579f57600080fd5b82518660208202830111640100000000821117156157bc57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156157f35780820151818401526020810190506157d8565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006158dc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615bf5565b905092915050565b6159038273ffffffffffffffffffffffffffffffffffffffff16615cb5565b615975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106159c457805182526020820191506020810190506020830392506159a1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615a26576040519150601f19603f3d011682016040523d82523d6000602084013e615a2b565b606091505b509150915081615aa3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615b2957808060200190516020811015615ac257600080fd5b8101908080519060200190929190505050615b28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615d98602a913960400191505060405180910390fd5b5b50505050565b60008083118290615bdb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615ba0578082015181840152602081019050615b85565b50505050905090810190601f168015615bcd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615be757fe5b049050809150509392505050565b6000838311158290615ca2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c67578082015181840152602081019050615c4c565b50505050905090810190601f168015615c945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615cf757506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209b44027644546b20f3a65e84ef16fc05ef47100869f1cad2fd3a672860678eec64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/WethConnector.json b/artifacts/WethConnector.json index 9971c62c..694f6b5b 100644 --- a/artifacts/WethConnector.json +++ b/artifacts/WethConnector.json @@ -366,8 +366,8 @@ "type": "receive" } ], - "bytecode": "0x608060405234801561001057600080fd5b506040516138073803806138078339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613758806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061258d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612955565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a6130a2565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000349050600061221c8873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214057600080fd5b505afa158015612154573d6000803e3d6000fd5b505050506040513d602081101561216a57600080fd5b810190808051906020019092919050505061220e8a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c457600080fd5b505afa1580156121d8573d6000803e3d6000fd5b505050506040513d60208110156121ee57600080fd5b810190808051906020019092919050505085612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561229c57600080fd5b505afa1580156122b0573d6000803e3d6000fd5b505050506040513d60208110156122c657600080fd5b8101908080519060200190929190505050101561234b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b61235488613210565b6123813389838b73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f1916602001820160405280156123d35781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561245b578082015181840152602081019050612440565b50505050905090810190601f1680156124885780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b505050506040513d60408110156124d257600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555034600081116126a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d602081101561271457600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6127f386613210565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561287457600080fd5b505af1158015612888573d6000803e3d6000fd5b505050506040513d604081101561289e57600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff166129d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612a69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612ab157600080fd5b505afa158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bf957600080fd5b505afa158015612c0d573d6000803e3d6000fd5b505050506040513d6020811015612c2357600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612cb457600080fd5b505afa158015612cc8573d6000803e3d6000fd5b505050506040513d6020811015612cde57600080fd5b81019080805190602001909291905050501015612d63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612d903388888473ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e1157600080fd5b505af1158015612e25573d6000803e3d6000fd5b505050506040513d6020811015612e3b57600080fd5b81019080805190602001909291905050509050612e5886886130a2565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612ef85760009050612f65565b6000828402905082848281612f0957fe5b0414612f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136d86021913960400191505060405180910390fd5b809150505b92915050565b6000612fad83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061337b565b905092915050565b61309c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613441565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561311757600080fd5b505af115801561312b573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461318f576040519150601f19603f3d011682016040523d82523d6000602084013e613194565b606091505b505090508061320b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327a57600080fd5b505af115801561328e573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561333c57600080fd5b505af1158015613350573d6000803e3d6000fd5b505050506040513d602081101561336657600080fd5b81019080805190602001909291905050505050565b60008083118290613427576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156133ec5780820151818401526020810190506133d1565b50505050905090810190601f1680156134195780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161343357fe5b049050809150509392505050565b6134608273ffffffffffffffffffffffffffffffffffffffff1661368c565b6134d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061352157805182526020820191506020810190506020830392506134fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613583576040519150601f19603f3d011682016040523d82523d6000602084013e613588565b606091505b509150915081613600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156136865780806020019051602081101561361f57600080fd5b8101908080519060200190929190505050613685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806136f9602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156136ce57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208f18a6eb2c0fe7d22b220449e16d113334c7e5a71c03a53b229bdab03bf0416564736f6c63430006020033", - "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061258d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612955565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a6130a2565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000349050600061221c8873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214057600080fd5b505afa158015612154573d6000803e3d6000fd5b505050506040513d602081101561216a57600080fd5b810190808051906020019092919050505061220e8a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c457600080fd5b505afa1580156121d8573d6000803e3d6000fd5b505050506040513d60208110156121ee57600080fd5b810190808051906020019092919050505085612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561229c57600080fd5b505afa1580156122b0573d6000803e3d6000fd5b505050506040513d60208110156122c657600080fd5b8101908080519060200190929190505050101561234b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b61235488613210565b6123813389838b73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f1916602001820160405280156123d35781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561245b578082015181840152602081019050612440565b50505050905090810190601f1680156124885780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b505050506040513d60408110156124d257600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555034600081116126a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d602081101561271457600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6127f386613210565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561287457600080fd5b505af1158015612888573d6000803e3d6000fd5b505050506040513d604081101561289e57600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff166129d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612a69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612ab157600080fd5b505afa158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bf957600080fd5b505afa158015612c0d573d6000803e3d6000fd5b505050506040513d6020811015612c2357600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612cb457600080fd5b505afa158015612cc8573d6000803e3d6000fd5b505050506040513d6020811015612cde57600080fd5b81019080805190602001909291905050501015612d63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612d903388888473ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e1157600080fd5b505af1158015612e25573d6000803e3d6000fd5b505050506040513d6020811015612e3b57600080fd5b81019080805190602001909291905050509050612e5886886130a2565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612ef85760009050612f65565b6000828402905082848281612f0957fe5b0414612f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136d86021913960400191505060405180910390fd5b809150505b92915050565b6000612fad83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061337b565b905092915050565b61309c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613441565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561311757600080fd5b505af115801561312b573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461318f576040519150601f19603f3d011682016040523d82523d6000602084013e613194565b606091505b505090508061320b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327a57600080fd5b505af115801561328e573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561333c57600080fd5b505af1158015613350573d6000803e3d6000fd5b505050506040513d602081101561336657600080fd5b81019080805190602001909291905050505050565b60008083118290613427576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156133ec5780820151818401526020810190506133d1565b50505050905090810190601f1680156134195780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161343357fe5b049050809150509392505050565b6134608273ffffffffffffffffffffffffffffffffffffffff1661368c565b6134d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061352157805182526020820191506020810190506020830392506134fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613583576040519150601f19603f3d011682016040523d82523d6000602084013e613588565b606091505b509150915081613600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156136865780806020019051602081101561361f57600080fd5b8101908080519060200190929190505050613685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806136f9602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156136ce57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208f18a6eb2c0fe7d22b220449e16d113334c7e5a71c03a53b229bdab03bf0416564736f6c63430006020033", + "bytecode": "0x608060405234801561001057600080fd5b50604051613b6c380380613b6c8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613abd806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212202677ac0bf4e435bdd5b20ff57f71f24b27bef436fe2ed5f0c29699f4d70f0bda64736f6c63430006020033", + "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212202677ac0bf4e435bdd5b20ff57f71f24b27bef436fe2ed5f0c29699f4d70f0bda64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/WethRouterLib.json b/artifacts/WethRouterLib.json new file mode 100644 index 00000000..f28a904c --- /dev/null +++ b/artifacts/WethRouterLib.json @@ -0,0 +1,8 @@ +{ + "contractName": "WethRouterLib", + "abi": [], + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200b5b7aacf8483db58be08c1609d82ad9da50e9eb356aa8a8c4217104f7c9436d64736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200b5b7aacf8483db58be08c1609d82ad9da50e9eb356aa8a8c4217104f7c9436d64736f6c63430006020033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index b564d2c6..39a48adc 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -20,7 +20,6 @@ import { } from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; // Primitive import { IOption } from "../../option/interfaces/IOption.sol"; -import { IRegistry } from "../../option/interfaces/IRegistry.sol"; import { ITrader } from "../../option/interfaces/ITrader.sol"; import { TraderLib } from "../../option/libraries/TraderLib.sol"; import { IWethConnector } from "../WETH/IWethConnector.sol"; @@ -40,12 +39,11 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { IUniswapV2Router02 public router; IUniswapV2Factory public factory; ITrader public trader; - IRegistry public registry; + IWethConnector public wethConnector; - address public quoteToken; // Designated stablecoin for Primitive. uint8 public constant VERSION = 2; - event Initialized(address indexed from, address indexed quoteToken); + event Initialized(address indexed from); event FlashedShortOption( address indexed from, uint256 quantity, @@ -67,20 +65,17 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address router_, address factory_, address trader_, - address registry_, - address quoteToken_ + address wethConnector_ ) external onlyOwner { require(address(router) == address(0x0), "ERR_INITIALIZED"); require(address(factory) == address(0x0), "ERR_INITIALIZED"); require(address(trader) == address(0x0), "ERR_INITIALIZED"); - require(address(registry) == address(0x0), "ERR_INITIALIZED"); - require(quoteToken == address(0x0), "ERR_INITIALIZED"); + require(address(wethConnector) == address(0x0), "ERR_INITIALIZED"); router = IUniswapV2Router02(router_); factory = IUniswapV2Factory(factory_); trader = ITrader(trader_); - registry = IRegistry(registry_); - quoteToken = quoteToken_; - emit Initialized(msg.sender, quoteToken_); + wethConnector = IWethConnector(wethConnector_); + emit Initialized(msg.sender); } // ==== Combo Operations ==== @@ -385,6 +380,70 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { return true; } + /** + * @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. + * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + * underlyingToken -> optionToken -> UNI-V2. + * @param optionAddress The address of the optionToken to mint then provide liquidity for. + * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. + * @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. + * @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. + * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. + * @param to The address that receives UNI-V2 shares. + * @param deadline The timestamp to expire a pending transaction. + */ + function addLongLiquidityWithETHUnderlying( + address optionAddress, + address otherTokenAddress, + uint256 quantityOtherTokens, + uint256 minOptionTokens, + uint256 minOtherTokens, + address to, + uint256 deadline + ) public payable nonReentrant returns (bool) { + // Store in memory for gas savings. + IUniswapV2Router02 router_ = router; + + // Pull otherTokens from msg.sender to add to Uniswap V2 Pair. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + IERC20(otherTokenAddress).safeTransferFrom( + msg.sender, + address(this), + quantityOtherTokens + ); + + // Pulls underlyingTokens from msg.sender to this contract. + // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + (uint256 outputOptions, uint256 outputRedeems) = wethConnector + .safeMintWithETH + .value(msg.value)(IOption(optionAddress), address(this)); + assert(outputOptions == msg.value); + + // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. + IERC20(optionAddress).approve(address(router_), uint256(-1)); + IERC20(otherTokenAddress).approve(address(router_), uint256(-1)); + + // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. + router_.addLiquidity( + optionAddress, + otherTokenAddress, + msg.value, + quantityOtherTokens, + minOptionTokens, + minOtherTokens, + to, + deadline + ); + + // Send shortOptionTokens (redeem) from minting option operation to msg.sender. + IERC20(IOption(optionAddress).redeemToken()).safeTransfer( + msg.sender, + outputRedeems + ); + return true; + } + /** * @dev Adds redeemToken liquidity to a redeem<>quote token pair by minting shortOptionTokens with underlyingTokens. * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. @@ -732,51 +791,16 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { // ==== Management Functions ==== /** - * @dev Creats a Uniswap pair for option<>quote tokens. + * @dev Creats a Uniswap pair for option<>other tokens. * @param optionAddress The address of the option to deploy a Uniswap V2 Pair for with the quoteToken. */ - function deployUniswapMarket(address optionAddress) + function deployUniswapMarket(address optionAddress, address otherToken) external returns (address) { - address uniswapPair = factory.createPair(optionAddress, quoteToken); + address uniswapPair = factory.createPair(optionAddress, otherToken); return uniswapPair; } // ==== View ==== - - /** - * @dev Gets a Uniswap Pair address for a token and quote token. - * @param tokenAddress The address of the token to get a Uniswap V2 Pair address for (with quoteToken). - */ - function getUniswapMarketForToken(address tokenAddress) - public - view - returns (address) - { - address uniswapPair = factory.getPair(tokenAddress, quoteToken); - require(uniswapPair != address(0x0), "ERR_PAIR_DOES_NOT_EXIST"); - return uniswapPair; - } - - /** - * @dev Gets a Uniswap Pair address for the corresponding option parameters. - */ - function getUniswapMarketForSeries( - address underlyingToken, - address strikeToken, - uint256 base, - uint256 quote, - uint256 expiry - ) public view returns (address) { - address optionAddress = registry.getOptionAddress( - underlyingToken, - strikeToken, - base, - quote, - expiry - ); - require(optionAddress != address(0x0), "ERR_OPTION_DOES_NOT_EXIST"); - return getUniswapMarketForToken(optionAddress); - } } diff --git a/contracts/connectors/WETH/WethConnector.sol b/contracts/connectors/WETH/WethConnector.sol index 4902982e..a95c5b80 100644 --- a/contracts/connectors/WETH/WethConnector.sol +++ b/contracts/connectors/WETH/WethConnector.sol @@ -16,6 +16,7 @@ import { IWETH } from "./IWETH.sol"; import { IOption } from "../../option/interfaces/IOption.sol"; import { TraderLib } from "../../option/libraries/TraderLib.sol"; import { IWethConnector } from "./IWethConnector.sol"; +import { WethRouterLib } from "./WethRouterLib.sol"; // Open Zeppelin import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; @@ -99,17 +100,8 @@ contract WethConnector is IWethConnector, ReentrancyGuard { nonZero(msg.value) returns (uint256, uint256) { - // Check to make sure we are minting a WETH call option. - address underlyingAddress = optionToken.getUnderlyingTokenAddress(); - require(address(weth) == underlyingAddress, "ERR_NOT_WETH"); - - // Convert ethers into WETH, then send WETH to option contract in preparation of calling mintOptions(). - _depositEthSendWeth(address(optionToken)); - - // Mint the option and redeem tokens. - (uint256 outputOptions, uint256 outputRedeems) = optionToken - .mintOptions(receiver); - + (uint256 outputOptions, uint256 outputRedeems) = WethRouterLib + .safeMintWithETH(weth, optionToken, receiver); emit WethConnectorMint( msg.sender, address(optionToken), @@ -137,43 +129,8 @@ contract WethConnector is IWethConnector, ReentrancyGuard { nonZero(msg.value) returns (uint256, uint256) { - // Require one of the option's assets to be WETH. - address strikeAddress = optionToken.getStrikeTokenAddress(); - require(strikeAddress == address(weth), "ERR_NOT_WETH"); - - uint256 inputStrikes = msg.value; - // Calculate quantity of optionTokens needed to burn. - // An ether put option with strike price $300 has a "base" value of 300, and a "quote" value of 1. - // To calculate how many options are needed to be burned, we need to cancel out the "quote" units. - // The input strike quantity can be multiplied by the strike ratio to cancel out "quote" units. - // 1 ether (quote units) * 300 (base units) / 1 (quote units) = 300 inputOptions - uint256 inputOptions = inputStrikes.mul(optionToken.getBaseValue()).div( - optionToken.getQuoteValue() - ); - - // Fail early if msg.sender does not have enough optionTokens to burn. - require( - IERC20(address(optionToken)).balanceOf(msg.sender) >= inputOptions, - "ERR_BAL_OPTIONS" - ); - - // Wrap the ethers into WETH, and send the WETH to the option contract to prepare for calling exerciseOptions(). - _depositEthSendWeth(address(optionToken)); - - // Send the option tokens required to prepare for calling exerciseOptions(). - IERC20(address(optionToken)).safeTransferFrom( - msg.sender, - address(optionToken), - inputOptions - ); - - // Burns the transferred option tokens, stores the strike asset (ether), and pushes underlyingTokens - // to the receiver address. - (inputStrikes, inputOptions) = optionToken.exerciseOptions( - receiver, - inputOptions, - new bytes(0) - ); + (uint256 inputStrikes, uint256 inputOptions) = WethRouterLib + .safeExerciseWithETH(weth, optionToken, receiver); emit WethConnectorExercise( msg.sender, @@ -205,54 +162,8 @@ contract WethConnector is IWethConnector, ReentrancyGuard { nonZero(exerciseQuantity) returns (uint256, uint256) { - // Require one of the option's assets to be WETH. - address underlyingAddress = optionToken.getUnderlyingTokenAddress(); - address strikeAddress = optionToken.getStrikeTokenAddress(); - require(underlyingAddress == address(weth), "ERR_NOT_WETH"); - - // Fails early if msg.sender does not have enough optionTokens. - require( - IERC20(address(optionToken)).balanceOf(msg.sender) >= - exerciseQuantity, - "ERR_BAL_OPTIONS" - ); - - // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens. - uint256 inputStrikes = exerciseQuantity - .mul(optionToken.getQuoteValue()) - .div(optionToken.getBaseValue()); - - // Fails early if msg.sender does not have enough strikeTokens. - require( - IERC20(strikeAddress).balanceOf(msg.sender) >= inputStrikes, - "ERR_BAL_STRIKE" - ); - - // Send strikeTokens to option contract to prepare for calling exerciseOptions(). - IERC20(strikeAddress).safeTransferFrom( - msg.sender, - address(optionToken), - inputStrikes - ); - - // Send the option tokens to prepare for calling exerciseOptions(). - IERC20(address(optionToken)).safeTransferFrom( - msg.sender, - address(optionToken), - exerciseQuantity - ); - - // Burns the optionTokens sent, stores the strikeTokens sent, and pushes underlyingTokens - // to this contract. - uint256 inputOptions; - (inputStrikes, inputOptions) = optionToken.exerciseOptions( - address(this), - exerciseQuantity, - new bytes(0) - ); - - // Converts the withdrawn WETH to ethers, then sends the ethers to the receiver address. - _withdrawEthAndSend(receiver, exerciseQuantity); + (uint256 inputStrikes, uint256 inputOptions) = WethRouterLib + .safeExerciseForETH(weth, optionToken, exerciseQuantity, receiver); emit WethConnectorExercise( msg.sender, @@ -277,32 +188,13 @@ contract WethConnector is IWethConnector, ReentrancyGuard { uint256 redeemQuantity, address receiver ) external override nonReentrant nonZero(redeemQuantity) returns (uint256) { - // Require strikeToken to be WETH. - address strikeAddress = optionToken.getStrikeTokenAddress(); - require(strikeAddress == address(weth), "ERR_NOT_WETH"); - - // Fail early if msg.sender does not have enough redeemTokens. - address redeemAddress = optionToken.redeemToken(); - require( - IERC20(redeemAddress).balanceOf(msg.sender) >= redeemQuantity, - "ERR_BAL_REDEEM" + uint256 inputRedeems = WethRouterLib.safeRedeemForETH( + weth, + optionToken, + redeemQuantity, + receiver ); - // Send redeemTokens to option contract in preparation for calling redeemStrikeTokens(). - IERC20(redeemAddress).safeTransferFrom( - msg.sender, - address(optionToken), - redeemQuantity - ); - - // If options have not been exercised, there will be no strikeTokens to redeem, causing a revert. - // Burns the redeem tokens that were sent to the contract, and withdraws the same quantity of WETH. - // Sends the withdrawn WETH to this contract, so that it can be unwrapped prior to being sent to receiver. - uint256 inputRedeems = optionToken.redeemStrikeTokens(address(this)); - - // Unwrap the redeemed WETH and then send the ethers to the receiver. - _withdrawEthAndSend(receiver, redeemQuantity); - emit WethConnectorRedeem( msg.sender, address(optionToken), @@ -336,50 +228,16 @@ contract WethConnector is IWethConnector, ReentrancyGuard { uint256 ) { - // Require the optionToken to have WETH as the underlying asset. - address underlyingAddress = optionToken.getUnderlyingTokenAddress(); - require(address(weth) == underlyingAddress, "ERR_NOT_WETH"); - - // Fail early if msg.sender does not have enough optionTokens to burn. - require( - IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity, - "ERR_BAL_OPTIONS" - ); - - // Calculate the quantity of redeemTokens that need to be burned. - uint256 inputRedeems = closeQuantity - .mul(optionToken.getQuoteValue()) - .div(optionToken.getBaseValue()); - - // Fail early is msg.sender does not have enough redeemTokens to burn. - require( - IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >= - inputRedeems, - "ERR_BAL_REDEEM" - ); - - // Send redeem and option tokens in preparation of calling closeOptions(). - IERC20(optionToken.redeemToken()).safeTransferFrom( - msg.sender, - address(optionToken), - inputRedeems + ( + uint256 inputRedeems, + uint256 inputOptions, + uint256 outUnderlyings + ) = WethRouterLib.safeCloseForETH( + weth, + optionToken, + closeQuantity, + receiver ); - IERC20(address(optionToken)).safeTransferFrom( - msg.sender, - address(optionToken), - closeQuantity - ); - - // Call the closeOptions() function to burn option and redeem tokens and withdraw underlyingTokens. - uint256 inputOptions; - uint256 outUnderlyings; - (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions( - address(this) - ); - - // Since underlyngTokens are WETH, unwrap them then send the ethers to the receiver. - _withdrawEthAndSend(receiver, closeQuantity); - emit WethConnectorClose(msg.sender, address(optionToken), inputOptions); return (inputRedeems, inputOptions, outUnderlyings); } @@ -407,43 +265,17 @@ contract WethConnector is IWethConnector, ReentrancyGuard { uint256 ) { - // Require the optionToken to have WETH as the underlying asset. - address underlyingAddress = optionToken.getUnderlyingTokenAddress(); - require(address(weth) == underlyingAddress, "ERR_NOT_WETH"); - - // If the option is not expired, fail early. - // solhint-disable-next-line not-rely-on-time - require(optionToken.getExpiryTime() < now, "ERR_NOT_EXPIRED"); - - // Calculate the quantity of redeemTokens that need to be burned. - uint256 inputRedeems = unwindQuantity - .mul(optionToken.getQuoteValue()) - .div(optionToken.getBaseValue()); - - // Fail early if msg.sender does not have enough redeemTokens to burn. - require( - IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >= - inputRedeems, - "ERR_BAL_REDEEM" + ( + uint256 inputRedeems, + uint256 inputOptions, + uint256 outUnderlyings + ) = WethRouterLib.safeUnwindForETH( + weth, + optionToken, + unwindQuantity, + receiver ); - // Send redeem in preparation of calling closeOptions(). - IERC20(optionToken.redeemToken()).safeTransferFrom( - msg.sender, - address(optionToken), - inputRedeems - ); - - // Call the closeOptions() function to burn redeem tokens and withdraw underlyingTokens. - uint256 inputOptions; - uint256 outUnderlyings; - (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions( - address(this) - ); - - // Since underlyngTokens are WETH, unwrap them to ethers then send the ethers to the receiver. - _withdrawEthAndSend(receiver, unwindQuantity); - emit WethConnectorUnwind( msg.sender, address(optionToken), @@ -451,34 +283,4 @@ contract WethConnector is IWethConnector, ReentrancyGuard { ); return (inputRedeems, inputOptions, outUnderlyings); } - - // ==== WETH Operations ==== - - /** - * @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to "to". - * @param to The address to send WETH ERC-20 tokens to. - */ - function _depositEthSendWeth(address to) internal { - // Deposit the ethers received from msg.value into the WETH contract. - weth.deposit.value(msg.value)(); - - // Send WETH. - weth.transfer(to, msg.value); - } - - /** - * @dev Unwraps WETH to withrdaw ethers, which are then sent to the "to" address. - * @param to The address to send withdrawn ethers to. - * @param quantity The quantity of WETH to unwrap. - */ - function _withdrawEthAndSend(address to, uint256 quantity) internal { - // Withdraw ethers with weth. - weth.withdraw(quantity); - - // Send ether. - (bool success, ) = to.call.value(quantity)(""); - - // Revert is call is unsuccessful. - require(success, "ERR_SENDING_ETHER"); - } } diff --git a/contracts/connectors/WETH/WethRouterLib.sol b/contracts/connectors/WETH/WethRouterLib.sol new file mode 100644 index 00000000..239203e0 --- /dev/null +++ b/contracts/connectors/WETH/WethRouterLib.sol @@ -0,0 +1,393 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.6.2; + +/** + * @title Weth Connector for bridging ether to WETH Primitive options. + * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use. + * Manages operations involving options with WETH as the underlying or strike asset. + * Accepts deposits in ethers and withdraws ethers. + * @author Primitive + */ + +// WETH Interface +import { IWETH } from "./IWETH.sol"; +// Primitive +import { IOption } from "../../option/interfaces/IOption.sol"; +import { TraderLib } from "../../option/libraries/TraderLib.sol"; +import { IWethConnector } from "./IWethConnector.sol"; +// Open Zeppelin +import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; +import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; + +library WethRouterLib { + using SafeMath for uint256; + using SafeERC20 for IERC20; + + /** + * @dev Checks the quantity of an operation to make sure its not zero. Fails early. + */ + modifier nonZero(uint256 quantity) { + require(quantity > 0, "ERR_ZERO"); + _; + } + + // ==== Operation Functions ==== + + /** + * @dev Mints msg.value quantity of options and "quote" (option parameter) quantity of redeem tokens. + * @notice This function is for options that have WETH as the underlying asset. + * @param optionToken The address of the option token to mint. + * @param receiver The address which receives the minted option and redeem tokens. + */ + function safeMintWithETH( + IWETH weth, + IOption optionToken, + address receiver + ) internal nonZero(msg.value) returns (uint256, uint256) { + // Check to make sure we are minting a WETH call option. + address underlyingAddress = optionToken.getUnderlyingTokenAddress(); + require(address(weth) == underlyingAddress, "ERR_NOT_WETH"); + + // Convert ethers into WETH, then send WETH to option contract in preparation of calling mintOptions(). + _depositEthSendWeth(weth, address(optionToken)); + + // Mint the option and redeem tokens. + (uint256 outputOptions, uint256 outputRedeems) = optionToken + .mintOptions(receiver); + + return (outputOptions, outputRedeems); + } + + /** + * @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens. + * Uses the strike ratio as the exchange rate. Strike ratio = base / quote. + * Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw. + * @notice This function is for options with WETH as the strike asset. + * Burns option tokens, accepts ethers, and pushes out underlyingTokens. + * @param optionToken The address of the option contract. + * @param receiver The underlyingTokens are sent to the receiver address. + */ + function safeExerciseWithETH( + IWETH weth, + IOption optionToken, + address receiver + ) internal nonZero(msg.value) returns (uint256, uint256) { + // Require one of the option's assets to be WETH. + address strikeAddress = optionToken.getStrikeTokenAddress(); + require(strikeAddress == address(weth), "ERR_NOT_WETH"); + + uint256 inputStrikes = msg.value; + // Calculate quantity of optionTokens needed to burn. + // An ether put option with strike price $300 has a "base" value of 300, and a "quote" value of 1. + // To calculate how many options are needed to be burned, we need to cancel out the "quote" units. + // The input strike quantity can be multiplied by the strike ratio to cancel out "quote" units. + // 1 ether (quote units) * 300 (base units) / 1 (quote units) = 300 inputOptions + uint256 inputOptions = inputStrikes.mul(optionToken.getBaseValue()).div( + optionToken.getQuoteValue() + ); + + // Fail early if msg.sender does not have enough optionTokens to burn. + require( + IERC20(address(optionToken)).balanceOf(msg.sender) >= inputOptions, + "ERR_BAL_OPTIONS" + ); + + // Wrap the ethers into WETH, and send the WETH to the option contract to prepare for calling exerciseOptions(). + _depositEthSendWeth(weth, address(optionToken)); + + // Send the option tokens required to prepare for calling exerciseOptions(). + IERC20(address(optionToken)).safeTransferFrom( + msg.sender, + address(optionToken), + inputOptions + ); + + // Burns the transferred option tokens, stores the strike asset (ether), and pushes underlyingTokens + // to the receiver address. + (inputStrikes, inputOptions) = optionToken.exerciseOptions( + receiver, + inputOptions, + new bytes(0) + ); + + return (inputStrikes, inputOptions); + } + + /** + * @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. + * Uses the strike ratio as the exchange rate. Strike ratio = base / quote. + * @notice This function is for options with WETH as the underlying asset. + * Burns option tokens, pulls strikeTokens, and pushes out ethers. + * @param optionToken The address of the option contract. + * @param exerciseQuantity Quantity of optionTokens to exercise. + * @param receiver The underlyingTokens (ethers) are sent to the receiver address. + */ + function safeExerciseForETH( + IWETH weth, + IOption optionToken, + uint256 exerciseQuantity, + address receiver + ) internal nonZero(exerciseQuantity) returns (uint256, uint256) { + // Require one of the option's assets to be WETH. + address underlyingAddress = optionToken.getUnderlyingTokenAddress(); + address strikeAddress = optionToken.getStrikeTokenAddress(); + require(underlyingAddress == address(weth), "ERR_NOT_WETH"); + + // Fails early if msg.sender does not have enough optionTokens. + require( + IERC20(address(optionToken)).balanceOf(msg.sender) >= + exerciseQuantity, + "ERR_BAL_OPTIONS" + ); + + // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens. + uint256 inputStrikes = exerciseQuantity + .mul(optionToken.getQuoteValue()) + .div(optionToken.getBaseValue()); + + // Fails early if msg.sender does not have enough strikeTokens. + require( + IERC20(strikeAddress).balanceOf(msg.sender) >= inputStrikes, + "ERR_BAL_STRIKE" + ); + + // Send strikeTokens to option contract to prepare for calling exerciseOptions(). + IERC20(strikeAddress).safeTransferFrom( + msg.sender, + address(optionToken), + inputStrikes + ); + + // Send the option tokens to prepare for calling exerciseOptions(). + IERC20(address(optionToken)).safeTransferFrom( + msg.sender, + address(optionToken), + exerciseQuantity + ); + + // Burns the optionTokens sent, stores the strikeTokens sent, and pushes underlyingTokens + // to this contract. + uint256 inputOptions; + (inputStrikes, inputOptions) = optionToken.exerciseOptions( + address(this), + exerciseQuantity, + new bytes(0) + ); + + // Converts the withdrawn WETH to ethers, then sends the ethers to the receiver address. + _withdrawEthAndSend(weth, receiver, exerciseQuantity); + + return (inputStrikes, inputOptions); + } + + /** + * @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio. + * @notice This function is for options that have WETH as the strike asset. + * Converts WETH to ethers, and withdraws ethers to the receiver address. + * @param optionToken The address of the option contract. + * @param redeemQuantity The quantity of redeemTokens to burn. + * @param receiver The strikeTokens (ethers) are sent to the receiver address. + */ + function safeRedeemForETH( + IWETH weth, + IOption optionToken, + uint256 redeemQuantity, + address receiver + ) internal nonZero(redeemQuantity) returns (uint256) { + // Require strikeToken to be WETH. + address strikeAddress = optionToken.getStrikeTokenAddress(); + require(strikeAddress == address(weth), "ERR_NOT_WETH"); + + // Fail early if msg.sender does not have enough redeemTokens. + address redeemAddress = optionToken.redeemToken(); + require( + IERC20(redeemAddress).balanceOf(msg.sender) >= redeemQuantity, + "ERR_BAL_REDEEM" + ); + + // Send redeemTokens to option contract in preparation for calling redeemStrikeTokens(). + IERC20(redeemAddress).safeTransferFrom( + msg.sender, + address(optionToken), + redeemQuantity + ); + + // If options have not been exercised, there will be no strikeTokens to redeem, causing a revert. + // Burns the redeem tokens that were sent to the contract, and withdraws the same quantity of WETH. + // Sends the withdrawn WETH to this contract, so that it can be unwrapped prior to being sent to receiver. + uint256 inputRedeems = optionToken.redeemStrikeTokens(address(this)); + + // Unwrap the redeemed WETH and then send the ethers to the receiver. + _withdrawEthAndSend(weth, receiver, redeemQuantity); + + return inputRedeems; + } + + /** + * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers). + * @notice This function is for options with WETH as the underlying asset. + * WETH underlyingTokens are converted to ethers before being sent to receiver. + * The redeemTokens to burn is equal to the optionTokens * strike ratio. + * inputOptions = inputRedeems / strike ratio = outUnderlyings + * @param optionToken The address of the option contract. + * @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn. + * @param receiver The underlyingTokens (ethers) are sent to the receiver address. + */ + function safeCloseForETH( + IWETH weth, + IOption optionToken, + uint256 closeQuantity, + address receiver + ) + internal + nonZero(closeQuantity) + returns ( + uint256, + uint256, + uint256 + ) + { + // Require the optionToken to have WETH as the underlying asset. + address underlyingAddress = optionToken.getUnderlyingTokenAddress(); + require(address(weth) == underlyingAddress, "ERR_NOT_WETH"); + + // Fail early if msg.sender does not have enough optionTokens to burn. + require( + IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity, + "ERR_BAL_OPTIONS" + ); + + // Calculate the quantity of redeemTokens that need to be burned. + uint256 inputRedeems = closeQuantity + .mul(optionToken.getQuoteValue()) + .div(optionToken.getBaseValue()); + + // Fail early is msg.sender does not have enough redeemTokens to burn. + require( + IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >= + inputRedeems, + "ERR_BAL_REDEEM" + ); + + // Send redeem and option tokens in preparation of calling closeOptions(). + IERC20(optionToken.redeemToken()).safeTransferFrom( + msg.sender, + address(optionToken), + inputRedeems + ); + IERC20(address(optionToken)).safeTransferFrom( + msg.sender, + address(optionToken), + closeQuantity + ); + + // Call the closeOptions() function to burn option and redeem tokens and withdraw underlyingTokens. + uint256 inputOptions; + uint256 outUnderlyings; + (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions( + address(this) + ); + + // Since underlyngTokens are WETH, unwrap them then send the ethers to the receiver. + _withdrawEthAndSend(weth, receiver, closeQuantity); + + return (inputRedeems, inputOptions, outUnderlyings); + } + + /** + * @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. + * This function is for options with WETH as the underlying asset. + * The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver. + * @param optionToken The address of the option contract. + * @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw. + * @param receiver The underlyingTokens (ethers) are sent to the receiver address. + */ + function safeUnwindForETH( + IWETH weth, + IOption optionToken, + uint256 unwindQuantity, + address receiver + ) + internal + nonZero(unwindQuantity) + returns ( + uint256, + uint256, + uint256 + ) + { + // Require the optionToken to have WETH as the underlying asset. + address underlyingAddress = optionToken.getUnderlyingTokenAddress(); + require(address(weth) == underlyingAddress, "ERR_NOT_WETH"); + + // If the option is not expired, fail early. + // solhint-disable-next-line not-rely-on-time + require(optionToken.getExpiryTime() < now, "ERR_NOT_EXPIRED"); + + // Calculate the quantity of redeemTokens that need to be burned. + uint256 inputRedeems = unwindQuantity + .mul(optionToken.getQuoteValue()) + .div(optionToken.getBaseValue()); + + // Fail early if msg.sender does not have enough redeemTokens to burn. + require( + IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >= + inputRedeems, + "ERR_BAL_REDEEM" + ); + + // Send redeem in preparation of calling closeOptions(). + IERC20(optionToken.redeemToken()).safeTransferFrom( + msg.sender, + address(optionToken), + inputRedeems + ); + + // Call the closeOptions() function to burn redeem tokens and withdraw underlyingTokens. + uint256 inputOptions; + uint256 outUnderlyings; + (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions( + address(this) + ); + + // Since underlyngTokens are WETH, unwrap them to ethers then send the ethers to the receiver. + _withdrawEthAndSend(weth, receiver, unwindQuantity); + return (inputRedeems, inputOptions, outUnderlyings); + } + + // ==== WETH Operations ==== + + /** + * @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to "to". + * @param to The address to send WETH ERC-20 tokens to. + */ + function _depositEthSendWeth(IWETH weth, address to) internal { + // Deposit the ethers received from msg.value into the WETH contract. + weth.deposit.value(msg.value)(); + + // Send WETH. + weth.transfer(to, msg.value); + } + + /** + * @dev Unwraps WETH to withrdaw ethers, which are then sent to the "to" address. + * @param to The address to send withdrawn ethers to. + * @param quantity The quantity of WETH to unwrap. + */ + function _withdrawEthAndSend( + IWETH weth, + address to, + uint256 quantity + ) internal { + // Withdraw ethers with weth. + weth.withdraw(quantity); + + // Send ether. + (bool success, ) = to.call.value(quantity)(""); + + // Revert is call is unsuccessful. + require(success, "ERR_SENDING_ETHER"); + } +} diff --git a/test/lib/setup.js b/test/lib/setup.js index 4e36c70d..5808de12 100644 --- a/test/lib/setup.js +++ b/test/lib/setup.js @@ -248,10 +248,10 @@ const newTrader = async (signer, weth) => { * @param {*} weth The address of WETH for the respective network. */ const newWethConnector = async (signer, weth) => { - const trader = await deployContract(signer, WethConnector, [weth], { + const wethConnector = await deployContract(signer, WethConnector, [weth], { gasLimit: 6000000, }); - return trader; + return wethConnector; }; /** diff --git a/test/test_uni_connector.js b/test/test_uni_connector.js index 86e2e7e7..ece57d49 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.js @@ -24,7 +24,7 @@ describe("UniswapConnector", () => { let underlyingToken, strikeToken; let base, quote, expiry; let Primitive, registry; - let uniswapFactory, uniswapRouter, uniswapConnector; + let uniswapFactory, uniswapRouter, uniswapConnector, wethConnector; before(async () => { let signers = await setup.newWallets(); @@ -77,6 +77,9 @@ describe("UniswapConnector", () => { // Trader Instance trader = await setup.newTrader(Admin, weth.address); + // Weth connector instance + wethConnector = await setup.newWethConnector(Admin, weth.address); + // Initialize the uniswap connector with addresses /* await uniswapConnector.initialize( uniswapRouter.address, @@ -208,7 +211,8 @@ describe("UniswapConnector", () => { uniswapFactory.address, trader.address, registry.address, - quoteToken.address + quoteToken.address, + wethConnector.address ) ) .to.emit(uniswapConnector, "Initialized") @@ -694,7 +698,8 @@ describe("UniswapConnector", () => { uniswapFactory.address, trader.address, registry.address, - quoteToken.address + quoteToken.address, + wethConnector.address ); // Approve tokens to be sent to trader contract From 104ada184164592637ef765b418722a282687414 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 10:48:11 -0700 Subject: [PATCH 11/20] WethConnector upgrade finished. --- artifacts/WethConnector.json | 4 ++-- artifacts/WethRouterLib.json | 4 ++-- contracts/connectors/WETH/WethConnector.sol | 1 - contracts/connectors/WETH/WethRouterLib.sol | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/artifacts/WethConnector.json b/artifacts/WethConnector.json index 694f6b5b..5114d704 100644 --- a/artifacts/WethConnector.json +++ b/artifacts/WethConnector.json @@ -366,8 +366,8 @@ "type": "receive" } ], - "bytecode": "0x608060405234801561001057600080fd5b50604051613b6c380380613b6c8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613abd806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212202677ac0bf4e435bdd5b20ff57f71f24b27bef436fe2ed5f0c29699f4d70f0bda64736f6c63430006020033", - "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212202677ac0bf4e435bdd5b20ff57f71f24b27bef436fe2ed5f0c29699f4d70f0bda64736f6c63430006020033", + "bytecode": "0x608060405234801561001057600080fd5b50604051613b6c380380613b6c8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613abd806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208654b616e1628cfc11ccb25ccf5db3f3108ae72a58913efb92bc9014c62e4e5864736f6c63430006020033", + "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208654b616e1628cfc11ccb25ccf5db3f3108ae72a58913efb92bc9014c62e4e5864736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/WethRouterLib.json b/artifacts/WethRouterLib.json index f28a904c..1368af34 100644 --- a/artifacts/WethRouterLib.json +++ b/artifacts/WethRouterLib.json @@ -1,8 +1,8 @@ { "contractName": "WethRouterLib", "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200b5b7aacf8483db58be08c1609d82ad9da50e9eb356aa8a8c4217104f7c9436d64736f6c63430006020033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200b5b7aacf8483db58be08c1609d82ad9da50e9eb356aa8a8c4217104f7c9436d64736f6c63430006020033", + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122028d9f8ed6e5425a7a355871bee0c323ebef956fffa58a924653a7e100f76c64f64736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122028d9f8ed6e5425a7a355871bee0c323ebef956fffa58a924653a7e100f76c64f64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/WETH/WethConnector.sol b/contracts/connectors/WETH/WethConnector.sol index a95c5b80..962cca79 100644 --- a/contracts/connectors/WETH/WethConnector.sol +++ b/contracts/connectors/WETH/WethConnector.sol @@ -14,7 +14,6 @@ pragma solidity 0.6.2; import { IWETH } from "./IWETH.sol"; // Primitive import { IOption } from "../../option/interfaces/IOption.sol"; -import { TraderLib } from "../../option/libraries/TraderLib.sol"; import { IWethConnector } from "./IWethConnector.sol"; import { WethRouterLib } from "./WethRouterLib.sol"; // Open Zeppelin diff --git a/contracts/connectors/WETH/WethRouterLib.sol b/contracts/connectors/WETH/WethRouterLib.sol index 239203e0..9f84c218 100644 --- a/contracts/connectors/WETH/WethRouterLib.sol +++ b/contracts/connectors/WETH/WethRouterLib.sol @@ -14,7 +14,6 @@ pragma solidity 0.6.2; import { IWETH } from "./IWETH.sol"; // Primitive import { IOption } from "../../option/interfaces/IOption.sol"; -import { TraderLib } from "../../option/libraries/TraderLib.sol"; import { IWethConnector } from "./IWethConnector.sol"; // Open Zeppelin import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; From 6d4fcd0d857fbd945461351818770aa88bc30c43 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 12:42:07 -0700 Subject: [PATCH 12/20] Cleaned up left over state variables in connector. Hooked to lib. --- artifacts/IWethConnector.json | 13 + artifacts/UniswapConnector.json | 93 +-- artifacts/UniswapConnectorLib.json | 8 + artifacts/WethConnector.json | 4 +- artifacts/WethRouterLib.json | 4 +- .../connectors/Uniswap/UniswapConnector.sol | 360 ++------- .../Uniswap/UniswapConnectorLib.sol | 761 ++++++++++++++++++ contracts/connectors/WETH/IWethConnector.sol | 3 + contracts/connectors/WETH/WethConnector.sol | 2 +- test/test_uni_connector.js | 35 +- 10 files changed, 879 insertions(+), 404 deletions(-) create mode 100644 artifacts/UniswapConnectorLib.json create mode 100644 contracts/connectors/Uniswap/UniswapConnectorLib.sol diff --git a/artifacts/IWethConnector.json b/artifacts/IWethConnector.json index 7dcea632..6a63a6a8 100644 --- a/artifacts/IWethConnector.json +++ b/artifacts/IWethConnector.json @@ -199,6 +199,19 @@ ], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [], + "name": "weth", + "outputs": [ + { + "internalType": "contract IWETH", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" } ], "bytecode": "0x", diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index c3e9b7fd..51bb682d 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -107,55 +107,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "optionAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "otherTokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "quantityOtherTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minOptionTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minOtherTokens", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "addLongLiquidityWithETHUnderlying", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "payable", - "type": "function" - }, { "inputs": [ { @@ -349,22 +300,41 @@ "inputs": [ { "internalType": "address", - "name": "router_", + "name": "token0", "type": "address" }, { "internalType": "address", - "name": "factory_", + "name": "token1", + "type": "address" + } + ], + "name": "getUniswapMarketForTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "router_", "type": "address" }, { "internalType": "address", - "name": "trader_", + "name": "factory_", "type": "address" }, { "internalType": "address", - "name": "wethConnector_", + "name": "trader_", "type": "address" } ], @@ -748,23 +718,10 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" - }, - { - "inputs": [], - "name": "wethConnector", - "outputs": [ - { - "internalType": "contract IWethConnector", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615df780620000fb6000396000f3fe60806040526004361061012a5760003560e01c8063b17d0570116100ab578063d9b361251161006f578063d9b3612514610b92578063f2fde38b14610c8e578063f887ea4014610cdf578063f8c8765e14610d36578063fdf9145c14610de7578063ffa1ad7414610eab5761012a565b8063b17d0570146107bd578063c45a01551461090e578063cc84fde714610965578063cd04552414610a39578063d580c62214610ab65761012a565b806369d12e14116100f257806369d12e14146104e9578063715018a6146105bd5780638658ded9146105d45780638da5cb5b1461062b57806395f0ae76146106825761012a565b806301c6a4501461012f57806310d1e85c1461020b5780631758078b146102c5578063667872561461031c57806369bd26cd14610438575b600080fd5b34801561013b57600080fd5b506101f1600480360361010081101561015357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610edc565b604051808215151515815260200191505060405180910390f35b34801561021757600080fd5b506102c36004803603608081101561022e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561027f57600080fd5b82018360208201111561029157600080fd5b803590602001918460018302840111640100000000831117156102b357600080fd5b90919293919293905050506113e8565b005b3480156102d157600080fd5b506102da611517565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032857600080fd5b5061041e600480360361014081101561034057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061153d565b604051808215151515815260200191505060405180910390f35b34801561044457600080fd5b506104a76004803603604081101561045b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611668565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104f557600080fd5b506105a0600480360360e081101561050c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611787565b604051808381526020018281526020019250505060405180910390f35b3480156105c957600080fd5b506105d261212e565b005b3480156105e057600080fd5b506105e96122b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561063757600080fd5b506106406122dc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068e57600080fd5b506107a3600480360360c08110156106a557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156106f657600080fd5b82018360208201111561070857600080fd5b8035906020019184602083028401116401000000008311171561072a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612305565b604051808215151515815260200191505060405180910390f35b3480156107c957600080fd5b506108f4600480360360c08110156107e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561085157600080fd5b82018360208201111561086357600080fd5b8035906020019184602083028401116401000000008311171561088557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612460565b604051808215151515815260200191505060405180910390f35b34801561091a57600080fd5b50610923612a90565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561097157600080fd5b50610a1c600480360360e081101561098857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ab6565b604051808381526020018281526020019250505060405180910390f35b348015610a4557600080fd5b50610a9c60048036036060811015610a5c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613429565b604051808215151515815260200191505060405180910390f35b348015610ac257600080fd5b50610b786004803603610100811015610ada57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613bf3565b604051808215151515815260200191505060405180910390f35b348015610b9e57600080fd5b50610c74600480360360c0811015610bb557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610c0657600080fd5b820183602082011115610c1857600080fd5b80359060200191846020830284011164010000000083111715610c3a57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506140fc565b604051808215151515815260200191505060405180910390f35b348015610c9a57600080fd5b50610cdd60048036036020811015610cb157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614293565b005b348015610ceb57600080fd5b50610cf46144a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d4257600080fd5b50610de560048036036080811015610d5957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506144c6565b005b610e91600480360360e0811015610dfd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506149ec565b604051808215151515815260200191505060405180910390f35b348015610eb757600080fd5b50610ec0615006565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610f5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610fcd3330898c73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080610fdb8c8b306150f8565b91509150898214610fe857fe5b8b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561108f57600080fd5b505af11580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561117257600080fd5b505af1158015611186573d6000803e3d6000fd5b505050506040513d602081101561119c57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008d8d8d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156112bd57600080fd5b505af11580156112d1573d6000803e3d6000fd5b505050506040513d60608110156112e757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506113ba33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561135a57600080fd5b505afa15801561136e573d6000803e3d6000fd5b505050506040513d602081101561138457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611457576040519150601f19603f3d011682016040523d82523d6000602084013e61145c565b606091505b509150915081801561149c575060008151148061149b575080806020019051602081101561148957600080fd5b81019080805190602001909291905050505b5b61150e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008061154f8c8c8989898989612ab6565b50905060006115648b8b848c8b8b8b8b610edc565b9050806115d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248b6040518082815260200191505060405180910390a480925050509a9950505050505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561174057600080fd5b505af1158015611754573d6000803e3d6000fd5b505050506040513d602081101561176a57600080fd5b810190808051906020019092919050505090508091505092915050565b600080600060149054906101000a900460ff1661180c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561186e57600080fd5b505afa158015611882573d6000803e3d6000fd5b505050506040513d602081101561189857600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905848d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156119a757600080fd5b505afa1580156119bb573d6000803e3d6000fd5b505050506040513d60208110156119d157600080fd5b81019080805190602001909291905050509050611a1133308c8473ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611ab857600080fd5b505af1158015611acc573d6000803e3d6000fd5b505050506040513d6020811015611ae257600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde858e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015611bfe57600080fd5b505af1158015611c12573d6000803e3d6000fd5b505050506040513d6040811015611c2857600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611d1a57600080fd5b505af1158015611d2e573d6000803e3d6000fd5b505050506040513d6020811015611d4457600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611dfd57600080fd5b505af1158015611e11573d6000803e3d6000fd5b505050506040513d6020811015611e2757600080fd5b8101908080519060200190929190505050506000611f93670de0b6b3a7640000611f858473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8f57600080fd5b505afa158015611ea3573d6000803e3d6000fd5b505050506040513d6020811015611eb957600080fd5b8101908080519060200190929190505050611f77670de0b6b3a7640000611f698873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611f1f57600080fd5b505afa158015611f33573d6000803e3d6000fd5b505050506040513d6020811015611f4957600080fd5b81019080805190602001909291905050508c6153b090919063ffffffff16565b6153b090919063ffffffff16565b61543690919063ffffffff16565b61543690919063ffffffff16565b9050611fc23330838573ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838e6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561207d57600080fd5b505af1158015612091573d6000803e3d6000fd5b505050506040513d60608110156120a757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050506120fd88828e73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b818195509550505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b612136615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060006123158989306150f8565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561236157600080fd5b505afa158015612375573d6000803e3d6000fd5b505050506040513d602081101561238b57600080fd5b8101908080519060200190929190505050905060006123ae82848b8b8b8b615488565b91505080612424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61244f87858d73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b809450505050509695505050505050565b60008085116124d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561251f57600080fd5b505afa158015612533573d6000803e3d6000fd5b505050506040513d602081101561254957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061258057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61263c87878373ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156126bd57600080fd5b505af11580156126d1573d6000803e3d6000fd5b505050506040513d60408110156126e757600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156127a557808201518184015260208101905061278a565b50505050905001935050505060006040518083038186803b1580156127c957600080fd5b505afa1580156127dd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561280757600080fd5b810190808051604051939291908464010000000082111561282757600080fd5b8382019150602082018581111561283d57600080fd5b825186602082028301116401000000008211171561285a57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015612891578082015181840152602081019050612876565b5050505090500160405250505090506000808b90506000836001815181106128b557fe5b6020026020010151905061291f816129116103e86129036128e06003886153b090919063ffffffff16565b6128f56103e8896153b090919063ffffffff16565b61581290919063ffffffff16565b61543690919063ffffffff16565b61589a90919063ffffffff16565b925050506129ce8d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561296e57600080fd5b505afa158015612982573d6000803e3d6000fd5b505050506040513d602081101561299857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b6129fb888e838673ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050612a7f85838b73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff16612b3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a439058d8d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612c5657600080fd5b505afa158015612c6a573d6000803e3d6000fd5b505050506040513d6020811015612c8057600080fd5b81019080805190602001909291905050509050612cc033308c8473ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d6757600080fd5b505af1158015612d7b573d6000803e3d6000fd5b505050506040513d6020811015612d9157600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e8e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612ead57600080fd5b505af1158015612ec1573d6000803e3d6000fd5b505050506040513d6040811015612ed757600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f6557600080fd5b505afa158015612f79573d6000803e3d6000fd5b505050506040513d6020811015612f8f57600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561304957600080fd5b505af115801561305d573d6000803e3d6000fd5b505050506040513d602081101561307357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561312c57600080fd5b505af1158015613140573d6000803e3d6000fd5b505050506040513d602081101561315657600080fd5b810190808051906020019092919050505050600061328e8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156131b357600080fd5b505afa1580156131c7573d6000803e3d6000fd5b505050506040513d60208110156131dd57600080fd5b81019080805190602001909291905050506132808973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561323657600080fd5b505afa15801561324a573d6000803e3d6000fd5b505050506040513d602081101561326057600080fd5b8101908080519060200190929190505050886153b090919063ffffffff16565b61543690919063ffffffff16565b90506132bd3330838573ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561337a57600080fd5b505af115801561338e573d6000803e3d6000fd5b505050506040513d60608110156133a457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506133f789838f73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff166134ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561350e57600080fd5b505afa158015613522573d6000803e3d6000fd5b505050506040513d602081101561353857600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561359357600080fd5b505afa1580156135a7573d6000803e3d6000fd5b505050506040513d60208110156135bd57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156136a557600080fd5b505afa1580156136b9573d6000803e3d6000fd5b505050506040513d60208110156136cf57600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156137145781602001602082028038833980820191505090505b509050838160008151811061372557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061376d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615d4860509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156138c15780820151818401526020810190506138a6565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561398f57600080fd5b505afa1580156139a3573d6000803e3d6000fd5b505050506040513d60208110156139b957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146139ec5760006139ee565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015613a4f57600080fd5b505afa158015613a63573d6000803e3d6000fd5b505050506040513d6020811015613a7957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614613aab578b613aae565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613b5d578082015181840152602081019050613b42565b50505050905090810190601f168015613b8a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613bac57600080fd5b505af1158015613bc0573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16613c76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050613ce43330898c73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080613cf28c8b306150f8565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d3e57600080fd5b505afa158015613d52573d6000803e3d6000fd5b505050506040513d6020811015613d6857600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613e2257600080fd5b505af1158015613e36573d6000803e3d6000fd5b505050506040513d6020811015613e4c57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f0557600080fd5b505af1158015613f19573d6000803e3d6000fd5b505050506040513d6020811015613f2f57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700828e858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561405057600080fd5b505af1158015614064573d6000803e3d6000fd5b505050506040513d606081101561407a57600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506140cd33848f73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b60019450505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600080600061410c8a8a306150f8565b9150915060006141618b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615488565b915050806141d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61428286838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561422257600080fd5b505afa158015614236573d6000803e3d6000fd5b505050506040513d602081101561424c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b809350505050979650505050505050565b61429b615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461435c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615d016026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6144ce615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461458f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614717576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146147db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461489f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a250505050565b60008060149054906101000a900460ff16614a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050614add3330898b73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638549780b348d306040518463ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060408051808303818588803b158015614bb457600080fd5b505af1158015614bc8573d6000803e3d6000fd5b50505050506040513d6040811015614bdf57600080fd5b81019080805190602001909291908051906020019092919050505091509150348214614c0757fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614cae57600080fd5b505af1158015614cc2573d6000803e3d6000fd5b505050506040513d6020811015614cd857600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d9157600080fd5b505af1158015614da5573d6000803e3d6000fd5b505050506040513d6020811015614dbb57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c348d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614edc57600080fd5b505af1158015614ef0573d6000803e3d6000fd5b505050506040513d6060811015614f0657600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614fd933828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f7957600080fd5b505afa158015614f8d573d6000803e3d6000fd5b505050506040513d6020811015614fa357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600281565b6150f2846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506158e4565b50505050565b60008060008411615171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61521e3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156151bd57600080fd5b505afa1580156151d1573d6000803e3d6000fd5b505050506040513d60208110156151e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561529f57600080fd5b505af11580156152b3573d6000803e3d6000fd5b505050506040513d60408110156152c957600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6153ab8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506158e4565b505050565b6000808314156153c35760009050615430565b60008284029050828482816153d457fe5b041461542b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615d276021913960400191505060405180910390fd5b809150505b92915050565b600061547883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615b2f565b905092915050565b600033905090565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106154b057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615541576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561560f57600080fd5b505af1158015615623573d6000803e3d6000fd5b505050506040513d602081101561563957600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156157025780820151818401526020810190506156e7565b505050509050019650505050505050600060405180830381600087803b15801561572b57600080fd5b505af115801561573f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561576957600080fd5b810190808051604051939291908464010000000082111561578957600080fd5b8382019150602082018581111561579f57600080fd5b82518660208202830111640100000000821117156157bc57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156157f35780820151818401526020810190506157d8565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006158dc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615bf5565b905092915050565b6159038273ffffffffffffffffffffffffffffffffffffffff16615cb5565b615975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106159c457805182526020820191506020810190506020830392506159a1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615a26576040519150601f19603f3d011682016040523d82523d6000602084013e615a2b565b606091505b509150915081615aa3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615b2957808060200190516020811015615ac257600080fd5b8101908080519060200190929190505050615b28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615d98602a913960400191505060405180910390fd5b5b50505050565b60008083118290615bdb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615ba0578082015181840152602081019050615b85565b50505050905090810190601f168015615bcd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615be757fe5b049050809150509392505050565b6000838311158290615ca2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c67578082015181840152602081019050615c4c565b50505050905090810190601f168015615c945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615cf757506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209b44027644546b20f3a65e84ef16fc05ef47100869f1cad2fd3a672860678eec64736f6c63430006020033", - "deployedBytecode": "0x60806040526004361061012a5760003560e01c8063b17d0570116100ab578063d9b361251161006f578063d9b3612514610b92578063f2fde38b14610c8e578063f887ea4014610cdf578063f8c8765e14610d36578063fdf9145c14610de7578063ffa1ad7414610eab5761012a565b8063b17d0570146107bd578063c45a01551461090e578063cc84fde714610965578063cd04552414610a39578063d580c62214610ab65761012a565b806369d12e14116100f257806369d12e14146104e9578063715018a6146105bd5780638658ded9146105d45780638da5cb5b1461062b57806395f0ae76146106825761012a565b806301c6a4501461012f57806310d1e85c1461020b5780631758078b146102c5578063667872561461031c57806369bd26cd14610438575b600080fd5b34801561013b57600080fd5b506101f1600480360361010081101561015357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610edc565b604051808215151515815260200191505060405180910390f35b34801561021757600080fd5b506102c36004803603608081101561022e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561027f57600080fd5b82018360208201111561029157600080fd5b803590602001918460018302840111640100000000831117156102b357600080fd5b90919293919293905050506113e8565b005b3480156102d157600080fd5b506102da611517565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561032857600080fd5b5061041e600480360361014081101561034057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061153d565b604051808215151515815260200191505060405180910390f35b34801561044457600080fd5b506104a76004803603604081101561045b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611668565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104f557600080fd5b506105a0600480360360e081101561050c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611787565b604051808381526020018281526020019250505060405180910390f35b3480156105c957600080fd5b506105d261212e565b005b3480156105e057600080fd5b506105e96122b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561063757600080fd5b506106406122dc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561068e57600080fd5b506107a3600480360360c08110156106a557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156106f657600080fd5b82018360208201111561070857600080fd5b8035906020019184602083028401116401000000008311171561072a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612305565b604051808215151515815260200191505060405180910390f35b3480156107c957600080fd5b506108f4600480360360c08110156107e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561085157600080fd5b82018360208201111561086357600080fd5b8035906020019184602083028401116401000000008311171561088557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612460565b604051808215151515815260200191505060405180910390f35b34801561091a57600080fd5b50610923612a90565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561097157600080fd5b50610a1c600480360360e081101561098857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ab6565b604051808381526020018281526020019250505060405180910390f35b348015610a4557600080fd5b50610a9c60048036036060811015610a5c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613429565b604051808215151515815260200191505060405180910390f35b348015610ac257600080fd5b50610b786004803603610100811015610ada57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613bf3565b604051808215151515815260200191505060405180910390f35b348015610b9e57600080fd5b50610c74600480360360c0811015610bb557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610c0657600080fd5b820183602082011115610c1857600080fd5b80359060200191846020830284011164010000000083111715610c3a57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506140fc565b604051808215151515815260200191505060405180910390f35b348015610c9a57600080fd5b50610cdd60048036036020811015610cb157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614293565b005b348015610ceb57600080fd5b50610cf46144a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d4257600080fd5b50610de560048036036080811015610d5957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506144c6565b005b610e91600480360360e0811015610dfd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506149ec565b604051808215151515815260200191505060405180910390f35b348015610eb757600080fd5b50610ec0615006565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610f5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610fcd3330898c73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080610fdb8c8b306150f8565b91509150898214610fe857fe5b8b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561108f57600080fd5b505af11580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561117257600080fd5b505af1158015611186573d6000803e3d6000fd5b505050506040513d602081101561119c57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008d8d8d8d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156112bd57600080fd5b505af11580156112d1573d6000803e3d6000fd5b505050506040513d60608110156112e757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506113ba33828e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561135a57600080fd5b505afa15801561136e573d6000803e3d6000fd5b505050506040513d602081101561138457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600060603073ffffffffffffffffffffffffffffffffffffffff1684846040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114611457576040519150601f19603f3d011682016040523d82523d6000602084013e61145c565b606091505b509150915081801561149c575060008151148061149b575080806020019051602081101561148957600080fd5b81019080805190602001909291905050505b5b61150e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b50505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008061154f8c8c8989898989612ab6565b50905060006115648b8b848c8b8b8b8b610edc565b9050806115d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8a73ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248b6040518082815260200191505060405180910390a480925050509a9950505050505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561174057600080fd5b505af1158015611754573d6000803e3d6000fd5b505050506040513d602081101561176a57600080fd5b810190808051906020019092919050505090508091505092915050565b600080600060149054906101000a900460ff1661180c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561186e57600080fd5b505afa158015611882573d6000803e3d6000fd5b505050506040513d602081101561189857600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a43905848d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156119a757600080fd5b505afa1580156119bb573d6000803e3d6000fd5b505050506040513d60208110156119d157600080fd5b81019080805190602001909291905050509050611a1133308c8473ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611ab857600080fd5b505af1158015611acc573d6000803e3d6000fd5b505050506040513d6020811015611ae257600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde858e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015611bfe57600080fd5b505af1158015611c12573d6000803e3d6000fd5b505050506040513d6040811015611c2857600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008e90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611d1a57600080fd5b505af1158015611d2e573d6000803e3d6000fd5b505050506040513d6020811015611d4457600080fd5b8101908080519060200190929190505050508573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611dfd57600080fd5b505af1158015611e11573d6000803e3d6000fd5b505050506040513d6020811015611e2757600080fd5b8101908080519060200190929190505050506000611f93670de0b6b3a7640000611f858473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8f57600080fd5b505afa158015611ea3573d6000803e3d6000fd5b505050506040513d6020811015611eb957600080fd5b8101908080519060200190929190505050611f77670de0b6b3a7640000611f698873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611f1f57600080fd5b505afa158015611f33573d6000803e3d6000fd5b505050506040513d6020811015611f4957600080fd5b81019080805190602001909291905050508c6153b090919063ffffffff16565b6153b090919063ffffffff16565b61543690919063ffffffff16565b61543690919063ffffffff16565b9050611fc23330838573ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838e6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561207d57600080fd5b505af1158015612091573d6000803e3d6000fd5b505050506040513d60608110156120a757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050506120fd88828e73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b818195509550505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b612136615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060006123158989306150f8565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561236157600080fd5b505afa158015612375573d6000803e3d6000fd5b505050506040513d602081101561238b57600080fd5b8101908080519060200190929190505050905060006123ae82848b8b8b8b615488565b91505080612424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61244f87858d73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b809450505050509695505050505050565b60008085116124d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561251f57600080fd5b505afa158015612533573d6000803e3d6000fd5b505050506040513d602081101561254957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061258057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61263c87878373ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156126bd57600080fd5b505af11580156126d1573d6000803e3d6000fd5b505050506040513d60408110156126e757600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156127a557808201518184015260208101905061278a565b50505050905001935050505060006040518083038186803b1580156127c957600080fd5b505afa1580156127dd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561280757600080fd5b810190808051604051939291908464010000000082111561282757600080fd5b8382019150602082018581111561283d57600080fd5b825186602082028301116401000000008211171561285a57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015612891578082015181840152602081019050612876565b5050505090500160405250505090506000808b90506000836001815181106128b557fe5b6020026020010151905061291f816129116103e86129036128e06003886153b090919063ffffffff16565b6128f56103e8896153b090919063ffffffff16565b61581290919063ffffffff16565b61543690919063ffffffff16565b61589a90919063ffffffff16565b925050506129ce8d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561296e57600080fd5b505afa158015612982573d6000803e3d6000fd5b505050506040513d602081101561299857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b6129fb888e838673ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050612a7f85838b73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050509695505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff16612b3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008990506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a439058d8d6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612c5657600080fd5b505afa158015612c6a573d6000803e3d6000fd5b505050506040513d6020811015612c8057600080fd5b81019080805190602001909291905050509050612cc033308c8473ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d6757600080fd5b505af1158015612d7b573d6000803e3d6000fd5b505050506040513d6020811015612d9157600080fd5b810190808051906020019092919050505050506000808273ffffffffffffffffffffffffffffffffffffffff1663baa2abde8e8e8e8e8e308e6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612ead57600080fd5b505af1158015612ec1573d6000803e3d6000fd5b505050506040513d6040811015612ed757600080fd5b810190808051906020019092919080519060200190929190505050915091506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f6557600080fd5b505afa158015612f79573d6000803e3d6000fd5b505050506040513d6020811015612f8f57600080fd5b810190808051906020019092919050505090508e73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561304957600080fd5b505af115801561305d573d6000803e3d6000fd5b505050506040513d602081101561307357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561312c57600080fd5b505af1158015613140573d6000803e3d6000fd5b505050506040513d602081101561315657600080fd5b810190808051906020019092919050505050600061328e8773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156131b357600080fd5b505afa1580156131c7573d6000803e3d6000fd5b505050506040513d60208110156131dd57600080fd5b81019080805190602001909291905050506132808973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561323657600080fd5b505afa15801561324a573d6000803e3d6000fd5b505050506040513d602081101561326057600080fd5b8101908080519060200190929190505050886153b090919063ffffffff16565b61543690919063ffffffff16565b90506132bd3330838573ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b50508073ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b86858c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561337a57600080fd5b505af115801561338e573d6000803e3d6000fd5b505050506040513d60608110156133a457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506133f789838f73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b82829650965050505050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff166134ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561350e57600080fd5b505afa158015613522573d6000803e3d6000fd5b505050506040513d602081101561353857600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561359357600080fd5b505afa1580156135a7573d6000803e3d6000fd5b505050506040513d60208110156135bd57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156136a557600080fd5b505afa1580156136b9573d6000803e3d6000fd5b505050506040513d60208110156136cf57600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156137145781602001602082028038833980820191505090505b509050838160008151811061372557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061376d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615d4860509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156138c15780820151818401526020810190506138a6565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561398f57600080fd5b505afa1580156139a3573d6000803e3d6000fd5b505050506040513d60208110156139b957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146139ec5760006139ee565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015613a4f57600080fd5b505afa158015613a63573d6000803e3d6000fd5b505050506040513d6020811015613a7957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614613aab578b613aae565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613b5d578082015181840152602081019050613b42565b50505050905090810190601f168015613b8a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613bac57600080fd5b505af1158015613bc0573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16613c76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050613ce43330898c73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080613cf28c8b306150f8565b9150915060008c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d3e57600080fd5b505afa158015613d52573d6000803e3d6000fd5b505050506040513d6020811015613d6857600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613e2257600080fd5b505af1158015613e36573d6000803e3d6000fd5b505050506040513d6020811015613e4c57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f0557600080fd5b505af1158015613f19573d6000803e3d6000fd5b505050506040513d6020811015613f2f57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700828e858e8e8e8e8e6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561405057600080fd5b505af1158015614064573d6000803e3d6000fd5b505050506040513d606081101561407a57600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506140cd33848f73ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b60019450505050506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600080600061410c8a8a306150f8565b9150915060006141618b848b8b8b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a615488565b915050806141d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61428286838d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561422257600080fd5b505afa158015614236573d6000803e3d6000fd5b505050506040513d602081101561424c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b809350505050979650505050505050565b61429b615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461435c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156143e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615d016026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6144ce615480565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461458f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614717576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146147db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461489f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a250505050565b60008060149054906101000a900460ff16614a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050614add3330898b73ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638549780b348d306040518463ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060408051808303818588803b158015614bb457600080fd5b505af1158015614bc8573d6000803e3d6000fd5b50505050506040513d6040811015614bdf57600080fd5b81019080805190602001909291908051906020019092919050505091509150348214614c0757fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614cae57600080fd5b505af1158015614cc2573d6000803e3d6000fd5b505050506040513d6020811015614cd857600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b3847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d9157600080fd5b505af1158015614da5573d6000803e3d6000fd5b505050506040513d6020811015614dbb57600080fd5b8101908080519060200190929190505050508273ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c348d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614edc57600080fd5b505af1158015614ef0573d6000803e3d6000fd5b505050506040513d6060811015614f0657600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614fd933828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f7957600080fd5b505afa158015614f8d573d6000803e3d6000fd5b505050506040513d6020811015614fa357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166152f89092919063ffffffff16565b600193505050506001600060146101000a81548160ff021916908315150217905550979650505050505050565b600281565b6150f2846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506158e4565b50505050565b60008060008411615171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61521e3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156151bd57600080fd5b505afa1580156151d1573d6000803e3d6000fd5b505050506040513d60208110156151e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661500b909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561529f57600080fd5b505af11580156152b3573d6000803e3d6000fd5b505050506040513d60408110156152c957600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6153ab8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506158e4565b505050565b6000808314156153c35760009050615430565b60008284029050828482816153d457fe5b041461542b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615d276021913960400191505060405180910390fd5b809150505b92915050565b600061547883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615b2f565b905092915050565b600033905090565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106154b057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614615541576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508873ffffffffffffffffffffffffffffffffffffffff1663095ea7b3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561560f57600080fd5b505af1158015615623573d6000803e3d6000fd5b505050506040513d602081101561563957600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166338ed173989898989896040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156157025780820151818401526020810190506156e7565b505050509050019650505050505050600060405180830381600087803b15801561572b57600080fd5b505af115801561573f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561576957600080fd5b810190808051604051939291908464010000000082111561578957600080fd5b8382019150602082018581111561579f57600080fd5b82518660208202830111640100000000821117156157bc57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156157f35780820151818401526020810190506157d8565b5050505090500160405250505092506001915050965096945050505050565b600080828401905083811015615890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006158dc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615bf5565b905092915050565b6159038273ffffffffffffffffffffffffffffffffffffffff16615cb5565b615975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106159c457805182526020820191506020810190506020830392506159a1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615a26576040519150601f19603f3d011682016040523d82523d6000602084013e615a2b565b606091505b509150915081615aa3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115615b2957808060200190516020811015615ac257600080fd5b8101908080519060200190929190505050615b28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615d98602a913960400191505060405180910390fd5b5b50505050565b60008083118290615bdb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615ba0578082015181840152602081019050615b85565b50505050905090810190601f168015615bcd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581615be757fe5b049050809150509392505050565b6000838311158290615ca2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615c67578082015181840152602081019050615c4c565b50505050905090810190601f168015615c945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615cf757506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209b44027644546b20f3a65e84ef16fc05ef47100869f1cad2fd3a672860678eec64736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615bd880620000fb6000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063c0c53b8b116100ad578063d9b3612511610071578063d9b3612514610b0b578063f2fde38b14610bfa578063f887ea4014610c3e578063fd52c6bb14610c88578063ffa1ad7414610d2c5761012c565b8063c0c53b8b14610837578063c45a0155146108bb578063cc84fde714610905578063cd045524146109cc578063d580c62214610a3c5761012c565b806369d12e14116100f457806369d12e14146104aa578063715018a6146105715780638da5cb5b1461057b57806395f0ae76146105c5578063b17d0570146106f35761012c565b806301c6a4501461013157806310d1e85c146102005780631758078b146102ad57806366787256146102f757806369bd26cd14610406575b600080fd5b6101e6600480360361010081101561014857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d50565b604051808215151515815260200191505060405180910390f35b6102ab6004803603608081101561021657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561026757600080fd5b82018360208201111561027957600080fd5b8035906020019184600183028401116401000000008311171561029b57600080fd5b9091929391929390505050610e4f565b005b6102b56111cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ec600480360361014081101561030e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111f2565b604051808215151515815260200191505060405180910390f35b6104686004803603604081101561041c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611373565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610554600480360360e08110156104c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611492565b604051808381526020018281526020019250505060405180910390f35b6105796115df565b005b610583611767565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d9600480360360c08110156105db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561062c57600080fd5b82018360208201111561063e57600080fd5b8035906020019184602083028401116401000000008311171561066057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611790565b604051808215151515815260200191505060405180910390f35b61081d600480360360c081101561070957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561077a57600080fd5b82018360208201111561078c57600080fd5b803590602001918460208302840111640100000000831117156107ae57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117d4565b604051808215151515815260200191505060405180910390f35b6108b96004803603606081101561084d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ea6565b005b6108c36122c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109af600480360360e081101561091b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506122ec565b604051808381526020018281526020019250505060405180910390f35b610a22600480360360608110156109e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050612439565b604051808215151515815260200191505060405180910390f35b610af16004803603610100811015610a5357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c03565b604051808215151515815260200191505060405180910390f35b610be0600480360360c0811015610b2157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610b7257600080fd5b820183602082011115610b8457600080fd5b80359060200191846020830284011164010000000083111715610ba657600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612d02565b604051808215151515815260200191505060405180910390f35b610c3c60048036036020811015610c1057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d88565b005b610c46612f95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610cea60048036036040811015610c9e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fbb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d3461317b565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610dd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000610e22600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b613180565b9050809150506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d6020811015610ec157600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d6020811015610f4657600080fd5b81019080805190602001909291905050509050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561102c57600080fd5b505afa158015611040573d6000803e3d6000fd5b505050506040513d602081101561105657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461109b57fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d806000811461110a576040519150601f19603f3d011682016040523d82523d6000602084013e61110f565b606091505b509150915081801561114f575060008151148061114e575080806020019051602081101561113c57600080fd5b81019080805190602001909291905050505b5b6111c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080611270600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168f8f8f8f8f8f8f8f8f8f6135af565b9050806112e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248a6040518082815260200191505060405180910390a4809150509a9950505050505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561144b57600080fd5b505af115801561145f573d6000803e3d6000fd5b505050506040513d602081101561147557600080fd5b810190808051906020019092919050505090508091505092915050565b600080600060149054906101000a900460ff16611517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000806115ac600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613665565b9150915081819350935050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b6115e7613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806117c4600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989898989613eee565b9050809150509695505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611877576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116118ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561193557600080fd5b505afa158015611949573d6000803e3d6000fd5b505050506040513d602081101561195f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061199657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611a27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b611a5287878373ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015611ad357600080fd5b505af1158015611ae7573d6000803e3d6000fd5b505050506040513d6040811015611afd57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015611bbb578082015181840152602081019050611ba0565b50505050905001935050505060006040518083038186803b158015611bdf57600080fd5b505afa158015611bf3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015611c1d57600080fd5b8101908080516040519392919084640100000000821115611c3d57600080fd5b83820191506020820185811115611c5357600080fd5b8251866020820283011164010000000082111715611c7057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015611ca7578082015181840152602081019050611c8c565b5050505090500160405250505090506000808b9050600083600181518110611ccb57fe5b60200260200101519050611d3581611d276103e8611d19611cf660038861410390919063ffffffff16565b611d0b6103e88961410390919063ffffffff16565b61418990919063ffffffff16565b61421190919063ffffffff16565b61425b90919063ffffffff16565b92505050611de48d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d8457600080fd5b505afa158015611d98573d6000803e3d6000fd5b505050506040513d6020811015611dae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b611e11888e838673ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050611e9585838b73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b600193505050509695505050505050565b611eae613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612033576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146120f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff16612371576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff021916908315150217905550600080612406600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e614392565b9150915081819350935050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff166124bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561251e57600080fd5b505afa158015612532573d6000803e3d6000fd5b505050506040513d602081101561254857600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156125a357600080fd5b505afa1580156125b7573d6000803e3d6000fd5b505050506040513d60208110156125cd57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156126b557600080fd5b505afa1580156126c9573d6000803e3d6000fd5b505050506040513d60208110156126df57600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156127245781602001602082028038833980820191505090505b509050838160008151811061273557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061277d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615b2960509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156128d15780820151818401526020810190506128b6565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561299f57600080fd5b505afa1580156129b3573d6000803e3d6000fd5b505050506040513d60208110156129c957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146129fc5760006129fe565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015612a5f57600080fd5b505afa158015612a73573d6000803e3d6000fd5b505050506040513d6020811015612a8957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612abb578b612abe565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b6d578082015181840152602081019050612b52565b50505050905090810190601f168015612b9a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015612bbc57600080fd5b505af1158015612bd0573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16612c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000612cd5600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614bdf565b9050809150506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600080612d77600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961500b565b905080915050979650505050505050565b612d90613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612e51576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ed7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ae26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561309157600080fd5b505afa1580156130a5573d6000803e3d6000fd5b505050506040513d60208110156130bb57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600281565b60006131af3330888b73ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b6000806131bd8b8a30615162565b915091508882146131ca57fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561327157600080fd5b505af1158015613285573d6000803e3d6000fd5b505050506040513d602081101561329b57600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561335457600080fd5b505af1158015613368573d6000803e3d6000fd5b505050506040513d602081101561337e57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561349f57600080fd5b505af11580156134b3573d6000803e3d6000fd5b505050506040513d60608110156134c957600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061359c33828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561353c57600080fd5b505afa158015613550573d6000803e3d6000fd5b505050506040513d602081101561356657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b6001925050509998505050505050505050565b6000806135c48f8f8f8f8f8c8c8c8c8c614392565b50905060006135da8f8c8c858d8c8c8c8c613180565b90508061364f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b80925050509d9c50505050505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136b057600080fd5b505afa1580156136c4573d6000803e3d6000fd5b505050506040513d60208110156136da57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156137a057600080fd5b505afa1580156137b4573d6000803e3d6000fd5b505050506040513d60208110156137ca57600080fd5b8101908080519060200190929190505050905061380a33308b8473ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138b157600080fd5b505af11580156138c5573d6000803e3d6000fd5b505050506040513d60208110156138db57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156139f757600080fd5b505af1158015613a0b573d6000803e3d6000fd5b505050506040513d6040811015613a2157600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613aec57600080fd5b505af1158015613b00573d6000803e3d6000fd5b505050506040513d6020811015613b1657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bcf57600080fd5b505af1158015613be3573d6000803e3d6000fd5b505050506040513d6020811015613bf957600080fd5b8101908080519060200190929190505050506000613d65670de0b6b3a7640000613d578473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6157600080fd5b505afa158015613c75573d6000803e3d6000fd5b505050506040513d6020811015613c8b57600080fd5b8101908080519060200190929190505050613d49670de0b6b3a7640000613d3b8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613cf157600080fd5b505afa158015613d05573d6000803e3d6000fd5b505050506040513d6020811015613d1b57600080fd5b81019080805190602001909291905050508b61410390919063ffffffff16565b61410390919063ffffffff16565b61421190919063ffffffff16565b61421190919063ffffffff16565b9050613d943330838573ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613e4f57600080fd5b505af1158015613e63573d6000803e3d6000fd5b505050506040513d6060811015613e7957600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050613ece87828d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600033905090565b6000806000613efe898930615162565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4a57600080fd5b505afa158015613f5e573d6000803e3d6000fd5b505050506040513d6020811015613f7457600080fd5b810190808051906020019092919050505090506000613f988c83858c8c8c8c615362565b9150508061400e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61403987858d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b80945050505050979650505050505050565b6140fe8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156c5565b505050565b6000808314156141165760009050614183565b600082840290508284828161412757fe5b041461417e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615b086021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015614207576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061425383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615910565b905092915050565b600061429d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506159d6565b905092915050565b61438c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156c5565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561444d57600080fd5b505afa158015614461573d6000803e3d6000fd5b505050506040513d602081101561447757600080fd5b810190808051906020019092919050505090506144b733308b8473ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561455e57600080fd5b505af1158015614572573d6000803e3d6000fd5b505050506040513d602081101561458857600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156146a457600080fd5b505af11580156146b8573d6000803e3d6000fd5b505050506040513d60408110156146ce57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561473557600080fd5b505afa158015614749573d6000803e3d6000fd5b505050506040513d602081101561475f57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561481957600080fd5b505af115801561482d573d6000803e3d6000fd5b505050506040513d602081101561484357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156148fc57600080fd5b505af1158015614910573d6000803e3d6000fd5b505050506040513d602081101561492657600080fd5b8101908080519060200190929190505050506000614a5e8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561498357600080fd5b505afa158015614997573d6000803e3d6000fd5b505050506040513d60208110156149ad57600080fd5b8101908080519060200190929190505050614a508773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a0657600080fd5b505afa158015614a1a573d6000803e3d6000fd5b505050506040513d6020811015614a3057600080fd5b81019080805190602001909291905050508761410390919063ffffffff16565b61421190919063ffffffff16565b9050614a8d3330838573ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015614b4a57600080fd5b505af1158015614b5e573d6000803e3d6000fd5b505050506040513d6060811015614b7457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614bc787828d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b6000614c0e3330888b73ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b600080614c1c8b8a30615162565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614c6857600080fd5b505afa158015614c7c573d6000803e3d6000fd5b505050506040513d6020811015614c9257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d4c57600080fd5b505af1158015614d60573d6000803e3d6000fd5b505050506040513d6020811015614d7657600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614e2f57600080fd5b505af1158015614e43573d6000803e3d6000fd5b505050506040513d6020811015614e5957600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614f7a57600080fd5b505af1158015614f8e573d6000803e3d6000fd5b505050506040513d6060811015614fa457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614ff733848e73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061501b898930615162565b9150915060006150308b8b858b8b8b8b615362565b915050806150a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61515186838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150f157600080fd5b505afa158015615105573d6000803e3d6000fd5b505050506040513d602081101561511b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b809350505050979650505050505050565b600080600084116151db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6152883386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561522757600080fd5b505afa15801561523b573d6000803e3d6000fd5b505050506040513d602081101561525157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561530957600080fd5b505af115801561531d573d6000803e3d6000fd5b505050506040513d604081101561533357600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061538a57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461541b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156154c257600080fd5b505af11580156154d6573d6000803e3d6000fd5b505050506040513d60208110156154ec57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156155b557808201518184015260208101905061559a565b505050509050019650505050505050600060405180830381600087803b1580156155de57600080fd5b505af11580156155f2573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561561c57600080fd5b810190808051604051939291908464010000000082111561563c57600080fd5b8382019150602082018581111561565257600080fd5b825186602082028301116401000000008211171561566f57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156156a657808201518184015260208101905061568b565b5050505090500160405250505091506001905097509795505050505050565b6156e48273ffffffffffffffffffffffffffffffffffffffff16615a96565b615756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106157a55780518252602082019150602081019050602083039250615782565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615807576040519150601f19603f3d011682016040523d82523d6000602084013e61580c565b606091505b509150915081615884576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561590a578080602001905160208110156158a357600080fd5b8101908080519060200190929190505050615909576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b79602a913960400191505060405180910390fd5b5b50505050565b600080831182906159bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615981578082015181840152602081019050615966565b50505050905090810190601f1680156159ae5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816159c857fe5b049050809150509392505050565b6000838311158290615a83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a48578082015181840152602081019050615a2d565b50505050905090810190601f168015615a755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ad857506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b819619c789f1cb015f54ebe2b2562b3e4bc731a32f5b3448e58f18ab00968be64736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063c0c53b8b116100ad578063d9b3612511610071578063d9b3612514610b0b578063f2fde38b14610bfa578063f887ea4014610c3e578063fd52c6bb14610c88578063ffa1ad7414610d2c5761012c565b8063c0c53b8b14610837578063c45a0155146108bb578063cc84fde714610905578063cd045524146109cc578063d580c62214610a3c5761012c565b806369d12e14116100f457806369d12e14146104aa578063715018a6146105715780638da5cb5b1461057b57806395f0ae76146105c5578063b17d0570146106f35761012c565b806301c6a4501461013157806310d1e85c146102005780631758078b146102ad57806366787256146102f757806369bd26cd14610406575b600080fd5b6101e6600480360361010081101561014857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d50565b604051808215151515815260200191505060405180910390f35b6102ab6004803603608081101561021657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561026757600080fd5b82018360208201111561027957600080fd5b8035906020019184600183028401116401000000008311171561029b57600080fd5b9091929391929390505050610e4f565b005b6102b56111cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ec600480360361014081101561030e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111f2565b604051808215151515815260200191505060405180910390f35b6104686004803603604081101561041c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611373565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610554600480360360e08110156104c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611492565b604051808381526020018281526020019250505060405180910390f35b6105796115df565b005b610583611767565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d9600480360360c08110156105db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561062c57600080fd5b82018360208201111561063e57600080fd5b8035906020019184602083028401116401000000008311171561066057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611790565b604051808215151515815260200191505060405180910390f35b61081d600480360360c081101561070957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561077a57600080fd5b82018360208201111561078c57600080fd5b803590602001918460208302840111640100000000831117156107ae57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117d4565b604051808215151515815260200191505060405180910390f35b6108b96004803603606081101561084d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ea6565b005b6108c36122c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109af600480360360e081101561091b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506122ec565b604051808381526020018281526020019250505060405180910390f35b610a22600480360360608110156109e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050612439565b604051808215151515815260200191505060405180910390f35b610af16004803603610100811015610a5357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c03565b604051808215151515815260200191505060405180910390f35b610be0600480360360c0811015610b2157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610b7257600080fd5b820183602082011115610b8457600080fd5b80359060200191846020830284011164010000000083111715610ba657600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612d02565b604051808215151515815260200191505060405180910390f35b610c3c60048036036020811015610c1057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d88565b005b610c46612f95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610cea60048036036040811015610c9e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fbb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d3461317b565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610dd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000610e22600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b613180565b9050809150506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d6020811015610ec157600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d6020811015610f4657600080fd5b81019080805190602001909291905050509050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561102c57600080fd5b505afa158015611040573d6000803e3d6000fd5b505050506040513d602081101561105657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461109b57fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d806000811461110a576040519150601f19603f3d011682016040523d82523d6000602084013e61110f565b606091505b509150915081801561114f575060008151148061114e575080806020019051602081101561113c57600080fd5b81019080805190602001909291905050505b5b6111c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080611270600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168f8f8f8f8f8f8f8f8f8f6135af565b9050806112e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248a6040518082815260200191505060405180910390a4809150509a9950505050505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561144b57600080fd5b505af115801561145f573d6000803e3d6000fd5b505050506040513d602081101561147557600080fd5b810190808051906020019092919050505090508091505092915050565b600080600060149054906101000a900460ff16611517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000806115ac600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613665565b9150915081819350935050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b6115e7613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806117c4600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989898989613eee565b9050809150509695505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611877576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116118ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561193557600080fd5b505afa158015611949573d6000803e3d6000fd5b505050506040513d602081101561195f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061199657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611a27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b611a5287878373ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015611ad357600080fd5b505af1158015611ae7573d6000803e3d6000fd5b505050506040513d6040811015611afd57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015611bbb578082015181840152602081019050611ba0565b50505050905001935050505060006040518083038186803b158015611bdf57600080fd5b505afa158015611bf3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015611c1d57600080fd5b8101908080516040519392919084640100000000821115611c3d57600080fd5b83820191506020820185811115611c5357600080fd5b8251866020820283011164010000000082111715611c7057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015611ca7578082015181840152602081019050611c8c565b5050505090500160405250505090506000808b9050600083600181518110611ccb57fe5b60200260200101519050611d3581611d276103e8611d19611cf660038861410390919063ffffffff16565b611d0b6103e88961410390919063ffffffff16565b61418990919063ffffffff16565b61421190919063ffffffff16565b61425b90919063ffffffff16565b92505050611de48d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d8457600080fd5b505afa158015611d98573d6000803e3d6000fd5b505050506040513d6020811015611dae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b611e11888e838673ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050611e9585838b73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b600193505050509695505050505050565b611eae613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612033576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146120f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff16612371576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff021916908315150217905550600080612406600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e614392565b9150915081819350935050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff166124bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561251e57600080fd5b505afa158015612532573d6000803e3d6000fd5b505050506040513d602081101561254857600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156125a357600080fd5b505afa1580156125b7573d6000803e3d6000fd5b505050506040513d60208110156125cd57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156126b557600080fd5b505afa1580156126c9573d6000803e3d6000fd5b505050506040513d60208110156126df57600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156127245781602001602082028038833980820191505090505b509050838160008151811061273557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061277d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615b2960509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156128d15780820151818401526020810190506128b6565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561299f57600080fd5b505afa1580156129b3573d6000803e3d6000fd5b505050506040513d60208110156129c957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146129fc5760006129fe565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015612a5f57600080fd5b505afa158015612a73573d6000803e3d6000fd5b505050506040513d6020811015612a8957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612abb578b612abe565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b6d578082015181840152602081019050612b52565b50505050905090810190601f168015612b9a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015612bbc57600080fd5b505af1158015612bd0573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16612c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000612cd5600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614bdf565b9050809150506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600080612d77600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961500b565b905080915050979650505050505050565b612d90613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612e51576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ed7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ae26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561309157600080fd5b505afa1580156130a5573d6000803e3d6000fd5b505050506040513d60208110156130bb57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600281565b60006131af3330888b73ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b6000806131bd8b8a30615162565b915091508882146131ca57fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561327157600080fd5b505af1158015613285573d6000803e3d6000fd5b505050506040513d602081101561329b57600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561335457600080fd5b505af1158015613368573d6000803e3d6000fd5b505050506040513d602081101561337e57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561349f57600080fd5b505af11580156134b3573d6000803e3d6000fd5b505050506040513d60608110156134c957600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061359c33828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561353c57600080fd5b505afa158015613550573d6000803e3d6000fd5b505050506040513d602081101561356657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b6001925050509998505050505050505050565b6000806135c48f8f8f8f8f8c8c8c8c8c614392565b50905060006135da8f8c8c858d8c8c8c8c613180565b90508061364f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b80925050509d9c50505050505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136b057600080fd5b505afa1580156136c4573d6000803e3d6000fd5b505050506040513d60208110156136da57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156137a057600080fd5b505afa1580156137b4573d6000803e3d6000fd5b505050506040513d60208110156137ca57600080fd5b8101908080519060200190929190505050905061380a33308b8473ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138b157600080fd5b505af11580156138c5573d6000803e3d6000fd5b505050506040513d60208110156138db57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156139f757600080fd5b505af1158015613a0b573d6000803e3d6000fd5b505050506040513d6040811015613a2157600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613aec57600080fd5b505af1158015613b00573d6000803e3d6000fd5b505050506040513d6020811015613b1657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bcf57600080fd5b505af1158015613be3573d6000803e3d6000fd5b505050506040513d6020811015613bf957600080fd5b8101908080519060200190929190505050506000613d65670de0b6b3a7640000613d578473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6157600080fd5b505afa158015613c75573d6000803e3d6000fd5b505050506040513d6020811015613c8b57600080fd5b8101908080519060200190929190505050613d49670de0b6b3a7640000613d3b8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613cf157600080fd5b505afa158015613d05573d6000803e3d6000fd5b505050506040513d6020811015613d1b57600080fd5b81019080805190602001909291905050508b61410390919063ffffffff16565b61410390919063ffffffff16565b61421190919063ffffffff16565b61421190919063ffffffff16565b9050613d943330838573ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613e4f57600080fd5b505af1158015613e63573d6000803e3d6000fd5b505050506040513d6060811015613e7957600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050613ece87828d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600033905090565b6000806000613efe898930615162565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4a57600080fd5b505afa158015613f5e573d6000803e3d6000fd5b505050506040513d6020811015613f7457600080fd5b810190808051906020019092919050505090506000613f988c83858c8c8c8c615362565b9150508061400e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61403987858d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b80945050505050979650505050505050565b6140fe8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156c5565b505050565b6000808314156141165760009050614183565b600082840290508284828161412757fe5b041461417e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615b086021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015614207576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061425383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615910565b905092915050565b600061429d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506159d6565b905092915050565b61438c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156c5565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561444d57600080fd5b505afa158015614461573d6000803e3d6000fd5b505050506040513d602081101561447757600080fd5b810190808051906020019092919050505090506144b733308b8473ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561455e57600080fd5b505af1158015614572573d6000803e3d6000fd5b505050506040513d602081101561458857600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156146a457600080fd5b505af11580156146b8573d6000803e3d6000fd5b505050506040513d60408110156146ce57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561473557600080fd5b505afa158015614749573d6000803e3d6000fd5b505050506040513d602081101561475f57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561481957600080fd5b505af115801561482d573d6000803e3d6000fd5b505050506040513d602081101561484357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156148fc57600080fd5b505af1158015614910573d6000803e3d6000fd5b505050506040513d602081101561492657600080fd5b8101908080519060200190929190505050506000614a5e8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561498357600080fd5b505afa158015614997573d6000803e3d6000fd5b505050506040513d60208110156149ad57600080fd5b8101908080519060200190929190505050614a508773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a0657600080fd5b505afa158015614a1a573d6000803e3d6000fd5b505050506040513d6020811015614a3057600080fd5b81019080805190602001909291905050508761410390919063ffffffff16565b61421190919063ffffffff16565b9050614a8d3330838573ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015614b4a57600080fd5b505af1158015614b5e573d6000803e3d6000fd5b505050506040513d6060811015614b7457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614bc787828d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b6000614c0e3330888b73ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b600080614c1c8b8a30615162565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614c6857600080fd5b505afa158015614c7c573d6000803e3d6000fd5b505050506040513d6020811015614c9257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d4c57600080fd5b505af1158015614d60573d6000803e3d6000fd5b505050506040513d6020811015614d7657600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614e2f57600080fd5b505af1158015614e43573d6000803e3d6000fd5b505050506040513d6020811015614e5957600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614f7a57600080fd5b505af1158015614f8e573d6000803e3d6000fd5b505050506040513d6060811015614fa457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614ff733848e73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061501b898930615162565b9150915060006150308b8b858b8b8b8b615362565b915050806150a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61515186838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150f157600080fd5b505afa158015615105573d6000803e3d6000fd5b505050506040513d602081101561511b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b809350505050979650505050505050565b600080600084116151db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6152883386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561522757600080fd5b505afa15801561523b573d6000803e3d6000fd5b505050506040513d602081101561525157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561530957600080fd5b505af115801561531d573d6000803e3d6000fd5b505050506040513d604081101561533357600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061538a57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461541b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156154c257600080fd5b505af11580156154d6573d6000803e3d6000fd5b505050506040513d60208110156154ec57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156155b557808201518184015260208101905061559a565b505050509050019650505050505050600060405180830381600087803b1580156155de57600080fd5b505af11580156155f2573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561561c57600080fd5b810190808051604051939291908464010000000082111561563c57600080fd5b8382019150602082018581111561565257600080fd5b825186602082028301116401000000008211171561566f57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156156a657808201518184015260208101905061568b565b5050505090500160405250505091506001905097509795505050505050565b6156e48273ffffffffffffffffffffffffffffffffffffffff16615a96565b615756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106157a55780518252602082019150602081019050602083039250615782565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615807576040519150601f19603f3d011682016040523d82523d6000602084013e61580c565b606091505b509150915081615884576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561590a578080602001905160208110156158a357600080fd5b8101908080519060200190929190505050615909576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b79602a913960400191505060405180910390fd5b5b50505050565b600080831182906159bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615981578082015181840152602081019050615966565b50505050905090810190601f1680156159ae5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816159c857fe5b049050809150509392505050565b6000838311158290615a83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a48578082015181840152602081019050615a2d565b50505050905090810190601f168015615a755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ad857506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b819619c789f1cb015f54ebe2b2562b3e4bc731a32f5b3448e58f18ab00968be64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/UniswapConnectorLib.json b/artifacts/UniswapConnectorLib.json new file mode 100644 index 00000000..b57bccdb --- /dev/null +++ b/artifacts/UniswapConnectorLib.json @@ -0,0 +1,8 @@ +{ + "contractName": "UniswapConnectorLib", + "abi": [], + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fc71f08a1fcc095dd44e5be6f0a1498f8f2c869822caf1eccfcca802054c947164736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fc71f08a1fcc095dd44e5be6f0a1498f8f2c869822caf1eccfcca802054c947164736f6c63430006020033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/WethConnector.json b/artifacts/WethConnector.json index 5114d704..0ee69bae 100644 --- a/artifacts/WethConnector.json +++ b/artifacts/WethConnector.json @@ -366,8 +366,8 @@ "type": "receive" } ], - "bytecode": "0x608060405234801561001057600080fd5b50604051613b6c380380613b6c8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613abd806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208654b616e1628cfc11ccb25ccf5db3f3108ae72a58913efb92bc9014c62e4e5864736f6c63430006020033", - "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208654b616e1628cfc11ccb25ccf5db3f3108ae72a58913efb92bc9014c62e4e5864736f6c63430006020033", + "bytecode": "0x608060405234801561001057600080fd5b50604051613b6c380380613b6c8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613abd806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220259e3277b08f511aa2a9f8d3b4122cfb930908c4bb8de36b22ee6df93d482d3d64736f6c63430006020033", + "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220259e3277b08f511aa2a9f8d3b4122cfb930908c4bb8de36b22ee6df93d482d3d64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/WethRouterLib.json b/artifacts/WethRouterLib.json index 1368af34..1f9cd7e9 100644 --- a/artifacts/WethRouterLib.json +++ b/artifacts/WethRouterLib.json @@ -1,8 +1,8 @@ { "contractName": "WethRouterLib", "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122028d9f8ed6e5425a7a355871bee0c323ebef956fffa58a924653a7e100f76c64f64736f6c63430006020033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122028d9f8ed6e5425a7a355871bee0c323ebef956fffa58a924653a7e100f76c64f64736f6c63430006020033", + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220111a1f66f965f89a0264646eb05768981f9856d2f97b1dec15c18975325fe33864736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220111a1f66f965f89a0264646eb05768981f9856d2f97b1dec15c18975325fe33864736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index 39a48adc..ef0a9852 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -22,7 +22,7 @@ import { import { IOption } from "../../option/interfaces/IOption.sol"; import { ITrader } from "../../option/interfaces/ITrader.sol"; import { TraderLib } from "../../option/libraries/TraderLib.sol"; -import { IWethConnector } from "../WETH/IWethConnector.sol"; +import { UniswapConnectorLib } from "./UniswapConnectorLib.sol"; // Open Zeppelin import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; @@ -39,7 +39,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { IUniswapV2Router02 public router; IUniswapV2Factory public factory; ITrader public trader; - IWethConnector public wethConnector; uint8 public constant VERSION = 2; @@ -64,17 +63,14 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { function initialize( address router_, address factory_, - address trader_, - address wethConnector_ + address trader_ ) external onlyOwner { require(address(router) == address(0x0), "ERR_INITIALIZED"); require(address(factory) == address(0x0), "ERR_INITIALIZED"); require(address(trader) == address(0x0), "ERR_INITIALIZED"); - require(address(wethConnector) == address(0x0), "ERR_INITIALIZED"); router = IUniswapV2Router02(router_); factory = IUniswapV2Factory(factory_); trader = ITrader(trader_); - wethConnector = IWethConnector(wethConnector_); emit Initialized(msg.sender); } @@ -101,29 +97,15 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address to, uint256 deadline ) external returns (bool) { - // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract. - // Mints long + short option tokens to this contract. - (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( + bool success = UniswapConnectorLib.mintLongOptionsThenSwapToTokens( + router, optionToken, amountIn, - address(this) - ); - - // Swaps longOptionTokens to the token specified at the end of the path, then sends to msg.sender. - // Reverts if the first address in the path is not the optionToken address. - (, bool success) = _swapExactOptionsForTokens( - address(optionToken), - outputOptions, amountOutMin, path, to, deadline ); - // Fail early if the swap failed. - require(success, "ERR_SWAP_FAILED"); - - // Send shortOptionTokens (redeem) to the "to" address. - IERC20(optionToken.redeemToken()).safeTransfer(to, outputRedeems); return success; } @@ -148,30 +130,15 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address to, uint256 deadline ) public returns (bool) { - // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract. - // Mints long + short tokens to this contract. - (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( + bool success = UniswapConnectorLib.mintShortOptionsThenSwapToTokens( + router, optionToken, amountIn, - address(this) - ); - - // Swaps shortOptionTokens to the token specified at the end of the path, then sends to msg.sender. - // Reverts if the first address in the path is not the shortOptionToken address. - address redeemToken = optionToken.redeemToken(); - (, bool success) = _swapExactOptionsForTokens( - redeemToken, - outputRedeems, // shortOptionTokens = redeemTokens amountOutMin, path, to, deadline ); - // Fail early if the swap failed. - require(success, "ERR_SWAP_FAILED"); - - // Send longOptionTokens to the "to" address. - IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens return success; } @@ -197,6 +164,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address[] memory path, address to ) public returns (bool) { + require(msg.sender == address(this), "ERR_NOT_SELF"); require(flashLoanQuantity > 0, "ERR_ZERO"); // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. // We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens @@ -335,33 +303,8 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address to, uint256 deadline ) public nonReentrant returns (bool) { - // Store in memory for gas savings. - IUniswapV2Router02 router_ = router; - - // Pull otherTokens from msg.sender to add to Uniswap V2 Pair. - // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - IERC20(otherTokenAddress).safeTransferFrom( - msg.sender, - address(this), - quantityOtherTokens - ); - - // Pulls underlyingTokens from msg.sender to this contract. - // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. - // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( - IOption(optionAddress), - quantityOptions, - address(this) - ); - assert(outputOptions == quantityOptions); - - // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. - IERC20(optionAddress).approve(address(router_), uint256(-1)); - IERC20(otherTokenAddress).approve(address(router_), uint256(-1)); - - // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. - router_.addLiquidity( + bool success = UniswapConnectorLib.addLongLiquidityWithUnderlying( + router, optionAddress, otherTokenAddress, quantityOptions, @@ -371,77 +314,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { to, deadline ); - - // Send shortOptionTokens (redeem) from minting option operation to msg.sender. - IERC20(IOption(optionAddress).redeemToken()).safeTransfer( - msg.sender, - outputRedeems - ); - return true; - } - - /** - * @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. - * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. - * underlyingToken -> optionToken -> UNI-V2. - * @param optionAddress The address of the optionToken to mint then provide liquidity for. - * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. - * @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. - * @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. - * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. - * @param to The address that receives UNI-V2 shares. - * @param deadline The timestamp to expire a pending transaction. - */ - function addLongLiquidityWithETHUnderlying( - address optionAddress, - address otherTokenAddress, - uint256 quantityOtherTokens, - uint256 minOptionTokens, - uint256 minOtherTokens, - address to, - uint256 deadline - ) public payable nonReentrant returns (bool) { - // Store in memory for gas savings. - IUniswapV2Router02 router_ = router; - - // Pull otherTokens from msg.sender to add to Uniswap V2 Pair. - // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - IERC20(otherTokenAddress).safeTransferFrom( - msg.sender, - address(this), - quantityOtherTokens - ); - - // Pulls underlyingTokens from msg.sender to this contract. - // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. - // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - (uint256 outputOptions, uint256 outputRedeems) = wethConnector - .safeMintWithETH - .value(msg.value)(IOption(optionAddress), address(this)); - assert(outputOptions == msg.value); - - // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. - IERC20(optionAddress).approve(address(router_), uint256(-1)); - IERC20(otherTokenAddress).approve(address(router_), uint256(-1)); - - // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. - router_.addLiquidity( - optionAddress, - otherTokenAddress, - msg.value, - quantityOtherTokens, - minOptionTokens, - minOtherTokens, - to, - deadline - ); - - // Send shortOptionTokens (redeem) from minting option operation to msg.sender. - IERC20(IOption(optionAddress).redeemToken()).safeTransfer( - msg.sender, - outputRedeems - ); - return true; + return success; } /** @@ -467,46 +340,18 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address to, uint256 deadline ) public nonReentrant returns (bool) { - // Store in memory for gas savings. - IUniswapV2Router02 router_ = router; - - // Pull quote tokens from msg.sender to add to Uniswap V2 Pair. - // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - IERC20(otherTokenAddress).safeTransferFrom( - msg.sender, - address(this), - quantityOtherTokens - ); - - // Pulls underlyingTokens from msg.sender to this contract. - // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. - // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( - IOption(optionAddress), - quantityOptions, - address(this) - ); - address redeemToken = IOption(optionAddress).redeemToken(); - - // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. - IERC20(redeemToken).approve(address(router_), uint256(-1)); - IERC20(otherTokenAddress).approve(address(router_), uint256(-1)); - - // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. - router_.addLiquidity( - redeemToken, + bool success = UniswapConnectorLib.addShortLiquidityWithUnderlying( + router, + optionAddress, otherTokenAddress, - outputRedeems, + quantityOptions, quantityOtherTokens, minShortTokens, minOtherTokens, to, deadline ); - - // Send longOptionTokens from minting option operation to msg.sender. - IERC20(optionAddress).safeTransfer(msg.sender, outputOptions); - return true; + return success; } /** @@ -532,58 +377,20 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address to, uint256 deadline ) public nonReentrant returns (uint256, uint256) { - // Store in memory for gas savings. - IOption optionToken = IOption(optionAddress); - IUniswapV2Router02 router_ = router; - - { - // Gets the Uniswap V2 Pair address for optionAddress and otherToken. - // Transfers the LP tokens for the pair to this contract. - // Warning: external call to a non-trusted address `msg.sender`. - address pair = factory.getPair(optionAddress, otherTokenAddress); - IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity); - IERC20(pair).approve(address(router_), uint256(-1)); - } - - // Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens). - (uint256 amountOptions, uint256 amountOtherTokens) = router_ - .removeLiquidity( + (uint256 amountOptions, uint256 amountOtherTokens) = UniswapConnectorLib + .removeLongLiquidityThenCloseOptions( + factory, + router, + trader, optionAddress, otherTokenAddress, liquidity, amountAMin, amountBMin, - address(this), + to, deadline ); - // Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options. - ITrader trader_ = trader; - { - address redeemToken = optionToken.redeemToken(); - IERC20(optionAddress).approve(address(trader_), uint256(-1)); - IERC20(redeemToken).approve(address(trader_), uint256(-1)); - - // Calculate equivalent quantity of redeem (short option) tokens to close the option position. - // Need to cancel base units and have quote units remaining. - uint256 requiredRedeems = amountOptions - .mul(optionToken.getQuoteValue()) - .div(optionToken.getBaseValue()); - - // Pull the required shortOptionTokens from msg.sender to this contract. - IERC20(redeemToken).safeTransferFrom( - msg.sender, - address(this), - requiredRedeems - ); - } - - // Pushes option and redeem tokens to the option contract and calls "closeOption". - // Receives underlyingTokens and sends them to the "to" address. - trader_.safeClose(optionToken, amountOptions, to); - - // Send the otherTokens received from burning liquidity shares to the "to" address. - IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens); return (amountOptions, amountOtherTokens); } @@ -610,60 +417,21 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address to, uint256 deadline ) public nonReentrant returns (uint256, uint256) { - // Store in memory for gas savings. - address redeemToken = IOption(optionAddress).redeemToken(); - IUniswapV2Router02 router_ = router; - - { - // Gets the Uniswap V2 Pair address for shortOptionToken and otherTokens. - // Transfers the LP tokens for the pair to this contract. - // Warning: external call to a non-trusted address `msg.sender`. - address pair = factory.getPair(redeemToken, otherTokenAddress); - IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity); - IERC20(pair).approve(address(router_), uint256(-1)); - } - - // Remove liquidity from Uniswap V2 pool to receive pool tokens (shortOptionTokens + otherTokens). - (uint256 amountShortOptions, uint256 amountOtherTokens) = router_ - .removeLiquidity( - redeemToken, + (uint256 amountOptions, uint256 amountOtherTokens) = UniswapConnectorLib + .removeShortLiquidityThenCloseOptions( + factory, + router, + trader, + optionAddress, otherTokenAddress, liquidity, amountAMin, amountBMin, - address(this), + to, deadline ); - // Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options. - { - ITrader trader_ = trader; - IOption optionToken = IOption(optionAddress); - IERC20(address(optionToken)).approve(address(trader_), uint256(-1)); - IERC20(redeemToken).approve(address(trader_), uint256(-1)); - - // Calculate equivalent quantity of redeem (short option) tokens to close the option position. - // Need to cancel base units and have quote units remaining. - uint256 requiredLongOptionTokens = amountShortOptions - .mul(optionToken.getBaseValue()) - .mul(1 ether) - .div(optionToken.getQuoteValue()) - .div(1 ether); - - // Pull the required longOptionTokens from msg.sender to this contract. - IERC20(address(optionToken)).safeTransferFrom( - msg.sender, - address(this), - requiredLongOptionTokens - ); - // Pushes option and redeem tokens to the option contract and calls "closeOption". - // Receives underlyingTokens and sends them to the "to" address. - trader_.safeClose(optionToken, requiredLongOptionTokens, to); - } - - // Send the otherTokens received from burning liquidity shares to the "to" address. - IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens); - return (amountShortOptions, amountOtherTokens); + return (amountOptions, amountOtherTokens); } /** @@ -693,21 +461,16 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { address to, uint256 deadline ) external returns (bool) { - (uint256 outUnderlyings, ) = removeLongLiquidityThenCloseOptions( + bool success = UniswapConnectorLib.rollOptionLiquidity( + factory, + router, + trader, rollFromOption, tokenInFromPair, - liquidity, - amountAMin, - amountBMin, - to, - deadline - ); - - bool success = addLongLiquidityWithUnderlying( rollToOption, tokenInToPair, - outUnderlyings, quantityOtherToken, + liquidity, amountAMin, amountBMin, to, @@ -726,45 +489,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { return success; } - // ==== Internal Functions ==== - - /** - * @dev Calls the "swapExactTokensForTokens" function on the Uniswap V2 Router 02 Contract. - * @notice Fails early if the address in the beginning of the path is not the token address. - * @param tokenAddress The address of the token to swap from. - * @param amountIn The quantity of longOptionTokens to swap with. - * @param amountOutMin The minimum quantity of tokens to receive in exchange for the tokens swapped. - * @param path The token addresses to trade through using their Uniswap V2 pairs. - * @param to The address to send the token proceeds to. - * @param deadline The timestamp for a trade to fail at if not successful. - */ - function _swapExactOptionsForTokens( - address tokenAddress, - uint256 amountIn, - uint256 amountOutMin, - address[] memory path, - address to, - uint256 deadline - ) internal returns (uint256[] memory amounts, bool success) { - // Fails early if the token being swapped from is not the optionToken. - require(path[0] == tokenAddress, "ERR_PATH_OPTION_START"); - - // Store router in memory for gas savings. - IUniswapV2Router02 router_ = router; - - // Approve the uniswap router to be able to transfer longOptionTokens from this contract. - IERC20(tokenAddress).approve(address(router_), uint256(-1)); - // Call the Uniswap V2 function to swap longOptionTokens to quoteTokens. - (amounts) = router_.swapExactTokensForTokens( - amountIn, - amountOutMin, - path, - to, - deadline - ); - success = true; - } - // ==== Callback Implementation ==== /** @@ -780,6 +504,9 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { uint256 amount1, bytes calldata data ) external override { + address token0 = IUniswapV2Pair(msg.sender).token0(); + address token1 = IUniswapV2Pair(msg.sender).token1(); + assert(msg.sender == factory.getPair(token0, token1)); // ensure that msg.sender is actually a V2 pair (bool success, bytes memory returnData) = address(this).call(data); require( success && @@ -803,4 +530,17 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { } // ==== View ==== + + /** + * @dev Gets a Uniswap Pair address for two tokens. + */ + function getUniswapMarketForTokens(address token0, address token1) + public + view + returns (address) + { + address uniswapPair = factory.getPair(token0, token1); + require(uniswapPair != address(0x0), "ERR_PAIR_DOES_NOT_EXIST"); + return uniswapPair; + } } diff --git a/contracts/connectors/Uniswap/UniswapConnectorLib.sol b/contracts/connectors/Uniswap/UniswapConnectorLib.sol new file mode 100644 index 00000000..ddfa58ae --- /dev/null +++ b/contracts/connectors/Uniswap/UniswapConnectorLib.sol @@ -0,0 +1,761 @@ +pragma solidity >=0.6.0; + +/** + * @title Combines Uniswap V2 Protocol functions with Primitive V1. + * @author Primitive + */ + +// Uniswap +import { + IUniswapV2Callee +} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol"; +import { + IUniswapV2Router02 +} from "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; +import { + IUniswapV2Factory +} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; +import { + IUniswapV2Pair +} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; +// Primitive +import { IOption } from "../../option/interfaces/IOption.sol"; +import { ITrader } from "../../option/interfaces/ITrader.sol"; +import { TraderLib } from "../../option/libraries/TraderLib.sol"; +import { IWETH, WethRouterLib } from "../WETH/WethRouterLib.sol"; +import { IWethConnector } from "../WETH/IWethConnector.sol"; +// Open Zeppelin +import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; +import { IERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; + +library UniswapConnectorLib { + using SafeMath for uint256; + using SafeERC20 for IERC20; + + // ==== Combo Operations ==== + + /** + * @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. + * Combines Primitive "mintOptions" function with Uniswap V2 Router "swapExactTokensForTokens" function. + * @notice If the first address in the path is not the optionToken address, the tx will fail. + * underlyingToken -> optionToken -> quoteToken. + * @param optionToken The address of the Oracle-less Primitive option. + * @param amountIn The quantity of longOptionTokens to mint and then sell. + * @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens. + * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option. + * @param to The address to send the optionToken proceeds and redeem tokens to. + * @param deadline The timestamp for a trade to fail at if not successful. + * @return bool Whether the transaction was successful or not. + */ + function mintLongOptionsThenSwapToTokens( + IUniswapV2Router02 router, + IOption optionToken, + uint256 amountIn, + uint256 amountOutMin, + address[] memory path, + address to, + uint256 deadline + ) internal returns (bool) { + // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract. + // Mints long + short option tokens to this contract. + (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( + optionToken, + amountIn, + address(this) + ); + + // Swaps longOptionTokens to the token specified at the end of the path, then sends to msg.sender. + // Reverts if the first address in the path is not the optionToken address. + (, bool success) = _swapExactOptionsForTokens( + router, + address(optionToken), + outputOptions, + amountOutMin, + path, + to, + deadline + ); + // Fail early if the swap failed. + require(success, "ERR_SWAP_FAILED"); + + // Send shortOptionTokens (redeem) to the "to" address. + IERC20(optionToken.redeemToken()).safeTransfer(to, outputRedeems); + return success; + } + + /** + * @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens. + * @notice If the first address in the path is not the shortOptionToken address, the tx will fail. + * underlyingToken -> shortOptionToken -> quoteToken. + * IMPORTANT: redeemTokens = shortOptionTokens + * @param optionToken The address of the Option contract. + * @param amountIn The quantity of options to mint. + * @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens. + * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. + * @param to The address to send the shortOptionToken proceeds and longOptionTokens to. + * @param deadline The timestamp for a trade to fail at if not successful. + * @return bool Whether the transaction was successful or not. + */ + function mintShortOptionsThenSwapToTokens( + IUniswapV2Router02 router, + IOption optionToken, + uint256 amountIn, + uint256 amountOutMin, + address[] memory path, + address to, + uint256 deadline + ) internal returns (bool) { + // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract. + // Mints long + short tokens to this contract. + (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( + optionToken, + amountIn, + address(this) + ); + + // Swaps shortOptionTokens to the token specified at the end of the path, then sends to msg.sender. + // Reverts if the first address in the path is not the shortOptionToken address. + address redeemToken = optionToken.redeemToken(); + (, bool success) = _swapExactOptionsForTokens( + router, + redeemToken, + outputRedeems, // shortOptionTokens = redeemTokens + amountOutMin, + path, + to, + deadline + ); + // Fail early if the swap failed. + require(success, "ERR_SWAP_FAILED"); + + // Send longOptionTokens to the "to" address. + IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens + return success; + } + + /** + * @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with + * reserve0 = shortOptionTokens and reserve1 = underlyingTokens. + * Uses underlyingTokens to mint long (option) + short (redeem) tokens. + * Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens, + * AND any remainder quantity of underlyingTokens (paid by msg.sender). + * @notice If the first address in the path is not the shortOptionToken address, the tx will fail. + * @param optionAddress The address of the Option contract. + * @param flashLoanQuantity The quantity of options to mint using borrowed underlyingTokens. + * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. + * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. + * @param to The address to send the shortOptionToken proceeds and longOptionTokens to. + * @return success bool Whether the transaction was successful or not. + */ + function flashMintShortOptionsThenSwap( + IUniswapV2Router02 router, + address pairAddress, + address optionAddress, + uint256 flashLoanQuantity, + uint256 amountOutMin, + address[] memory path, + address to + ) internal returns (bool) { + require(flashLoanQuantity > 0, "ERR_ZERO"); + // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. + // We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens + // and any remainder of underlyingToken. + + address underlyingToken = IOption(optionAddress) + .getUnderlyingTokenAddress(); + require(path[1] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); + + // Mint longOptionTokens using the underlyingTokens received from UniswapV2 flash swap to this contract. + // Send underlyingTokens from this contract to the optionToken contract, then call mintOptions. + IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity); + (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress) + .mintOptions(address(this)); + + // Need to return tokens from the flash swap by returning shortOptionTokens and any remainder of underlyingTokens. + { + address underlyingToken_ = underlyingToken; + // Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of shortOptionTokens. + uint256[] memory amounts = router.getAmountsOut( + outputRedeems, + path + ); + + // The remainder is the flash loan amount - amount paid for from shortOptionTokens. + uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by returning shortOptionTokens. + { + uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed + uint256 paid = amounts[1]; // quantity of underlyingTokens paid by shortOptionTokens + // consider the swap fee + remainder = quantity + .mul(1000) + .add(quantity.mul(3)) + .div(1000) + .sub(paid); + } + + // Pay back the pair in shortOptionTokens + IERC20(IOption(optionAddress).redeemToken()).safeTransfer( + pairAddress, + outputRedeems + ); + + // Pull underlyingTokens from the original msg.sender to pay the remainder of the flash swap. + IERC20(underlyingToken_).safeTransferFrom( + to, + pairAddress, + remainder + ); + } + + // Send longOptionTokens (option) to the original msg.sender. + IERC20(optionAddress).safeTransfer(to, outputOptions); + return true; + } + + /** + * @dev Opens a longOptionToken position by minting long + short tokens, then selling the short tokens. + * @notice IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens. + * IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid. + * @param optionToken The option address. + * @param amountOptions The quantity of longOptionTokens to purchase. + * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. + */ + function openFlashLong( + IUniswapV2Factory factory, + IOption optionToken, + uint256 amountOptions, + uint256 amountOutMin + ) internal returns (bool) { + address redeemToken = optionToken.redeemToken(); + address underlyingToken = optionToken.getUnderlyingTokenAddress(); + address pairAddress = factory.getPair(redeemToken, underlyingToken); + + // Build the path to get the appropriate reserves to borrow from, and then pay back. + // We are borrowing from reserve1 then paying it back mostly in reserve0. + // Borrowing underlyingTokens, paying back in shortOptionTokens (normal swap). Pay any remainder in underlyingTokens. + address[] memory path = new address[](2); + path[0] = redeemToken; + path[1] = underlyingToken; + IUniswapV2Pair pair = IUniswapV2Pair(pairAddress); + + bytes4 selector = bytes4( + keccak256( + bytes( + "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)" + ) + ) + ); + bytes memory params = abi.encodeWithSelector( + selector, // function to call in this contract + pairAddress, // pair contract we are borrowing from + optionToken, // option token to mint with flash loaned tokens + amountOptions, // quantity of underlyingTokens from flash loan to use to mint options + amountOutMin, // total price paid (in underlyingTokens) for selling shortOptionTokens + path, // redeemToken -> underlyingToken + msg.sender // address to pull the remainder loan amount to pay, and send longOptionTokens to. + ); + + // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address. + // Then executes `flashMintShortOptionsThenSwap`. + uint256 amount0Out = pair.token0() == underlyingToken + ? amountOptions + : 0; + uint256 amount1Out = pair.token0() == underlyingToken + ? 0 + : amountOptions; + + // Borrow the amountOptions quantity of underlyingTokens and execute the callback function using params. + pair.swap(amount0Out, amount1Out, address(this), params); + return true; + } + + // ==== Liquidity Functions ==== + + /** + * @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. + * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + * underlyingToken -> optionToken -> UNI-V2. + * @param optionAddress The address of the optionToken to mint then provide liquidity for. + * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. + * @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens. + * @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. + * @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. + * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. + * @param to The address that receives UNI-V2 shares. + * @param deadline The timestamp to expire a pending transaction. + */ + function addLongLiquidityWithUnderlying( + IUniswapV2Router02 router, + address optionAddress, + address otherTokenAddress, + uint256 quantityOptions, + uint256 quantityOtherTokens, + uint256 minOptionTokens, + uint256 minOtherTokens, + address to, + uint256 deadline + ) internal returns (bool) { + // Pull otherTokens from msg.sender to add to Uniswap V2 Pair. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + IERC20(otherTokenAddress).safeTransferFrom( + msg.sender, + address(this), + quantityOtherTokens + ); + + // Pulls underlyingTokens from msg.sender to this contract. + // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( + IOption(optionAddress), + quantityOptions, + address(this) + ); + assert(outputOptions == quantityOptions); + + // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. + IERC20(optionAddress).approve(address(router), uint256(-1)); + IERC20(otherTokenAddress).approve(address(router), uint256(-1)); + + // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. + router.addLiquidity( + optionAddress, + otherTokenAddress, + quantityOptions, + quantityOtherTokens, + minOptionTokens, + minOtherTokens, + to, + deadline + ); + + // Send shortOptionTokens (redeem) from minting option operation to msg.sender. + IERC20(IOption(optionAddress).redeemToken()).safeTransfer( + msg.sender, + outputRedeems + ); + return true; + } + + /** + * @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. + * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + * underlyingToken -> optionToken -> UNI-V2. + * @param optionAddress The address of the optionToken to mint then provide liquidity for. + * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. + * @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. + * @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. + * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. + * @param to The address that receives UNI-V2 shares. + * @param deadline The timestamp to expire a pending transaction. + */ + function addLongLiquidityWithETHUnderlying( + IWETH weth, + IUniswapV2Router02 router, + address optionAddress, + address otherTokenAddress, + uint256 quantityOtherTokens, + uint256 minOptionTokens, + uint256 minOtherTokens, + address to, + uint256 deadline + ) internal returns (bool) { + // Pull otherTokens from msg.sender to add to Uniswap V2 Pair. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + IERC20(otherTokenAddress).safeTransferFrom( + msg.sender, + address(this), + quantityOtherTokens + ); + + // Pulls underlyingTokens from msg.sender to this contract. + // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + (uint256 outputOptions, uint256 outputRedeems) = WethRouterLib + .safeMintWithETH(weth, IOption(optionAddress), address(this)); + assert(outputOptions == msg.value); + + // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. + IERC20(optionAddress).approve(address(router), uint256(-1)); + IERC20(otherTokenAddress).approve(address(router), uint256(-1)); + + // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. + router.addLiquidity( + optionAddress, + otherTokenAddress, + msg.value, + quantityOtherTokens, + minOptionTokens, + minOtherTokens, + to, + deadline + ); + + // Send shortOptionTokens (redeem) from minting option operation to msg.sender. + IERC20(IOption(optionAddress).redeemToken()).safeTransfer( + msg.sender, + outputRedeems + ); + return true; + } + + /** + * @dev Adds redeemToken liquidity to a redeem<>quote token pair by minting shortOptionTokens with underlyingTokens. + * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + * underlyingToken -> redeemToken -> UNI-V2. + * @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for. + * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. + * @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens. + * @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair. + * @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with. + * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. + * @param to The address that receives UNI-V2 shares. + * @param deadline The timestamp to expire a pending transaction. + */ + function addShortLiquidityWithUnderlying( + IUniswapV2Router02 router, + address optionAddress, + address otherTokenAddress, + uint256 quantityOptions, + uint256 quantityOtherTokens, + uint256 minShortTokens, + uint256 minOtherTokens, + address to, + uint256 deadline + ) internal returns (bool) { + // Pull quote tokens from msg.sender to add to Uniswap V2 Pair. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + IERC20(otherTokenAddress).safeTransferFrom( + msg.sender, + address(this), + quantityOtherTokens + ); + + // Pulls underlyingTokens from msg.sender to this contract. + // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. + // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. + (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint( + IOption(optionAddress), + quantityOptions, + address(this) + ); + address redeemToken = IOption(optionAddress).redeemToken(); + + // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract. + IERC20(redeemToken).approve(address(router), uint256(-1)); + IERC20(otherTokenAddress).approve(address(router), uint256(-1)); + + // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the "to" address. + router.addLiquidity( + redeemToken, + otherTokenAddress, + outputRedeems, + quantityOtherTokens, + minShortTokens, + minOtherTokens, + to, + deadline + ); + + // Send longOptionTokens from minting option operation to msg.sender. + IERC20(optionAddress).safeTransfer(msg.sender, outputOptions); + return true; + } + + /** + * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. + * @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. + * Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. + * Sends otherTokens from the burned UNI-V2 liquidity shares to the "to" address. + * UNI-V2 -> optionToken -> underlyingToken. + * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. + * @param otherTokenAddress The address of the other token in the pair with the options. + * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. + * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. + * @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity. + * @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options. + * @param deadline The timestamp to expire a pending transaction. + */ + function removeLongLiquidityThenCloseOptions( + IUniswapV2Factory factory, + IUniswapV2Router02 router, + ITrader trader, + address optionAddress, + address otherTokenAddress, + uint256 liquidity, + uint256 amountAMin, + uint256 amountBMin, + address to, + uint256 deadline + ) internal returns (uint256, uint256) { + // Store in memory for gas savings. + IOption optionToken = IOption(optionAddress); + + { + // Gets the Uniswap V2 Pair address for optionAddress and otherToken. + // Transfers the LP tokens for the pair to this contract. + // Warning: internal call to a non-trusted address `msg.sender`. + address pair = factory.getPair(optionAddress, otherTokenAddress); + IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity); + IERC20(pair).approve(address(router), uint256(-1)); + } + + // Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens). + (uint256 amountOptions, uint256 amountOtherTokens) = router + .removeLiquidity( + optionAddress, + otherTokenAddress, + liquidity, + amountAMin, + amountBMin, + address(this), + deadline + ); + + // Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options. + { + address redeemToken = optionToken.redeemToken(); + IERC20(optionAddress).approve(address(trader), uint256(-1)); + IERC20(redeemToken).approve(address(trader), uint256(-1)); + + // Calculate equivalent quantity of redeem (short option) tokens to close the option position. + // Need to cancel base units and have quote units remaining. + uint256 requiredRedeems = amountOptions + .mul(optionToken.getQuoteValue()) + .div(optionToken.getBaseValue()); + + // Pull the required shortOptionTokens from msg.sender to this contract. + IERC20(redeemToken).safeTransferFrom( + msg.sender, + address(this), + requiredRedeems + ); + } + + // Pushes option and redeem tokens to the option contract and calls "closeOption". + // Receives underlyingTokens and sends them to the "to" address. + trader.safeClose(optionToken, amountOptions, to); + + // Send the otherTokens received from burning liquidity shares to the "to" address. + IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens); + return (amountOptions, amountOtherTokens); + } + + /** + * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. + * @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. + * Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. + * Sends quoteTokens from the burned UNI-V2 liquidity shares to the "to" address. + * UNI-V2 -> optionToken -> underlyingToken. + * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. + * @param otherTokenAddress The address of the other token in the option pair. + * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. + * @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity. + * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. + * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options. + * @param deadline The timestamp to expire a pending transaction. + */ + function removeShortLiquidityThenCloseOptions( + IUniswapV2Factory factory, + IUniswapV2Router02 router, + ITrader trader, + address optionAddress, + address otherTokenAddress, + uint256 liquidity, + uint256 amountAMin, + uint256 amountBMin, + address to, + uint256 deadline + ) internal returns (uint256, uint256) { + // Store in memory for gas savings. + address redeemToken = IOption(optionAddress).redeemToken(); + + { + // Gets the Uniswap V2 Pair address for shortOptionToken and otherTokens. + // Transfers the LP tokens for the pair to this contract. + // Warning: internal call to a non-trusted address `msg.sender`. + address pair = factory.getPair(redeemToken, otherTokenAddress); + IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity); + IERC20(pair).approve(address(router), uint256(-1)); + } + + // Remove liquidity from Uniswap V2 pool to receive pool tokens (shortOptionTokens + otherTokens). + (uint256 amountShortOptions, uint256 amountOtherTokens) = router + .removeLiquidity( + redeemToken, + otherTokenAddress, + liquidity, + amountAMin, + amountBMin, + address(this), + deadline + ); + + // Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options. + { + IOption optionToken = IOption(optionAddress); + IERC20(address(optionToken)).approve(address(trader), uint256(-1)); + IERC20(redeemToken).approve(address(trader), uint256(-1)); + + // Calculate equivalent quantity of redeem (short option) tokens to close the option position. + // Need to cancel base units and have quote units remaining. + uint256 requiredLongOptionTokens = amountShortOptions + .mul(optionToken.getBaseValue()) + .mul(1 ether) + .div(optionToken.getQuoteValue()) + .div(1 ether); + + // Pull the required longOptionTokens from msg.sender to this contract. + IERC20(address(optionToken)).safeTransferFrom( + msg.sender, + address(this), + requiredLongOptionTokens + ); + // Pushes option and redeem tokens to the option contract and calls "closeOption". + // Receives underlyingTokens and sends them to the "to" address. + trader.safeClose(optionToken, requiredLongOptionTokens, to); + } + + // Send the otherTokens received from burning liquidity shares to the "to" address. + IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens); + return (amountShortOptions, amountOtherTokens); + } + + /** + * @dev Combines "removeLongLiquidityThenCloseOptions" function with "addLongLiquidityWithUnderlying" fuction. + * @notice Rolls UNI-V2 liquidity in an option<>otherToken pair to a different option<>otherToken pair. + * UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2. + * @param rollFromOption The optionToken address to close a UNI-V2 position. + * @param tokenInFromPair The address of the otherToken in the pair liquidity is being removed from. + * @param rollToOption The optionToken address to open a UNI-V2 position. + * @param tokenInToPair The address of the otherToken in the pair liquidity is being added to. + * @param quantityOtherToken The quantity of the otherToken to add to the new liquidity pair. + * @param liquidity The quantity of UNI-V2 shares to roll from the first Uniswap pool. + * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. + * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. + * @param to The address that receives the UNI-V2 shares that have been rolled. + * @param deadline The timestamp to expire a pending transaction. + */ + function rollOptionLiquidity( + IUniswapV2Factory factory, + IUniswapV2Router02 router, + ITrader trader, + address rollFromOption, + address tokenInFromPair, + address rollToOption, + address tokenInToPair, + uint256 quantityOtherToken, + uint256 liquidity, + uint256 amountAMin, + uint256 amountBMin, + address to, + uint256 deadline + ) internal returns (bool) { + (uint256 outUnderlyings, ) = removeLongLiquidityThenCloseOptions( + factory, + router, + trader, + rollFromOption, + tokenInFromPair, + liquidity, + amountAMin, + amountBMin, + to, + deadline + ); + + bool success = addLongLiquidityWithUnderlying( + router, + rollToOption, + tokenInToPair, + outUnderlyings, + quantityOtherToken, + amountAMin, + amountBMin, + to, + deadline + ); + + require(success, "ERR_ADD_LIQUIDITY_FAIL"); + + return success; + } + + // ==== Internal Functions ==== + + /** + * @dev Calls the "swapExactTokensForTokens" function on the Uniswap V2 Router 02 Contract. + * @notice Fails early if the address in the beginning of the path is not the token address. + * @param tokenAddress The address of the token to swap from. + * @param amountIn The quantity of longOptionTokens to swap with. + * @param amountOutMin The minimum quantity of tokens to receive in exchange for the tokens swapped. + * @param path The token addresses to trade through using their Uniswap V2 pairs. + * @param to The address to send the token proceeds to. + * @param deadline The timestamp for a trade to fail at if not successful. + */ + function _swapExactOptionsForTokens( + IUniswapV2Router02 router, + address tokenAddress, + uint256 amountIn, + uint256 amountOutMin, + address[] memory path, + address to, + uint256 deadline + ) internal returns (uint256[] memory amounts, bool success) { + // Fails early if the token being swapped from is not the optionToken. + require(path[0] == tokenAddress, "ERR_PATH_OPTION_START"); + + // Approve the uniswap router to be able to transfer longOptionTokens from this contract. + IERC20(tokenAddress).approve(address(router), uint256(-1)); + // Call the Uniswap V2 function to swap longOptionTokens to quoteTokens. + (amounts) = router.swapExactTokensForTokens( + amountIn, + amountOutMin, + path, + to, + deadline + ); + success = true; + } + + // ==== Callback Implementation ==== + + /** + * @dev The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data. + * @param sender The original msg.sender of the UniswapV2Pair.swap() call. + * @param amount0 The quantity of token0 received to the `to` address in the swap() call. + * @param amount1 The quantity of token1 received to the `to` address in the swap() call. + * @param data The payload passed in the `data` parameter of the swap() call. + */ + function uniswapV2Call( + address sender, + uint256 amount0, + uint256 amount1, + bytes memory data + ) internal { + (bool success, bytes memory returnData) = address(this).call(data); + require( + success && + (returnData.length == 0 || abi.decode(returnData, (bool))), + "ERR_UNISWAPV2_CALL_FAIL" + ); + } + + // ==== Management Functions ==== + + /** + * @dev Creats a Uniswap pair for option<>other tokens. + * @param optionAddress The address of the option to deploy a Uniswap V2 Pair for with the quoteToken. + */ + function deployUniswapMarket( + IUniswapV2Factory factory, + address optionAddress, + address otherToken + ) internal returns (address) { + address uniswapPair = factory.createPair(optionAddress, otherToken); + return uniswapPair; + } + + // ==== View ==== +} diff --git a/contracts/connectors/WETH/IWethConnector.sol b/contracts/connectors/WETH/IWethConnector.sol index 97da9e63..c530c35b 100644 --- a/contracts/connectors/WETH/IWethConnector.sol +++ b/contracts/connectors/WETH/IWethConnector.sol @@ -4,8 +4,11 @@ pragma solidity 0.6.2; // Primitive import { IOption } from "../../option/interfaces/IOption.sol"; +import { IWETH } from "./IWETH.sol"; interface IWethConnector { + function weth() external view returns (IWETH); + function safeMintWithETH(IOption optionToken, address receiver) external payable diff --git a/contracts/connectors/WETH/WethConnector.sol b/contracts/connectors/WETH/WethConnector.sol index 962cca79..e6a74753 100644 --- a/contracts/connectors/WETH/WethConnector.sol +++ b/contracts/connectors/WETH/WethConnector.sol @@ -28,7 +28,7 @@ contract WethConnector is IWethConnector, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; - IWETH public weth; + IWETH public override weth; event WethConnectorMint( address indexed from, diff --git a/test/test_uni_connector.js b/test/test_uni_connector.js index ece57d49..dec1d4c2 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.js @@ -209,14 +209,11 @@ describe("UniswapConnector", () => { uniswapConnector.initialize( uniswapRouter.address, uniswapFactory.address, - trader.address, - registry.address, - quoteToken.address, - wethConnector.address + trader.address ) ) .to.emit(uniswapConnector, "Initialized") - .withArgs(Alice, quoteToken.address); + .withArgs(Alice); }); }); @@ -403,7 +400,10 @@ describe("UniswapConnector", () => { let deadline = Math.floor(Date.now() / 1000) + 60 * 20; // Create a pair for rolling liquidity to - await uniswapConnector.deployUniswapMarket(rollToOption); + await uniswapConnector.deployUniswapMarket( + rollToOption, + quoteToken.address + ); // Get the pair with liquidity being rolled to let rollToPairAddress = await uniswapFactory.getPair( @@ -433,7 +433,6 @@ describe("UniswapConnector", () => { */ // Call the function - let amountDesired = await uniswapRouter.quote(); await expect( uniswapConnector.rollOptionLiquidity( rollFromOption, @@ -551,8 +550,9 @@ describe("UniswapConnector", () => { let optionAddress = optionToken.address; let liquidity = ONE_ETHER; - let pairAddress = await uniswapConnector.getUniswapMarketForToken( - optionToken.address + let pairAddress = await uniswapConnector.getUniswapMarketForTokens( + optionToken.address, + quoteToken.address ); let pair = new ethers.Contract( pairAddress, @@ -603,8 +603,9 @@ describe("UniswapConnector", () => { let optionAddress = optionToken.address; let liquidity = ONE_ETHER; - let pairAddress = await uniswapConnector.getUniswapMarketForToken( - optionToken.address + let pairAddress = await uniswapConnector.getUniswapMarketForTokens( + redeemToken.address, + weth.address ); let pair = new ethers.Contract( pairAddress, @@ -630,7 +631,7 @@ describe("UniswapConnector", () => { let deadline = Math.floor(Date.now() / 1000) + 60 * 20; await uniswapConnector.removeShortLiquidityThenCloseOptions( optionAddress, - quoteToken.address, + weth.address, liquidity, amountAMin, amountBMin, @@ -696,10 +697,7 @@ describe("UniswapConnector", () => { await uniswapConnector.initialize( uniswapRouter.address, uniswapFactory.address, - trader.address, - registry.address, - quoteToken.address, - wethConnector.address + trader.address ); // Approve tokens to be sent to trader contract @@ -830,11 +828,6 @@ describe("UniswapConnector", () => { ); // Get the pair instance to approve it to the uniswapConnector - assert.equal( - quoteToken.address, - await uniswapConnector.quoteToken(), - "QuoteToken mismatch" - ); let amountOptions = ONE_ETHER; let amountRedeems = amountOptions.mul(quote).div(base); let amountOutMin = "0"; From 9c2bbee82c3953b096777304a8d354d31d0d8209 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 13:39:29 -0700 Subject: [PATCH 13/20] Removed rollliquidity from uniswap connector. --- .../connectors/Uniswap/UniswapConnector.sol | 61 +-------- test/lib/batchApproval.js | 25 ++++ test/test_uni_connector.js | 124 +++--------------- 3 files changed, 49 insertions(+), 161 deletions(-) create mode 100644 test/lib/batchApproval.js diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index ef0a9852..a213eaaf 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -142,6 +142,8 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { return success; } + // ==== Flash Open Functions ==== + /** * @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with * reserve0 = shortOptionTokens and reserve1 = underlyingTokens. @@ -318,11 +320,11 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { } /** - * @dev Adds redeemToken liquidity to a redeem<>quote token pair by minting shortOptionTokens with underlyingTokens. + * @dev Adds redeemToken liquidity to a redeem<>token pair by minting shortOptionTokens with underlyingTokens. * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. * underlyingToken -> redeemToken -> UNI-V2. * @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for. - * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. + * @param otherTokenAddress IMPORTANT: Should be the underlyingToken of the optionToken. Address of other reserve asset. * @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens. * @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair. * @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with. @@ -434,61 +436,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { return (amountOptions, amountOtherTokens); } - /** - * @dev Combines "removeLongLiquidityThenCloseOptions" function with "addLongLiquidityWithUnderlying" fuction. - * @notice Rolls UNI-V2 liquidity in an option<>otherToken pair to a different option<>otherToken pair. - * UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2. - * @param rollFromOption The optionToken address to close a UNI-V2 position. - * @param tokenInFromPair The address of the otherToken in the pair liquidity is being removed from. - * @param rollToOption The optionToken address to open a UNI-V2 position. - * @param tokenInToPair The address of the otherToken in the pair liquidity is being added to. - * @param quantityOtherToken The quantity of the otherToken to add to the new liquidity pair. - * @param liquidity The quantity of UNI-V2 shares to roll from the first Uniswap pool. - * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. - * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. - * @param to The address that receives the UNI-V2 shares that have been rolled. - * @param deadline The timestamp to expire a pending transaction. - */ - function rollOptionLiquidity( - address rollFromOption, - address tokenInFromPair, - address rollToOption, - address tokenInToPair, - uint256 quantityOtherToken, - uint256 liquidity, - uint256 amountAMin, - uint256 amountBMin, - address to, - uint256 deadline - ) external returns (bool) { - bool success = UniswapConnectorLib.rollOptionLiquidity( - factory, - router, - trader, - rollFromOption, - tokenInFromPair, - rollToOption, - tokenInToPair, - quantityOtherToken, - liquidity, - amountAMin, - amountBMin, - to, - deadline - ); - - require(success, "ERR_ADD_LIQUIDITY_FAIL"); - - emit RolledOptionLiquidity( - msg.sender, - rollFromOption, - rollToOption, - liquidity - ); - - return success; - } - // ==== Callback Implementation ==== /** diff --git a/test/lib/batchApproval.js b/test/lib/batchApproval.js new file mode 100644 index 00000000..089496e1 --- /dev/null +++ b/test/lib/batchApproval.js @@ -0,0 +1,25 @@ +const { parseEther } = require("ethers/lib/utils"); +const MAX_UINT = parseEther("10000000000000000000000000000000000000"); + +const batchApproval = async ( + arrayOfAddresses, + arrayOfTokens, + arrayOfSigners +) => { + // for each contract + for (let c = 0; c < arrayOfAddresses.length; c++) { + let address = arrayOfAddresses[c]; + // for each token + for (let t = 0; t < arrayOfTokens.length; t++) { + let token = arrayOfTokens[t]; + // for each owner + for (let u = 0; u < arrayOfSigners.length; u++) { + let signer = arrayOfSigners[u]; + + await token.connect(signer).approve(address, MAX_UINT); + } + } + } +}; + +module.exports = batchApproval; diff --git a/test/test_uni_connector.js b/test/test_uni_connector.js index dec1d4c2..84703c44 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.js @@ -7,24 +7,19 @@ const setup = require("./lib/setup"); const constants = require("./lib/constants"); const { parseEther, formatEther } = require("ethers/lib/utils"); const { assertBNEqual } = utils; -const { - ONE_ETHER, - TEN_ETHER, - HUNDRED_ETHER, - THOUSAND_ETHER, - MILLION_ETHER, -} = constants.VALUES; +const { ONE_ETHER, MILLION_ETHER } = constants.VALUES; const UniswapV2Pair = require("@uniswap/v2-core/build/UniswapV2Pair.json"); +const batchApproval = require("./lib/batchApproval"); describe("UniswapConnector", () => { // ACCOUNTS - let Admin, User, Alice, Bob; + let Admin, User, Alice; let trader, weth, dai, optionToken, redeemToken, quoteToken; let underlyingToken, strikeToken; let base, quote, expiry; let Primitive, registry; - let uniswapFactory, uniswapRouter, uniswapConnector, wethConnector; + let uniswapFactory, uniswapRouter, uniswapConnector; before(async () => { let signers = await setup.newWallets(); @@ -70,60 +65,18 @@ describe("UniswapConnector", () => { quote, expiry ); - optionToken = Primitive.optionToken; redeemToken = Primitive.redeemToken; // Trader Instance trader = await setup.newTrader(Admin, weth.address); - // Weth connector instance - wethConnector = await setup.newWethConnector(Admin, weth.address); - - // Initialize the uniswap connector with addresses - /* await uniswapConnector.initialize( - uniswapRouter.address, - uniswapFactory.address, - trader.address, - registry.address, - quoteToken.address - ); */ - - // Approve tokens to be sent to trader contract - await underlyingToken - .connect(Admin) - .approve(trader.address, MILLION_ETHER); - await strikeToken.connect(Admin).approve(trader.address, MILLION_ETHER); - await optionToken.connect(Admin).approve(trader.address, MILLION_ETHER); - await redeemToken.connect(Admin).approve(trader.address, MILLION_ETHER); - - // Approve tokens to be sent to uniswapConnector - await underlyingToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - await strikeToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - await optionToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - await redeemToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - - // Approve tokens to be sent to uniswapRouter - await underlyingToken - .connect(Admin) - .approve(uniswapRouter.address, MILLION_ETHER); - await strikeToken - .connect(Admin) - .approve(uniswapRouter.address, MILLION_ETHER); - await optionToken - .connect(Admin) - .approve(uniswapRouter.address, MILLION_ETHER); - await redeemToken - .connect(Admin) - .approve(uniswapRouter.address, MILLION_ETHER); + // Approve all tokens and contracts + await batchApproval( + [trader.address, uniswapConnector.address, uniswapRouter.address], + [underlyingToken, strikeToken, optionToken, redeemToken], + [Admin] + ); // Create UNISWAP PAIRS // option <> dai: 1:10 ($10 option) 1,000 options and 10,000 dai (1,000 weth) @@ -194,13 +147,7 @@ describe("UniswapConnector", () => { dai.address ); let pair = new ethers.Contract(pairAddress, UniswapV2Pair.abi, Admin); - await pair - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - - await pair - .connect(User) - .approve(uniswapConnector.address, MILLION_ETHER); + await batchApproval([uniswapConnector.address], [pair], [Admin, User]); }); describe("initialize", () => { @@ -701,46 +648,15 @@ describe("UniswapConnector", () => { ); // Approve tokens to be sent to trader contract - await underlyingToken - .connect(Admin) - .approve(trader.address, MILLION_ETHER); - await strikeToken - .connect(Admin) - .approve(trader.address, MILLION_ETHER); - await optionToken - .connect(Admin) - .approve(trader.address, MILLION_ETHER); - await redeemToken - .connect(Admin) - .approve(trader.address, MILLION_ETHER); - - // Approve tokens to be sent to uniswapConnector - await underlyingToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - await strikeToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - await optionToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - await redeemToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - - // Approve tokens to be sent to uniswapRouter - await underlyingToken - .connect(Admin) - .approve(uniswapRouter.address, MILLION_ETHER); - await strikeToken - .connect(Admin) - .approve(uniswapRouter.address, MILLION_ETHER); - await optionToken - .connect(Admin) - .approve(uniswapRouter.address, MILLION_ETHER); - await redeemToken - .connect(Admin) - .approve(uniswapRouter.address, MILLION_ETHER); + await batchApproval( + [ + trader.address, + uniswapConnector.address, + uniswapRouter.address, + ], + [underlyingToken, strikeToken, optionToken, redeemToken], + [Admin] + ); // Create UNISWAP PAIRS // option <> dai: 1:10 ($10 option) 1,000 options and 10,000 dai (1,000 weth) From b1cb6635702b52321ca3443585fe80001ccdfc64 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 13:42:48 -0700 Subject: [PATCH 14/20] Removed rollliquidity from UniswapConnectorLib. --- .../connectors/Uniswap/UniswapConnector.sol | 7 +- .../Uniswap/UniswapConnectorLib.sol | 62 +-------- test/test_uni_connector.js | 119 ------------------ 3 files changed, 3 insertions(+), 185 deletions(-) diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol index a213eaaf..9170c328 100644 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ b/contracts/connectors/Uniswap/UniswapConnector.sol @@ -41,6 +41,7 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { ITrader public trader; uint8 public constant VERSION = 2; + string public constant name = "Primitive V1 Uniswap Connector 2"; event Initialized(address indexed from); event FlashedShortOption( @@ -48,12 +49,6 @@ contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { uint256 quantity, uint256 premium ); - event RolledOptionLiquidity( - address indexed from, - address indexed optionMarketFrom, - address indexed optionMarketTo, - uint256 liquidity - ); // solhint-disable-next-line no-empty-blocks constructor() public {} diff --git a/contracts/connectors/Uniswap/UniswapConnectorLib.sol b/contracts/connectors/Uniswap/UniswapConnectorLib.sol index ddfa58ae..3ee86355 100644 --- a/contracts/connectors/Uniswap/UniswapConnectorLib.sol +++ b/contracts/connectors/Uniswap/UniswapConnectorLib.sol @@ -134,6 +134,8 @@ library UniswapConnectorLib { return success; } + // ==== Flash Open Functions ==== + /** * @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with * reserve0 = shortOptionTokens and reserve1 = underlyingTokens. @@ -622,66 +624,6 @@ library UniswapConnectorLib { return (amountShortOptions, amountOtherTokens); } - /** - * @dev Combines "removeLongLiquidityThenCloseOptions" function with "addLongLiquidityWithUnderlying" fuction. - * @notice Rolls UNI-V2 liquidity in an option<>otherToken pair to a different option<>otherToken pair. - * UNI-V2 -> rollFromOption -> underlyingToken -> rollToOption -> UNI-V2. - * @param rollFromOption The optionToken address to close a UNI-V2 position. - * @param tokenInFromPair The address of the otherToken in the pair liquidity is being removed from. - * @param rollToOption The optionToken address to open a UNI-V2 position. - * @param tokenInToPair The address of the otherToken in the pair liquidity is being added to. - * @param quantityOtherToken The quantity of the otherToken to add to the new liquidity pair. - * @param liquidity The quantity of UNI-V2 shares to roll from the first Uniswap pool. - * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. - * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. - * @param to The address that receives the UNI-V2 shares that have been rolled. - * @param deadline The timestamp to expire a pending transaction. - */ - function rollOptionLiquidity( - IUniswapV2Factory factory, - IUniswapV2Router02 router, - ITrader trader, - address rollFromOption, - address tokenInFromPair, - address rollToOption, - address tokenInToPair, - uint256 quantityOtherToken, - uint256 liquidity, - uint256 amountAMin, - uint256 amountBMin, - address to, - uint256 deadline - ) internal returns (bool) { - (uint256 outUnderlyings, ) = removeLongLiquidityThenCloseOptions( - factory, - router, - trader, - rollFromOption, - tokenInFromPair, - liquidity, - amountAMin, - amountBMin, - to, - deadline - ); - - bool success = addLongLiquidityWithUnderlying( - router, - rollToOption, - tokenInToPair, - outUnderlyings, - quantityOtherToken, - amountAMin, - amountBMin, - to, - deadline - ); - - require(success, "ERR_ADD_LIQUIDITY_FAIL"); - - return success; - } - // ==== Internal Functions ==== /** diff --git a/test/test_uni_connector.js b/test/test_uni_connector.js index 84703c44..331f1521 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.js @@ -295,125 +295,6 @@ describe("UniswapConnector", () => { }); }); - describe("rollOptionLiquidity()", () => { - it("should roll option 1 (shorter expiry) to option 2 (longer expiry)", async () => { - // Get the tokens needed - - // Use the current option as a shorter dated expiry option - let rollFromOptionToken = optionToken; - - // Create a new option with a longer dated expiry - let longerExpiry = "1690869900"; - let rollToOptionToken = await setup.newOption( - Admin, - registry, - underlyingToken.address, - strikeToken.address, - base, - quote, - longerExpiry - ); - let rollFromRedeemToken = await setup.newRedeem( - Admin, - rollFromOptionToken - ); - - // Approvals - await rollToOptionToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - await rollFromRedeemToken - .connect(Admin) - .approve(uniswapConnector.address, MILLION_ETHER); - - // Get the pair to track the LP share token balance - let rollFromPairAddress = await uniswapFactory.getPair( - rollFromOptionToken.address, - quoteToken.address - ); - let rollFromPair = new ethers.Contract( - rollFromPairAddress, - UniswapV2Pair.abi, - Admin - ); - - // Function parameters - let rollFromOption = rollFromOptionToken.address; - let rollToOption = rollToOptionToken.address; - let liquidity = ONE_ETHER; - let amountAMin = 0; - let amountBMin = 0; - let to = Alice; - let deadline = Math.floor(Date.now() / 1000) + 60 * 20; - - // Create a pair for rolling liquidity to - await uniswapConnector.deployUniswapMarket( - rollToOption, - quoteToken.address - ); - - // Get the pair with liquidity being rolled to - let rollToPairAddress = await uniswapFactory.getPair( - rollToOption, - quoteToken.address - ); - let rollToPair = new ethers.Contract( - rollToPairAddress, - UniswapV2Pair.abi, - Admin - ); - - // Get startning balances - let rollFromPairBalanceBefore = await rollFromPair.balanceOf(Alice); - let rollToPairBalanceBefore = await rollToPair.balanceOf(Alice); - - /* Function ABI - function rollOptionLiquidity( - address rollFromOption, - address rollToOption, - uint256 liquidity, - uint256 amountAMin, - uint256 amountBMin, - address to, - uint256 deadline - ) external returns (bool) { - */ - - // Call the function - await expect( - uniswapConnector.rollOptionLiquidity( - rollFromOption, - quoteToken.address, - rollToOption, - quoteToken.address, - amountBMin, - liquidity, - amountAMin, - amountBMin, - to, - deadline - ) - ) - .to.emit(uniswapConnector, "RolledOptionLiquidity") - .withArgs(Alice, rollFromOption, rollToOption, liquidity); - - // Get the new balances and calculate their differences - let rollFromPairBalanceAfter = await rollFromPair.balanceOf(Alice); - let rollToPairBalanceAfter = await rollToPair.balanceOf(Alice); - - let rollFromPairBalanceChange = rollFromPairBalanceAfter - .sub(rollFromPairBalanceBefore) - .toString(); - let rollToPairBalanceChange = rollToPairBalanceAfter - .sub(rollToPairBalanceBefore) - .toString(); - - // Assert the balances changed appropriately - assertBNEqual(rollFromPairBalanceChange, liquidity.mul(-1)); - //assertBNEqual(rollToPairBalanceChange, liquidity); - }); - }); - describe("addLongLiquidityWithUnderlying", () => { it("use underlyings to mint options, then provide options and quote tokens as liquidity", async () => { /* Function ABI From e195fc617afa3519bede696a113c3464459ebe3e Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 14:41:01 -0700 Subject: [PATCH 15/20] Cleaned up UniswapConnector02 and new natspec style. --- artifacts/IUniswapConnector02.json | 455 ++++++++++++++ artifacts/UniswapConnector.json | 205 +----- artifacts/UniswapConnector02.json | 586 ++++++++++++++++++ artifacts/UniswapConnectorLib.json | 4 +- artifacts/UniswapConnectorLib02.json | 8 + .../connectors/Uniswap/IUniswapConnector.sol | 3 - .../Uniswap/IUniswapConnector02.sol | 107 ++++ .../connectors/Uniswap/UniswapConnector.sol | 488 --------------- .../connectors/Uniswap/UniswapConnector02.sol | 490 +++++++++++++++ ...ectorLib.sol => UniswapConnectorLib02.sol} | 5 +- deploy/5_deploy_uni_connector.js | 48 +- test/lib/setup.js | 6 +- test/test_uni_connector.js | 39 +- 13 files changed, 1705 insertions(+), 739 deletions(-) create mode 100644 artifacts/IUniswapConnector02.json create mode 100644 artifacts/UniswapConnector02.json create mode 100644 artifacts/UniswapConnectorLib02.json delete mode 100644 contracts/connectors/Uniswap/IUniswapConnector.sol create mode 100644 contracts/connectors/Uniswap/IUniswapConnector02.sol delete mode 100644 contracts/connectors/Uniswap/UniswapConnector.sol create mode 100644 contracts/connectors/Uniswap/UniswapConnector02.sol rename contracts/connectors/Uniswap/{UniswapConnectorLib.sol => UniswapConnectorLib02.sol} (99%) diff --git a/artifacts/IUniswapConnector02.json b/artifacts/IUniswapConnector02.json new file mode 100644 index 00000000..8e6947e4 --- /dev/null +++ b/artifacts/IUniswapConnector02.json @@ -0,0 +1,455 @@ +{ + "contractName": "IUniswapConnector02", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantityOtherTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOptionTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOtherTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLongLiquidityWithUnderlying", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantityOtherTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOtherTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addShortLiquidityWithUnderlying", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherToken", + "type": "address" + } + ], + "name": "deployUniswapMarket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + } + ], + "name": "getUniswapMarketForTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintLongOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintShortOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + } + ], + "name": "openFlashLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLongLiquidityThenCloseOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeShortLiquidityThenCloseOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trader", + "outputs": [ + { + "internalType": "contract ITrader", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/UniswapConnector.json b/artifacts/UniswapConnector.json index 51bb682d..e70f5967 100644 --- a/artifacts/UniswapConnector.json +++ b/artifacts/UniswapConnector.json @@ -2,7 +2,23 @@ "contractName": "UniswapConnector", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "router_", + "type": "address" + }, + { + "internalType": "address", + "name": "factory_", + "type": "address" + }, + { + "internalType": "address", + "name": "trader_", + "type": "address" + } + ], "stateMutability": "nonpayable", "type": "constructor" }, @@ -44,56 +60,6 @@ "name": "Initialized", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "optionMarketFrom", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "optionMarketTo", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "name": "RolledOptionLiquidity", - "type": "event" - }, { "inputs": [], "name": "VERSION", @@ -320,29 +286,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "router_", - "type": "address" - }, - { - "internalType": "address", - "name": "factory_", - "type": "address" - }, - { - "internalType": "address", - "name": "trader_", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -431,6 +374,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -460,19 +416,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -581,77 +524,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "rollFromOption", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenInFromPair", - "type": "address" - }, - { - "internalType": "address", - "name": "rollToOption", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenInToPair", - "type": "address" - }, - { - "internalType": "uint256", - "name": "quantityOtherToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountAMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountBMin", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "rollOptionLiquidity", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "router", @@ -678,19 +550,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -720,8 +579,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50600062000024620000e360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506001600060146101000a81548160ff021916908315150217905550620000eb565b600033905090565b615bd880620000fb6000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063c0c53b8b116100ad578063d9b3612511610071578063d9b3612514610b0b578063f2fde38b14610bfa578063f887ea4014610c3e578063fd52c6bb14610c88578063ffa1ad7414610d2c5761012c565b8063c0c53b8b14610837578063c45a0155146108bb578063cc84fde714610905578063cd045524146109cc578063d580c62214610a3c5761012c565b806369d12e14116100f457806369d12e14146104aa578063715018a6146105715780638da5cb5b1461057b57806395f0ae76146105c5578063b17d0570146106f35761012c565b806301c6a4501461013157806310d1e85c146102005780631758078b146102ad57806366787256146102f757806369bd26cd14610406575b600080fd5b6101e6600480360361010081101561014857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d50565b604051808215151515815260200191505060405180910390f35b6102ab6004803603608081101561021657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561026757600080fd5b82018360208201111561027957600080fd5b8035906020019184600183028401116401000000008311171561029b57600080fd5b9091929391929390505050610e4f565b005b6102b56111cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ec600480360361014081101561030e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111f2565b604051808215151515815260200191505060405180910390f35b6104686004803603604081101561041c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611373565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610554600480360360e08110156104c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611492565b604051808381526020018281526020019250505060405180910390f35b6105796115df565b005b610583611767565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d9600480360360c08110156105db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561062c57600080fd5b82018360208201111561063e57600080fd5b8035906020019184602083028401116401000000008311171561066057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611790565b604051808215151515815260200191505060405180910390f35b61081d600480360360c081101561070957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561077a57600080fd5b82018360208201111561078c57600080fd5b803590602001918460208302840111640100000000831117156107ae57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117d4565b604051808215151515815260200191505060405180910390f35b6108b96004803603606081101561084d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ea6565b005b6108c36122c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109af600480360360e081101561091b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506122ec565b604051808381526020018281526020019250505060405180910390f35b610a22600480360360608110156109e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050612439565b604051808215151515815260200191505060405180910390f35b610af16004803603610100811015610a5357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c03565b604051808215151515815260200191505060405180910390f35b610be0600480360360c0811015610b2157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610b7257600080fd5b820183602082011115610b8457600080fd5b80359060200191846020830284011164010000000083111715610ba657600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612d02565b604051808215151515815260200191505060405180910390f35b610c3c60048036036020811015610c1057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d88565b005b610c46612f95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610cea60048036036040811015610c9e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fbb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d3461317b565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610dd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000610e22600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b613180565b9050809150506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d6020811015610ec157600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d6020811015610f4657600080fd5b81019080805190602001909291905050509050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561102c57600080fd5b505afa158015611040573d6000803e3d6000fd5b505050506040513d602081101561105657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461109b57fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d806000811461110a576040519150601f19603f3d011682016040523d82523d6000602084013e61110f565b606091505b509150915081801561114f575060008151148061114e575080806020019051602081101561113c57600080fd5b81019080805190602001909291905050505b5b6111c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080611270600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168f8f8f8f8f8f8f8f8f8f6135af565b9050806112e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248a6040518082815260200191505060405180910390a4809150509a9950505050505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561144b57600080fd5b505af115801561145f573d6000803e3d6000fd5b505050506040513d602081101561147557600080fd5b810190808051906020019092919050505090508091505092915050565b600080600060149054906101000a900460ff16611517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000806115ac600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613665565b9150915081819350935050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b6115e7613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806117c4600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989898989613eee565b9050809150509695505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611877576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116118ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561193557600080fd5b505afa158015611949573d6000803e3d6000fd5b505050506040513d602081101561195f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061199657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611a27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b611a5287878373ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015611ad357600080fd5b505af1158015611ae7573d6000803e3d6000fd5b505050506040513d6040811015611afd57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015611bbb578082015181840152602081019050611ba0565b50505050905001935050505060006040518083038186803b158015611bdf57600080fd5b505afa158015611bf3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015611c1d57600080fd5b8101908080516040519392919084640100000000821115611c3d57600080fd5b83820191506020820185811115611c5357600080fd5b8251866020820283011164010000000082111715611c7057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015611ca7578082015181840152602081019050611c8c565b5050505090500160405250505090506000808b9050600083600181518110611ccb57fe5b60200260200101519050611d3581611d276103e8611d19611cf660038861410390919063ffffffff16565b611d0b6103e88961410390919063ffffffff16565b61418990919063ffffffff16565b61421190919063ffffffff16565b61425b90919063ffffffff16565b92505050611de48d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d8457600080fd5b505afa158015611d98573d6000803e3d6000fd5b505050506040513d6020811015611dae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b611e11888e838673ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050611e9585838b73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b600193505050509695505050505050565b611eae613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612033576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146120f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff16612371576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff021916908315150217905550600080612406600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e614392565b9150915081819350935050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff166124bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561251e57600080fd5b505afa158015612532573d6000803e3d6000fd5b505050506040513d602081101561254857600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156125a357600080fd5b505afa1580156125b7573d6000803e3d6000fd5b505050506040513d60208110156125cd57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156126b557600080fd5b505afa1580156126c9573d6000803e3d6000fd5b505050506040513d60208110156126df57600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156127245781602001602082028038833980820191505090505b509050838160008151811061273557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061277d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615b2960509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156128d15780820151818401526020810190506128b6565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561299f57600080fd5b505afa1580156129b3573d6000803e3d6000fd5b505050506040513d60208110156129c957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146129fc5760006129fe565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015612a5f57600080fd5b505afa158015612a73573d6000803e3d6000fd5b505050506040513d6020811015612a8957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612abb578b612abe565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b6d578082015181840152602081019050612b52565b50505050905090810190601f168015612b9a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015612bbc57600080fd5b505af1158015612bd0573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16612c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000612cd5600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614bdf565b9050809150506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600080612d77600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961500b565b905080915050979650505050505050565b612d90613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612e51576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ed7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ae26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561309157600080fd5b505afa1580156130a5573d6000803e3d6000fd5b505050506040513d60208110156130bb57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600281565b60006131af3330888b73ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b6000806131bd8b8a30615162565b915091508882146131ca57fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561327157600080fd5b505af1158015613285573d6000803e3d6000fd5b505050506040513d602081101561329b57600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561335457600080fd5b505af1158015613368573d6000803e3d6000fd5b505050506040513d602081101561337e57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561349f57600080fd5b505af11580156134b3573d6000803e3d6000fd5b505050506040513d60608110156134c957600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061359c33828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561353c57600080fd5b505afa158015613550573d6000803e3d6000fd5b505050506040513d602081101561356657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b6001925050509998505050505050505050565b6000806135c48f8f8f8f8f8c8c8c8c8c614392565b50905060006135da8f8c8c858d8c8c8c8c613180565b90508061364f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b80925050509d9c50505050505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136b057600080fd5b505afa1580156136c4573d6000803e3d6000fd5b505050506040513d60208110156136da57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156137a057600080fd5b505afa1580156137b4573d6000803e3d6000fd5b505050506040513d60208110156137ca57600080fd5b8101908080519060200190929190505050905061380a33308b8473ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138b157600080fd5b505af11580156138c5573d6000803e3d6000fd5b505050506040513d60208110156138db57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156139f757600080fd5b505af1158015613a0b573d6000803e3d6000fd5b505050506040513d6040811015613a2157600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613aec57600080fd5b505af1158015613b00573d6000803e3d6000fd5b505050506040513d6020811015613b1657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bcf57600080fd5b505af1158015613be3573d6000803e3d6000fd5b505050506040513d6020811015613bf957600080fd5b8101908080519060200190929190505050506000613d65670de0b6b3a7640000613d578473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6157600080fd5b505afa158015613c75573d6000803e3d6000fd5b505050506040513d6020811015613c8b57600080fd5b8101908080519060200190929190505050613d49670de0b6b3a7640000613d3b8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613cf157600080fd5b505afa158015613d05573d6000803e3d6000fd5b505050506040513d6020811015613d1b57600080fd5b81019080805190602001909291905050508b61410390919063ffffffff16565b61410390919063ffffffff16565b61421190919063ffffffff16565b61421190919063ffffffff16565b9050613d943330838573ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613e4f57600080fd5b505af1158015613e63573d6000803e3d6000fd5b505050506040513d6060811015613e7957600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050613ece87828d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600033905090565b6000806000613efe898930615162565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4a57600080fd5b505afa158015613f5e573d6000803e3d6000fd5b505050506040513d6020811015613f7457600080fd5b810190808051906020019092919050505090506000613f988c83858c8c8c8c615362565b9150508061400e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61403987858d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b80945050505050979650505050505050565b6140fe8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156c5565b505050565b6000808314156141165760009050614183565b600082840290508284828161412757fe5b041461417e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615b086021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015614207576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061425383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615910565b905092915050565b600061429d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506159d6565b905092915050565b61438c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156c5565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561444d57600080fd5b505afa158015614461573d6000803e3d6000fd5b505050506040513d602081101561447757600080fd5b810190808051906020019092919050505090506144b733308b8473ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561455e57600080fd5b505af1158015614572573d6000803e3d6000fd5b505050506040513d602081101561458857600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156146a457600080fd5b505af11580156146b8573d6000803e3d6000fd5b505050506040513d60408110156146ce57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561473557600080fd5b505afa158015614749573d6000803e3d6000fd5b505050506040513d602081101561475f57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561481957600080fd5b505af115801561482d573d6000803e3d6000fd5b505050506040513d602081101561484357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156148fc57600080fd5b505af1158015614910573d6000803e3d6000fd5b505050506040513d602081101561492657600080fd5b8101908080519060200190929190505050506000614a5e8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561498357600080fd5b505afa158015614997573d6000803e3d6000fd5b505050506040513d60208110156149ad57600080fd5b8101908080519060200190929190505050614a508773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a0657600080fd5b505afa158015614a1a573d6000803e3d6000fd5b505050506040513d6020811015614a3057600080fd5b81019080805190602001909291905050508761410390919063ffffffff16565b61421190919063ffffffff16565b9050614a8d3330838573ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015614b4a57600080fd5b505af1158015614b5e573d6000803e3d6000fd5b505050506040513d6060811015614b7457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614bc787828d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b6000614c0e3330888b73ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b600080614c1c8b8a30615162565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614c6857600080fd5b505afa158015614c7c573d6000803e3d6000fd5b505050506040513d6020811015614c9257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d4c57600080fd5b505af1158015614d60573d6000803e3d6000fd5b505050506040513d6020811015614d7657600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614e2f57600080fd5b505af1158015614e43573d6000803e3d6000fd5b505050506040513d6020811015614e5957600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614f7a57600080fd5b505af1158015614f8e573d6000803e3d6000fd5b505050506040513d6060811015614fa457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614ff733848e73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061501b898930615162565b9150915060006150308b8b858b8b8b8b615362565b915050806150a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61515186838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150f157600080fd5b505afa158015615105573d6000803e3d6000fd5b505050506040513d602081101561511b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b809350505050979650505050505050565b600080600084116151db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6152883386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561522757600080fd5b505afa15801561523b573d6000803e3d6000fd5b505050506040513d602081101561525157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561530957600080fd5b505af115801561531d573d6000803e3d6000fd5b505050506040513d604081101561533357600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061538a57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461541b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156154c257600080fd5b505af11580156154d6573d6000803e3d6000fd5b505050506040513d60208110156154ec57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156155b557808201518184015260208101905061559a565b505050509050019650505050505050600060405180830381600087803b1580156155de57600080fd5b505af11580156155f2573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561561c57600080fd5b810190808051604051939291908464010000000082111561563c57600080fd5b8382019150602082018581111561565257600080fd5b825186602082028301116401000000008211171561566f57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156156a657808201518184015260208101905061568b565b5050505090500160405250505091506001905097509795505050505050565b6156e48273ffffffffffffffffffffffffffffffffffffffff16615a96565b615756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106157a55780518252602082019150602081019050602083039250615782565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615807576040519150601f19603f3d011682016040523d82523d6000602084013e61580c565b606091505b509150915081615884576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561590a578080602001905160208110156158a357600080fd5b8101908080519060200190929190505050615909576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b79602a913960400191505060405180910390fd5b5b50505050565b600080831182906159bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615981578082015181840152602081019050615966565b50505050905090810190601f1680156159ae5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816159c857fe5b049050809150509392505050565b6000838311158290615a83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a48578082015181840152602081019050615a2d565b50505050905090810190601f168015615a755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ad857506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b819619c789f1cb015f54ebe2b2562b3e4bc731a32f5b3448e58f18ab00968be64736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063c0c53b8b116100ad578063d9b3612511610071578063d9b3612514610b0b578063f2fde38b14610bfa578063f887ea4014610c3e578063fd52c6bb14610c88578063ffa1ad7414610d2c5761012c565b8063c0c53b8b14610837578063c45a0155146108bb578063cc84fde714610905578063cd045524146109cc578063d580c62214610a3c5761012c565b806369d12e14116100f457806369d12e14146104aa578063715018a6146105715780638da5cb5b1461057b57806395f0ae76146105c5578063b17d0570146106f35761012c565b806301c6a4501461013157806310d1e85c146102005780631758078b146102ad57806366787256146102f757806369bd26cd14610406575b600080fd5b6101e6600480360361010081101561014857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d50565b604051808215151515815260200191505060405180910390f35b6102ab6004803603608081101561021657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561026757600080fd5b82018360208201111561027957600080fd5b8035906020019184600183028401116401000000008311171561029b57600080fd5b9091929391929390505050610e4f565b005b6102b56111cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ec600480360361014081101561030e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111f2565b604051808215151515815260200191505060405180910390f35b6104686004803603604081101561041c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611373565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610554600480360360e08110156104c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611492565b604051808381526020018281526020019250505060405180910390f35b6105796115df565b005b610583611767565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106d9600480360360c08110156105db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561062c57600080fd5b82018360208201111561063e57600080fd5b8035906020019184602083028401116401000000008311171561066057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611790565b604051808215151515815260200191505060405180910390f35b61081d600480360360c081101561070957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561077a57600080fd5b82018360208201111561078c57600080fd5b803590602001918460208302840111640100000000831117156107ae57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117d4565b604051808215151515815260200191505060405180910390f35b6108b96004803603606081101561084d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ea6565b005b6108c36122c6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109af600480360360e081101561091b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506122ec565b604051808381526020018281526020019250505060405180910390f35b610a22600480360360608110156109e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050612439565b604051808215151515815260200191505060405180910390f35b610af16004803603610100811015610a5357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c03565b604051808215151515815260200191505060405180910390f35b610be0600480360360c0811015610b2157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610b7257600080fd5b820183602082011115610b8457600080fd5b80359060200191846020830284011164010000000083111715610ba657600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612d02565b604051808215151515815260200191505060405180910390f35b610c3c60048036036020811015610c1057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d88565b005b610c46612f95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610cea60048036036040811015610c9e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fbb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d3461317b565b604051808260ff1660ff16815260200191505060405180910390f35b60008060149054906101000a900460ff16610dd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000610e22600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b613180565b9050809150506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d6020811015610ec157600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d6020811015610f4657600080fd5b81019080805190602001909291905050509050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561102c57600080fd5b505afa158015611040573d6000803e3d6000fd5b505050506040513d602081101561105657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461109b57fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d806000811461110a576040519150601f19603f3d011682016040523d82523d6000602084013e61110f565b606091505b509150915081801561114f575060008151148061114e575080806020019051602081101561113c57600080fd5b81019080805190602001909291905050505b5b6111c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080611270600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168f8f8f8f8f8f8f8f8f8f6135af565b9050806112e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f79d79896c25e306b5784cadedcce16307107306aef13c53aeccb242eb86306248a6040518082815260200191505060405180910390a4809150509a9950505050505050505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561144b57600080fd5b505af115801561145f573d6000803e3d6000fd5b505050506040513d602081101561147557600080fd5b810190808051906020019092919050505090508091505092915050565b600080600060149054906101000a900460ff16611517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000806115ac600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613665565b9150915081819350935050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b6115e7613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806117c4600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989898989613eee565b9050809150509695505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611877576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116118ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561193557600080fd5b505afa158015611949573d6000803e3d6000fd5b505050506040513d602081101561195f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061199657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611a27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b611a5287878373ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015611ad357600080fd5b505af1158015611ae7573d6000803e3d6000fd5b505050506040513d6040811015611afd57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015611bbb578082015181840152602081019050611ba0565b50505050905001935050505060006040518083038186803b158015611bdf57600080fd5b505afa158015611bf3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015611c1d57600080fd5b8101908080516040519392919084640100000000821115611c3d57600080fd5b83820191506020820185811115611c5357600080fd5b8251866020820283011164010000000082111715611c7057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015611ca7578082015181840152602081019050611c8c565b5050505090500160405250505090506000808b9050600083600181518110611ccb57fe5b60200260200101519050611d3581611d276103e8611d19611cf660038861410390919063ffffffff16565b611d0b6103e88961410390919063ffffffff16565b61418990919063ffffffff16565b61421190919063ffffffff16565b61425b90919063ffffffff16565b92505050611de48d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d8457600080fd5b505afa158015611d98573d6000803e3d6000fd5b505050506040513d6020811015611dae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b611e11888e838673ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a2505050611e9585838b73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b600193505050509695505050505050565b611eae613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612033576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146120f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff16612371576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff021916908315150217905550600080612406600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e614392565b9150915081819350935050506001600060146101000a81548160ff02191690831515021790555097509795505050505050565b60008060149054906101000a900460ff166124bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561251e57600080fd5b505afa158015612532573d6000803e3d6000fd5b505050506040513d602081101561254857600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156125a357600080fd5b505afa1580156125b7573d6000803e3d6000fd5b505050506040513d60208110156125cd57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156126b557600080fd5b505afa1580156126c9573d6000803e3d6000fd5b505050506040513d60208110156126df57600080fd5b81019080805190602001909291905050509050606060026040519080825280602002602001820160405280156127245781602001602082028038833980820191505090505b509050838160008151811061273557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061277d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001615b2960509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156128d15780820151818401526020810190506128b6565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561299f57600080fd5b505afa1580156129b3573d6000803e3d6000fd5b505050506040513d60208110156129c957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146129fc5760006129fe565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015612a5f57600080fd5b505afa158015612a73573d6000803e3d6000fd5b505050506040513d6020811015612a8957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612abb578b612abe565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b6d578082015181840152602081019050612b52565b50505050905090810190601f168015612b9a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015612bbc57600080fd5b505af1158015612bd0573d6000803e3d6000fd5b50505050600199505050505050505050506001600060146101000a81548160ff0219169083151502179055509392505050565b60008060149054906101000a900460ff16612c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055506000612cd5600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614bdf565b9050809150506001600060146101000a81548160ff02191690831515021790555098975050505050505050565b600080612d77600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961500b565b905080915050979650505050505050565b612d90613ee6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612e51576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ed7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180615ae26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561309157600080fd5b505afa1580156130a5573d6000803e3d6000fd5b505050506040513d60208110156130bb57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613171576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600281565b60006131af3330888b73ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b6000806131bd8b8a30615162565b915091508882146131ca57fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561327157600080fd5b505af1158015613285573d6000803e3d6000fd5b505050506040513d602081101561329b57600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561335457600080fd5b505af1158015613368573d6000803e3d6000fd5b505050506040513d602081101561337e57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561349f57600080fd5b505af11580156134b3573d6000803e3d6000fd5b505050506040513d60608110156134c957600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061359c33828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561353c57600080fd5b505afa158015613550573d6000803e3d6000fd5b505050506040513d602081101561356657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b6001925050509998505050505050505050565b6000806135c48f8f8f8f8f8c8c8c8c8c614392565b50905060006135da8f8c8c858d8c8c8c8c613180565b90508061364f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f4144445f4c49515549444954595f4641494c0000000000000000000081525060200191505060405180910390fd5b80925050509d9c50505050505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136b057600080fd5b505afa1580156136c4573d6000803e3d6000fd5b505050506040513d60208110156136da57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156137a057600080fd5b505afa1580156137b4573d6000803e3d6000fd5b505050506040513d60208110156137ca57600080fd5b8101908080519060200190929190505050905061380a33308b8473ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156138b157600080fd5b505af11580156138c5573d6000803e3d6000fd5b505050506040513d60208110156138db57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156139f757600080fd5b505af1158015613a0b573d6000803e3d6000fd5b505050506040513d6040811015613a2157600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613aec57600080fd5b505af1158015613b00573d6000803e3d6000fd5b505050506040513d6020811015613b1657600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bcf57600080fd5b505af1158015613be3573d6000803e3d6000fd5b505050506040513d6020811015613bf957600080fd5b8101908080519060200190929190505050506000613d65670de0b6b3a7640000613d578473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c6157600080fd5b505afa158015613c75573d6000803e3d6000fd5b505050506040513d6020811015613c8b57600080fd5b8101908080519060200190929190505050613d49670de0b6b3a7640000613d3b8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613cf157600080fd5b505afa158015613d05573d6000803e3d6000fd5b505050506040513d6020811015613d1b57600080fd5b81019080805190602001909291905050508b61410390919063ffffffff16565b61410390919063ffffffff16565b61421190919063ffffffff16565b61421190919063ffffffff16565b9050613d943330838573ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613e4f57600080fd5b505af1158015613e63573d6000803e3d6000fd5b505050506040513d6060811015613e7957600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050505050613ece87828d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600033905090565b6000806000613efe898930615162565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f4a57600080fd5b505afa158015613f5e573d6000803e3d6000fd5b505050506040513d6020811015613f7457600080fd5b810190808051906020019092919050505090506000613f988c83858c8c8c8c615362565b9150508061400e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61403987858d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b80945050505050979650505050505050565b6140fe8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156c5565b505050565b6000808314156141165760009050614183565b600082840290508284828161412757fe5b041461417e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615b086021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015614207576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061425383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615910565b905092915050565b600061429d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506159d6565b905092915050565b61438c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506156c5565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561444d57600080fd5b505afa158015614461573d6000803e3d6000fd5b505050506040513d602081101561447757600080fd5b810190808051906020019092919050505090506144b733308b8473ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561455e57600080fd5b505af1158015614572573d6000803e3d6000fd5b505050506040513d602081101561458857600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156146a457600080fd5b505af11580156146b8573d6000803e3d6000fd5b505050506040513d60408110156146ce57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561473557600080fd5b505afa158015614749573d6000803e3d6000fd5b505050506040513d602081101561475f57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561481957600080fd5b505af115801561482d573d6000803e3d6000fd5b505050506040513d602081101561484357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156148fc57600080fd5b505af1158015614910573d6000803e3d6000fd5b505050506040513d602081101561492657600080fd5b8101908080519060200190929190505050506000614a5e8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561498357600080fd5b505afa158015614997573d6000803e3d6000fd5b505050506040513d60208110156149ad57600080fd5b8101908080519060200190929190505050614a508773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015614a0657600080fd5b505afa158015614a1a573d6000803e3d6000fd5b505050506040513d6020811015614a3057600080fd5b81019080805190602001909291905050508761410390919063ffffffff16565b61421190919063ffffffff16565b9050614a8d3330838573ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015614b4a57600080fd5b505af1158015614b5e573d6000803e3d6000fd5b505050506040513d6060811015614b7457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614bc787828d73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b6000614c0e3330888b73ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b600080614c1c8b8a30615162565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015614c6857600080fd5b505afa158015614c7c573d6000803e3d6000fd5b505050506040513d6020811015614c9257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614d4c57600080fd5b505af1158015614d60573d6000803e3d6000fd5b505050506040513d6020811015614d7657600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614e2f57600080fd5b505af1158015614e43573d6000803e3d6000fd5b505050506040513d6020811015614e5957600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015614f7a57600080fd5b505af1158015614f8e573d6000803e3d6000fd5b505050506040513d6060811015614fa457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050614ff733848e73ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061501b898930615162565b9150915060006150308b8b858b8b8b8b615362565b915050806150a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61515186838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150f157600080fd5b505afa158015615105573d6000803e3d6000fd5b505050506040513d602081101561511b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661404b9092919063ffffffff16565b809350505050979650505050505050565b600080600084116151db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6152883386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561522757600080fd5b505afa15801561523b573d6000803e3d6000fd5b505050506040513d602081101561525157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166142a5909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561530957600080fd5b505af115801561531d573d6000803e3d6000fd5b505050506040513d604081101561533357600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff168560008151811061538a57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461541b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156154c257600080fd5b505af11580156154d6573d6000803e3d6000fd5b505050506040513d60208110156154ec57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156155b557808201518184015260208101905061559a565b505050509050019650505050505050600060405180830381600087803b1580156155de57600080fd5b505af11580156155f2573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561561c57600080fd5b810190808051604051939291908464010000000082111561563c57600080fd5b8382019150602082018581111561565257600080fd5b825186602082028301116401000000008211171561566f57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156156a657808201518184015260208101905061568b565b5050505090500160405250505091506001905097509795505050505050565b6156e48273ffffffffffffffffffffffffffffffffffffffff16615a96565b615756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106157a55780518252602082019150602081019050602083039250615782565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114615807576040519150601f19603f3d011682016040523d82523d6000602084013e61580c565b606091505b509150915081615884576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561590a578080602001905160208110156158a357600080fd5b8101908080519060200190929190505050615909576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615b79602a913960400191505060405180910390fd5b5b50505050565b600080831182906159bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615981578082015181840152602081019050615966565b50505050905090810190601f1680156159ae5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816159c857fe5b049050809150509392505050565b6000838311158290615a83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615a48578082015181840152602081019050615a2d565b50505050905090810190601f168015615a755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015615ad857506000801b8214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b819619c789f1cb015f54ebe2b2562b3e4bc731a32f5b3448e58f18ab00968be64736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620053d1380380620053d1833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050614ff380620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063c45a015511610097578063d9b3612511610066578063d9b361251461097b578063f887ea4014610a6a578063fd52c6bb14610ab4578063ffa1ad7414610b5857610100565b8063c45a01551461072b578063cc84fde714610775578063cd0455241461083c578063d580c622146108ac57610100565b806369bd26cd116100d357806369bd26cd1461034e57806369d12e14146103f257806395f0ae76146104b9578063b17d0570146105e757610100565b806301c6a4501461010557806306fdde03146101d457806310d1e85c146102575780631758078b14610304575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b7c565b604051808215151515815260200191505060405180910390f35b6101dc610c7a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561021c578082015181840152602081019050610201565b50505050905090810190601f1680156102495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103026004803603608081101561026d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460018302840111640100000000831117156102f257600080fd5b9091929391929390505050610cb3565b005b61030c611030565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103b06004803603604081101561036457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611056565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61049c600480360360e081101561040857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611175565b604051808381526020018281526020019250505060405180910390f35b6105cd600480360360c08110156104cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561052057600080fd5b82018360208201111561053257600080fd5b8035906020019184602083028401116401000000008311171561055457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112c0565b604051808215151515815260200191505060405180910390f35b610711600480360360c08110156105fd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561066e57600080fd5b82018360208201111561068057600080fd5b803590602001918460208302840111640100000000831117156106a257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611304565b604051808215151515815260200191505060405180910390f35b6107336119d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61081f600480360360e081101561078b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506119fc565b604051808381526020018281526020019250505060405180910390f35b6108926004803603606081101561085257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b47565b604051808215151515815260200191505060405180910390f35b61096160048036036101008110156108c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612310565b604051808215151515815260200191505060405180910390f35b610a50600480360360c081101561099157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109e257600080fd5b8201836020820111156109f457600080fd5b80359060200191846020830284011164010000000083111715610a1657600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061240e565b604051808215151515815260200191505060405180910390f35b610a72612494565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b1660048036036040811015610aca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b6061267a565b604051808260ff1660ff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c4e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61267f565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b6040518060400160405280602081526020017f5072696d697469766520563120556e697377617020436f6e6e6563746f72203281525081565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610cfb57600080fd5b505afa158015610d0f573d6000803e3d6000fd5b505050506040513d6020811015610d2557600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8057600080fd5b505afa158015610d94573d6000803e3d6000fd5b505050506040513d6020811015610daa57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e9057600080fd5b505afa158015610ea4573d6000803e3d6000fd5b505050506040513d6020811015610eba57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eff57fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610f6e576040519150601f19603f3d011682016040523d82523d6000602084013e610f73565b606091505b5091509150818015610fb35750600081511480610fb25750808060200190516020811015610fa057600080fd5b81019080805190602001909291905050505b5b611025576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561112e57600080fd5b505af1158015611142573d6000803e3d6000fd5b505050506040513d602081101561115857600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061128e600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612aae565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b6000806112f4600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1689898989898961332f565b9050809150509695505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161141d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561146557600080fd5b505afa158015611479573d6000803e3d6000fd5b505050506040513d602081101561148f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114c657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61158287878373ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b505050506040513d604081101561162d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116eb5780820151818401526020810190506116d0565b50505050905001935050505060006040518083038186803b15801561170f57600080fd5b505afa158015611723573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561174d57600080fd5b810190808051604051939291908464010000000082111561176d57600080fd5b8382019150602082018581111561178357600080fd5b82518660208202830111640100000000821117156117a057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117d75780820151818401526020810190506117bc565b5050505090500160405250505090506000808b90506000836001815181106117fb57fe5b60200260200101519050611865816118576103e861184961182660038861354490919063ffffffff16565b61183b6103e88961354490919063ffffffff16565b6135ca90919063ffffffff16565b61365290919063ffffffff16565b61369c90919063ffffffff16565b925050506119148d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118b457600080fd5b505afa1580156118c8573d6000803e3d6000fd5b505050506040513d60208110156118de57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b611941888e838673ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a25050506119c585838b73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b15600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137d3565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2c57600080fd5b505afa158015611c40573d6000803e3d6000fd5b505050506040513d6020811015611c5657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cb157600080fd5b505afa158015611cc5573d6000803e3d6000fd5b505050506040513d6020811015611cdb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dc357600080fd5b505afa158015611dd7573d6000803e3d6000fd5b505050506040513d6020811015611ded57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e325781602001602082028038833980820191505090505b5090508381600081518110611e4357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e8b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4460509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fdf578082015181840152602081019050611fc4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120ad57600080fd5b505afa1580156120c1573d6000803e3d6000fd5b505050506040513d60208110156120d757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461210a57600061210c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561216d57600080fd5b505afa158015612181573d6000803e3d6000fd5b505050506040513d602081101561219757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121c9578b6121cc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561227b578082015181840152602081019050612260565b50505050905090810190601f1680156122a85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122ca57600080fd5b505af11580156122de573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff16612393576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123e2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614020565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612483600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961444c565b905080915050979650505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561259057600080fd5b505afa1580156125a4573d6000803e3d6000fd5b505050506040513d60208110156125ba57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612670576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600281565b60006126ae3330888b73ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b6000806126bc8b8a306145a3565b915091508882146126c957fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277057600080fd5b505af1158015612784573d6000803e3d6000fd5b505050506040513d602081101561279a57600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285357600080fd5b505af1158015612867573d6000803e3d6000fd5b505050506040513d602081101561287d57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561299e57600080fd5b505af11580156129b2573d6000803e3d6000fd5b505050506040513d60608110156129c857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612a9b33828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3b57600080fd5b505afa158015612a4f573d6000803e3d6000fd5b505050506040513d6020811015612a6557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612af957600080fd5b505afa158015612b0d573d6000803e3d6000fd5b505050506040513d6020811015612b2357600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612be957600080fd5b505afa158015612bfd573d6000803e3d6000fd5b505050506040513d6020811015612c1357600080fd5b81019080805190602001909291905050509050612c5333308b8473ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612cfa57600080fd5b505af1158015612d0e573d6000803e3d6000fd5b505050506040513d6020811015612d2457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4057600080fd5b505af1158015612e54573d6000803e3d6000fd5b505050506040513d6040811015612e6a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f3557600080fd5b505af1158015612f49573d6000803e3d6000fd5b505050506040513d6020811015612f5f57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561301857600080fd5b505af115801561302c573d6000803e3d6000fd5b505050506040513d602081101561304257600080fd5b81019080805190602001909291905050505060006131ae670de0b6b3a76400006131a08473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130aa57600080fd5b505afa1580156130be573d6000803e3d6000fd5b505050506040513d60208110156130d457600080fd5b8101908080519060200190929190505050613192670de0b6b3a76400006131848873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561313a57600080fd5b505afa15801561314e573d6000803e3d6000fd5b505050506040513d602081101561316457600080fd5b81019080805190602001909291905050508b61354490919063ffffffff16565b61354490919063ffffffff16565b61365290919063ffffffff16565b61365290919063ffffffff16565b90506131dd3330838573ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561329857600080fd5b505af11580156132ac573d6000803e3d6000fd5b505050506040513d60608110156132c257600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061331787828d73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061333f8989306145a3565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561338b57600080fd5b505afa15801561339f573d6000803e3d6000fd5b505050506040513d60208110156133b557600080fd5b8101908080519060200190929190505050905060006133d98c83858c8c8c8c6147a3565b9150508061344f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61347a87858d73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b80945050505050979650505050505050565b61353f8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b06565b505050565b60008083141561355757600090506135c4565b600082840290508284828161356857fe5b04146135bf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f236021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613648576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d51565b905092915050565b60006136de83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e17565b905092915050565b6137cd846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b06565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561388e57600080fd5b505afa1580156138a2573d6000803e3d6000fd5b505050506040513d60208110156138b857600080fd5b810190808051906020019092919050505090506138f833308b8473ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561399f57600080fd5b505af11580156139b3573d6000803e3d6000fd5b505050506040513d60208110156139c957600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ae557600080fd5b505af1158015613af9573d6000803e3d6000fd5b505050506040513d6040811015613b0f57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b7657600080fd5b505afa158015613b8a573d6000803e3d6000fd5b505050506040513d6020811015613ba057600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c5a57600080fd5b505af1158015613c6e573d6000803e3d6000fd5b505050506040513d6020811015613c8457600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d3d57600080fd5b505af1158015613d51573d6000803e3d6000fd5b505050506040513d6020811015613d6757600080fd5b8101908080519060200190929190505050506000613e9f8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dc457600080fd5b505afa158015613dd8573d6000803e3d6000fd5b505050506040513d6020811015613dee57600080fd5b8101908080519060200190929190505050613e918773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4757600080fd5b505afa158015613e5b573d6000803e3d6000fd5b505050506040513d6020811015613e7157600080fd5b81019080805190602001909291905050508761354490919063ffffffff16565b61365290919063ffffffff16565b9050613ece3330838573ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f8b57600080fd5b505af1158015613f9f573d6000803e3d6000fd5b505050506040513d6060811015613fb557600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061400887828d73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061404f3330888b73ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b60008061405d8b8a306145a3565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140a957600080fd5b505afa1580156140bd573d6000803e3d6000fd5b505050506040513d60208110156140d357600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561418d57600080fd5b505af11580156141a1573d6000803e3d6000fd5b505050506040513d60208110156141b757600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427057600080fd5b505af1158015614284573d6000803e3d6000fd5b505050506040513d602081101561429a57600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143bb57600080fd5b505af11580156143cf573d6000803e3d6000fd5b505050506040513d60608110156143e557600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061443833848e73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061445c8989306145a3565b9150915060006144718b8b858b8b8b8b6147a3565b915050806144e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459286838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453257600080fd5b505afa158015614546573d6000803e3d6000fd5b505050506040513d602081101561455c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b809350505050979650505050505050565b6000806000841161461c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146c93386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561466857600080fd5b505afa15801561467c573d6000803e3d6000fd5b505050506040513d602081101561469257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561474a57600080fd5b505af115801561475e573d6000803e3d6000fd5b505050506040513d604081101561477457600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147cb57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461485c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490357600080fd5b505af1158015614917573d6000803e3d6000fd5b505050506040513d602081101561492d57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156149f65780820151818401526020810190506149db565b505050509050019650505050505050600060405180830381600087803b158015614a1f57600080fd5b505af1158015614a33573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a5d57600080fd5b8101908080516040519392919084640100000000821115614a7d57600080fd5b83820191506020820185811115614a9357600080fd5b8251866020820283011164010000000082111715614ab057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614ae7578082015181840152602081019050614acc565b5050505090500160405250505091506001905097509795505050505050565b614b258273ffffffffffffffffffffffffffffffffffffffff16614ed7565b614b97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614be65780518252602082019150602081019050602083039250614bc3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c48576040519150601f19603f3d011682016040523d82523d6000602084013e614c4d565b606091505b509150915081614cc5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d4b57808060200190516020811015614ce457600080fd5b8101908080519060200190929190505050614d4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f94602a913960400191505060405180910390fd5b5b50505050565b60008083118290614dfd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dc2578082015181840152602081019050614da7565b50505050905090810190601f168015614def5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e0957fe5b049050809150509392505050565b6000838311158290614ec4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e89578082015181840152602081019050614e6e565b50505050905090810190601f168015614eb65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f1957506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212205b59bbcf458d44a0ce6310cf96afd2eb95f15471fc3e389b01afb647af24374664736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063c45a015511610097578063d9b3612511610066578063d9b361251461097b578063f887ea4014610a6a578063fd52c6bb14610ab4578063ffa1ad7414610b5857610100565b8063c45a01551461072b578063cc84fde714610775578063cd0455241461083c578063d580c622146108ac57610100565b806369bd26cd116100d357806369bd26cd1461034e57806369d12e14146103f257806395f0ae76146104b9578063b17d0570146105e757610100565b806301c6a4501461010557806306fdde03146101d457806310d1e85c146102575780631758078b14610304575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b7c565b604051808215151515815260200191505060405180910390f35b6101dc610c7a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561021c578082015181840152602081019050610201565b50505050905090810190601f1680156102495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103026004803603608081101561026d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460018302840111640100000000831117156102f257600080fd5b9091929391929390505050610cb3565b005b61030c611030565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103b06004803603604081101561036457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611056565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61049c600480360360e081101561040857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611175565b604051808381526020018281526020019250505060405180910390f35b6105cd600480360360c08110156104cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561052057600080fd5b82018360208201111561053257600080fd5b8035906020019184602083028401116401000000008311171561055457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112c0565b604051808215151515815260200191505060405180910390f35b610711600480360360c08110156105fd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561066e57600080fd5b82018360208201111561068057600080fd5b803590602001918460208302840111640100000000831117156106a257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611304565b604051808215151515815260200191505060405180910390f35b6107336119d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61081f600480360360e081101561078b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506119fc565b604051808381526020018281526020019250505060405180910390f35b6108926004803603606081101561085257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b47565b604051808215151515815260200191505060405180910390f35b61096160048036036101008110156108c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612310565b604051808215151515815260200191505060405180910390f35b610a50600480360360c081101561099157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109e257600080fd5b8201836020820111156109f457600080fd5b80359060200191846020830284011164010000000083111715610a1657600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061240e565b604051808215151515815260200191505060405180910390f35b610a72612494565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b1660048036036040811015610aca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ba565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b6061267a565b604051808260ff1660ff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c4e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61267f565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b6040518060400160405280602081526020017f5072696d697469766520563120556e697377617020436f6e6e6563746f72203281525081565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610cfb57600080fd5b505afa158015610d0f573d6000803e3d6000fd5b505050506040513d6020811015610d2557600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8057600080fd5b505afa158015610d94573d6000803e3d6000fd5b505050506040513d6020811015610daa57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e9057600080fd5b505afa158015610ea4573d6000803e3d6000fd5b505050506040513d6020811015610eba57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eff57fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610f6e576040519150601f19603f3d011682016040523d82523d6000602084013e610f73565b606091505b5091509150818015610fb35750600081511480610fb25750808060200190516020811015610fa057600080fd5b81019080805190602001909291905050505b5b611025576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561112e57600080fd5b505af1158015611142573d6000803e3d6000fd5b505050506040513d602081101561115857600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061128e600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612aae565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b6000806112f4600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1689898989898961332f565b9050809150509695505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161141d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561146557600080fd5b505afa158015611479573d6000803e3d6000fd5b505050506040513d602081101561148f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114c657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61158287878373ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b505050506040513d604081101561162d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116eb5780820151818401526020810190506116d0565b50505050905001935050505060006040518083038186803b15801561170f57600080fd5b505afa158015611723573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561174d57600080fd5b810190808051604051939291908464010000000082111561176d57600080fd5b8382019150602082018581111561178357600080fd5b82518660208202830111640100000000821117156117a057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117d75780820151818401526020810190506117bc565b5050505090500160405250505090506000808b90506000836001815181106117fb57fe5b60200260200101519050611865816118576103e861184961182660038861354490919063ffffffff16565b61183b6103e88961354490919063ffffffff16565b6135ca90919063ffffffff16565b61365290919063ffffffff16565b61369c90919063ffffffff16565b925050506119148d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118b457600080fd5b505afa1580156118c8573d6000803e3d6000fd5b505050506040513d60208110156118de57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b611941888e838673ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f694ae8601612590694b273c5a0a45e504370848134384d3a9a5b7f4fa39b7e308683604051808381526020018281526020019250505060405180910390a25050506119c585838b73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b15600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137d3565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2c57600080fd5b505afa158015611c40573d6000803e3d6000fd5b505050506040513d6020811015611c5657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cb157600080fd5b505afa158015611cc5573d6000803e3d6000fd5b505050506040513d6020811015611cdb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dc357600080fd5b505afa158015611dd7573d6000803e3d6000fd5b505050506040513d6020811015611ded57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e325781602001602082028038833980820191505090505b5090508381600081518110611e4357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e8b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4460509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fdf578082015181840152602081019050611fc4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120ad57600080fd5b505afa1580156120c1573d6000803e3d6000fd5b505050506040513d60208110156120d757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461210a57600061210c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561216d57600080fd5b505afa158015612181573d6000803e3d6000fd5b505050506040513d602081101561219757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121c9578b6121cc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561227b578082015181840152602081019050612260565b50505050905090810190601f1680156122a85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122ca57600080fd5b505af11580156122de573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff16612393576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123e2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614020565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612483600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961444c565b905080915050979650505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561259057600080fd5b505afa1580156125a4573d6000803e3d6000fd5b505050506040513d60208110156125ba57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612670576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600281565b60006126ae3330888b73ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b6000806126bc8b8a306145a3565b915091508882146126c957fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277057600080fd5b505af1158015612784573d6000803e3d6000fd5b505050506040513d602081101561279a57600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285357600080fd5b505af1158015612867573d6000803e3d6000fd5b505050506040513d602081101561287d57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561299e57600080fd5b505af11580156129b2573d6000803e3d6000fd5b505050506040513d60608110156129c857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612a9b33828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3b57600080fd5b505afa158015612a4f573d6000803e3d6000fd5b505050506040513d6020811015612a6557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612af957600080fd5b505afa158015612b0d573d6000803e3d6000fd5b505050506040513d6020811015612b2357600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612be957600080fd5b505afa158015612bfd573d6000803e3d6000fd5b505050506040513d6020811015612c1357600080fd5b81019080805190602001909291905050509050612c5333308b8473ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612cfa57600080fd5b505af1158015612d0e573d6000803e3d6000fd5b505050506040513d6020811015612d2457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4057600080fd5b505af1158015612e54573d6000803e3d6000fd5b505050506040513d6040811015612e6a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f3557600080fd5b505af1158015612f49573d6000803e3d6000fd5b505050506040513d6020811015612f5f57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561301857600080fd5b505af115801561302c573d6000803e3d6000fd5b505050506040513d602081101561304257600080fd5b81019080805190602001909291905050505060006131ae670de0b6b3a76400006131a08473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130aa57600080fd5b505afa1580156130be573d6000803e3d6000fd5b505050506040513d60208110156130d457600080fd5b8101908080519060200190929190505050613192670de0b6b3a76400006131848873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561313a57600080fd5b505afa15801561314e573d6000803e3d6000fd5b505050506040513d602081101561316457600080fd5b81019080805190602001909291905050508b61354490919063ffffffff16565b61354490919063ffffffff16565b61365290919063ffffffff16565b61365290919063ffffffff16565b90506131dd3330838573ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561329857600080fd5b505af11580156132ac573d6000803e3d6000fd5b505050506040513d60608110156132c257600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061331787828d73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061333f8989306145a3565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561338b57600080fd5b505afa15801561339f573d6000803e3d6000fd5b505050506040513d60208110156133b557600080fd5b8101908080519060200190929190505050905060006133d98c83858c8c8c8c6147a3565b9150508061344f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61347a87858d73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b80945050505050979650505050505050565b61353f8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b06565b505050565b60008083141561355757600090506135c4565b600082840290508284828161356857fe5b04146135bf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f236021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613648576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d51565b905092915050565b60006136de83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e17565b905092915050565b6137cd846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b06565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561388e57600080fd5b505afa1580156138a2573d6000803e3d6000fd5b505050506040513d60208110156138b857600080fd5b810190808051906020019092919050505090506138f833308b8473ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561399f57600080fd5b505af11580156139b3573d6000803e3d6000fd5b505050506040513d60208110156139c957600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613ae557600080fd5b505af1158015613af9573d6000803e3d6000fd5b505050506040513d6040811015613b0f57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b7657600080fd5b505afa158015613b8a573d6000803e3d6000fd5b505050506040513d6020811015613ba057600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c5a57600080fd5b505af1158015613c6e573d6000803e3d6000fd5b505050506040513d6020811015613c8457600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d3d57600080fd5b505af1158015613d51573d6000803e3d6000fd5b505050506040513d6020811015613d6757600080fd5b8101908080519060200190929190505050506000613e9f8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dc457600080fd5b505afa158015613dd8573d6000803e3d6000fd5b505050506040513d6020811015613dee57600080fd5b8101908080519060200190929190505050613e918773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4757600080fd5b505afa158015613e5b573d6000803e3d6000fd5b505050506040513d6020811015613e7157600080fd5b81019080805190602001909291905050508761354490919063ffffffff16565b61365290919063ffffffff16565b9050613ece3330838573ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f8b57600080fd5b505af1158015613f9f573d6000803e3d6000fd5b505050506040513d6060811015613fb557600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061400887828d73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061404f3330888b73ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b60008061405d8b8a306145a3565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140a957600080fd5b505afa1580156140bd573d6000803e3d6000fd5b505050506040513d60208110156140d357600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561418d57600080fd5b505af11580156141a1573d6000803e3d6000fd5b505050506040513d60208110156141b757600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427057600080fd5b505af1158015614284573d6000803e3d6000fd5b505050506040513d602081101561429a57600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143bb57600080fd5b505af11580156143cf573d6000803e3d6000fd5b505050506040513d60608110156143e557600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061443833848e73ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061445c8989306145a3565b9150915060006144718b8b858b8b8b8b6147a3565b915050806144e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459286838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453257600080fd5b505afa158015614546573d6000803e3d6000fd5b505050506040513d602081101561455c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661348c9092919063ffffffff16565b809350505050979650505050505050565b6000806000841161461c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146c93386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561466857600080fd5b505afa15801561467c573d6000803e3d6000fd5b505050506040513d602081101561469257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e6909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561474a57600080fd5b505af115801561475e573d6000803e3d6000fd5b505050506040513d604081101561477457600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147cb57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461485c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490357600080fd5b505af1158015614917573d6000803e3d6000fd5b505050506040513d602081101561492d57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156149f65780820151818401526020810190506149db565b505050509050019650505050505050600060405180830381600087803b158015614a1f57600080fd5b505af1158015614a33573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a5d57600080fd5b8101908080516040519392919084640100000000821115614a7d57600080fd5b83820191506020820185811115614a9357600080fd5b8251866020820283011164010000000082111715614ab057600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614ae7578082015181840152602081019050614acc565b5050505090500160405250505091506001905097509795505050505050565b614b258273ffffffffffffffffffffffffffffffffffffffff16614ed7565b614b97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614be65780518252602082019150602081019050602083039250614bc3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c48576040519150601f19603f3d011682016040523d82523d6000602084013e614c4d565b606091505b509150915081614cc5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d4b57808060200190516020811015614ce457600080fd5b8101908080519060200190929190505050614d4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f94602a913960400191505060405180910390fd5b5b50505050565b60008083118290614dfd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dc2578082015181840152602081019050614da7565b50505050905090810190601f168015614def5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e0957fe5b049050809150509392505050565b6000838311158290614ec4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e89578082015181840152602081019050614e6e565b50505050905090810190601f168015614eb65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f1957506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212205b59bbcf458d44a0ce6310cf96afd2eb95f15471fc3e389b01afb647af24374664736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/UniswapConnector02.json b/artifacts/UniswapConnector02.json new file mode 100644 index 00000000..5a2e3cd9 --- /dev/null +++ b/artifacts/UniswapConnector02.json @@ -0,0 +1,586 @@ +{ + "contractName": "UniswapConnector02", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "router_", + "type": "address" + }, + { + "internalType": "address", + "name": "factory_", + "type": "address" + }, + { + "internalType": "address", + "name": "trader_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "premium", + "type": "uint256" + } + ], + "name": "FlashOpened", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantityOtherTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOptionTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOtherTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLongLiquidityWithUnderlying", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantityOtherTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOtherTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addShortLiquidityWithUnderlying", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherToken", + "type": "address" + } + ], + "name": "deployUniswapMarket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pairAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "flashLoanQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "flashMintShortOptionsThenSwap", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + } + ], + "name": "getUniswapMarketForTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintLongOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintShortOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + } + ], + "name": "openFlashLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLongLiquidityThenCloseOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeShortLiquidityThenCloseOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trader", + "outputs": [ + { + "internalType": "contract ITrader", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "uniswapV2Call", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b50604051620053dc380380620053dc833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050614ffe80620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d136d33b871865713b819675eed6a1a8dbf937bf04fd2865ee02f2a8611cd77864736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d136d33b871865713b819675eed6a1a8dbf937bf04fd2865ee02f2a8611cd77864736f6c63430006020033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/UniswapConnectorLib.json b/artifacts/UniswapConnectorLib.json index b57bccdb..ebedecef 100644 --- a/artifacts/UniswapConnectorLib.json +++ b/artifacts/UniswapConnectorLib.json @@ -1,8 +1,8 @@ { "contractName": "UniswapConnectorLib", "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fc71f08a1fcc095dd44e5be6f0a1498f8f2c869822caf1eccfcca802054c947164736f6c63430006020033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fc71f08a1fcc095dd44e5be6f0a1498f8f2c869822caf1eccfcca802054c947164736f6c63430006020033", + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c69f8f98441a70cc6d049afb95e66e5c35a95c4a669d80e29b0e8e6372276a5b64736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c69f8f98441a70cc6d049afb95e66e5c35a95c4a669d80e29b0e8e6372276a5b64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/UniswapConnectorLib02.json b/artifacts/UniswapConnectorLib02.json new file mode 100644 index 00000000..78db1ed3 --- /dev/null +++ b/artifacts/UniswapConnectorLib02.json @@ -0,0 +1,8 @@ +{ + "contractName": "UniswapConnectorLib02", + "abi": [], + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204d47d390fea8d4e4f781858ddf7f888bf295bd789c00aa0f7c1535369576e69c64736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204d47d390fea8d4e4f781858ddf7f888bf295bd789c00aa0f7c1535369576e69c64736f6c63430006020033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/contracts/connectors/Uniswap/IUniswapConnector.sol b/contracts/connectors/Uniswap/IUniswapConnector.sol deleted file mode 100644 index 4491a068..00000000 --- a/contracts/connectors/Uniswap/IUniswapConnector.sol +++ /dev/null @@ -1,3 +0,0 @@ -pragma solidity >=0.6.0; - -interface IUniswapConnector {} diff --git a/contracts/connectors/Uniswap/IUniswapConnector02.sol b/contracts/connectors/Uniswap/IUniswapConnector02.sol new file mode 100644 index 00000000..b0435e67 --- /dev/null +++ b/contracts/connectors/Uniswap/IUniswapConnector02.sol @@ -0,0 +1,107 @@ +pragma solidity >=0.6.0; + +import { + IUniswapV2Router02 +} from "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; +import { + IUniswapV2Factory +} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; +import { ITrader } from "../../option/interfaces/ITrader.sol"; +import { IOption, IERC20 } from "../../option/interfaces/IOption.sol"; + +interface IUniswapConnector02 { + // ==== Combo Operations ==== + + function mintLongOptionsThenSwapToTokens( + IOption optionToken, + uint256 amountIn, + uint256 amountOutMin, + address[] calldata path, + address to, + uint256 deadline + ) external returns (bool); + + function mintShortOptionsThenSwapToTokens( + IOption optionToken, + uint256 amountIn, + uint256 amountOutMin, + address[] calldata path, + address to, + uint256 deadline + ) external returns (bool); + + // ==== Flash Open Functions ==== + + function openFlashLong( + IOption optionToken, + uint256 amountOptions, + uint256 amountOutMin + ) external returns (bool); + + // ==== Liquidity Functions ==== + + function addLongLiquidityWithUnderlying( + address optionAddress, + address otherTokenAddress, + uint256 quantityOptions, + uint256 quantityOtherTokens, + uint256 minOptionTokens, + uint256 minOtherTokens, + address to, + uint256 deadline + ) external returns (bool); + + function addShortLiquidityWithUnderlying( + address optionAddress, + address otherTokenAddress, + uint256 quantityOptions, + uint256 quantityOtherTokens, + uint256 minShortTokens, + uint256 minOtherTokens, + address to, + uint256 deadline + ) external returns (bool); + + function removeLongLiquidityThenCloseOptions( + address optionAddress, + address otherTokenAddress, + uint256 liquidity, + uint256 amountAMin, + uint256 amountBMin, + address to, + uint256 deadline + ) external returns (uint256, uint256); + + function removeShortLiquidityThenCloseOptions( + address optionAddress, + address otherTokenAddress, + uint256 liquidity, + uint256 amountAMin, + uint256 amountBMin, + address to, + uint256 deadline + ) external returns (uint256, uint256); + + // ==== Management Functions ==== + + function deployUniswapMarket(address optionAddress, address otherToken) + external + returns (address); + + // ==== View ==== + + function getUniswapMarketForTokens(address token0, address token1) + external + view + returns (address); + + function getName() external pure returns (string memory); + + function getVersion() external pure returns (uint8); + + function router() external view returns (IUniswapV2Router02); + + function factory() external view returns (IUniswapV2Factory); + + function trader() external view returns (ITrader); +} diff --git a/contracts/connectors/Uniswap/UniswapConnector.sol b/contracts/connectors/Uniswap/UniswapConnector.sol deleted file mode 100644 index 9170c328..00000000 --- a/contracts/connectors/Uniswap/UniswapConnector.sol +++ /dev/null @@ -1,488 +0,0 @@ -pragma solidity >=0.6.0; - -/** - * @title Combines Uniswap V2 Protocol functions with Primitive V1. - * @author Primitive - */ - -// Uniswap -import { - IUniswapV2Callee -} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol"; -import { - IUniswapV2Router02 -} from "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; -import { - IUniswapV2Factory -} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; -import { - IUniswapV2Pair -} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; -// Primitive -import { IOption } from "../../option/interfaces/IOption.sol"; -import { ITrader } from "../../option/interfaces/ITrader.sol"; -import { TraderLib } from "../../option/libraries/TraderLib.sol"; -import { UniswapConnectorLib } from "./UniswapConnectorLib.sol"; -// Open Zeppelin -import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; -import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; -import { - ReentrancyGuard -} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; - -contract UniswapConnector is Ownable, ReentrancyGuard, IUniswapV2Callee { - using SafeMath for uint256; - using SafeERC20 for IERC20; - - IUniswapV2Router02 public router; - IUniswapV2Factory public factory; - ITrader public trader; - - uint8 public constant VERSION = 2; - string public constant name = "Primitive V1 Uniswap Connector 2"; - - event Initialized(address indexed from); - event FlashedShortOption( - address indexed from, - uint256 quantity, - uint256 premium - ); - - // solhint-disable-next-line no-empty-blocks - constructor() public {} - - // ==== Setup Functions ==== - - function initialize( - address router_, - address factory_, - address trader_ - ) external onlyOwner { - require(address(router) == address(0x0), "ERR_INITIALIZED"); - require(address(factory) == address(0x0), "ERR_INITIALIZED"); - require(address(trader) == address(0x0), "ERR_INITIALIZED"); - router = IUniswapV2Router02(router_); - factory = IUniswapV2Factory(factory_); - trader = ITrader(trader_); - emit Initialized(msg.sender); - } - - // ==== Combo Operations ==== - - /** - * @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. - * Combines Primitive "mintOptions" function with Uniswap V2 Router "swapExactTokensForTokens" function. - * @notice If the first address in the path is not the optionToken address, the tx will fail. - * underlyingToken -> optionToken -> quoteToken. - * @param optionToken The address of the Oracle-less Primitive option. - * @param amountIn The quantity of longOptionTokens to mint and then sell. - * @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens. - * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option. - * @param to The address to send the optionToken proceeds and redeem tokens to. - * @param deadline The timestamp for a trade to fail at if not successful. - * @return bool Whether the transaction was successful or not. - */ - function mintLongOptionsThenSwapToTokens( - IOption optionToken, - uint256 amountIn, - uint256 amountOutMin, - address[] calldata path, - address to, - uint256 deadline - ) external returns (bool) { - bool success = UniswapConnectorLib.mintLongOptionsThenSwapToTokens( - router, - optionToken, - amountIn, - amountOutMin, - path, - to, - deadline - ); - return success; - } - - /** - * @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens. - * @notice If the first address in the path is not the shortOptionToken address, the tx will fail. - * underlyingToken -> shortOptionToken -> quoteToken. - * IMPORTANT: redeemTokens = shortOptionTokens - * @param optionToken The address of the Option contract. - * @param amountIn The quantity of options to mint. - * @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens. - * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. - * @param to The address to send the shortOptionToken proceeds and longOptionTokens to. - * @param deadline The timestamp for a trade to fail at if not successful. - * @return bool Whether the transaction was successful or not. - */ - function mintShortOptionsThenSwapToTokens( - IOption optionToken, - uint256 amountIn, - uint256 amountOutMin, - address[] memory path, - address to, - uint256 deadline - ) public returns (bool) { - bool success = UniswapConnectorLib.mintShortOptionsThenSwapToTokens( - router, - optionToken, - amountIn, - amountOutMin, - path, - to, - deadline - ); - return success; - } - - // ==== Flash Open Functions ==== - - /** - * @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with - * reserve0 = shortOptionTokens and reserve1 = underlyingTokens. - * Uses underlyingTokens to mint long (option) + short (redeem) tokens. - * Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens, - * AND any remainder quantity of underlyingTokens (paid by msg.sender). - * @notice If the first address in the path is not the shortOptionToken address, the tx will fail. - * @param optionAddress The address of the Option contract. - * @param flashLoanQuantity The quantity of options to mint using borrowed underlyingTokens. - * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. - * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. - * @param to The address to send the shortOptionToken proceeds and longOptionTokens to. - * @return success bool Whether the transaction was successful or not. - */ - function flashMintShortOptionsThenSwap( - address pairAddress, - address optionAddress, - uint256 flashLoanQuantity, - uint256 amountOutMin, - address[] memory path, - address to - ) public returns (bool) { - require(msg.sender == address(this), "ERR_NOT_SELF"); - require(flashLoanQuantity > 0, "ERR_ZERO"); - // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. - // We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens - // and any remainder of underlyingToken. - - address underlyingToken = IOption(optionAddress) - .getUnderlyingTokenAddress(); - require(path[1] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); - - // Mint longOptionTokens using the underlyingTokens received from UniswapV2 flash swap to this contract. - // Send underlyingTokens from this contract to the optionToken contract, then call mintOptions. - IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity); - (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress) - .mintOptions(address(this)); - - // Need to return tokens from the flash swap by returning shortOptionTokens and any remainder of underlyingTokens. - { - address underlyingToken_ = underlyingToken; - // Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of shortOptionTokens. - uint256[] memory amounts = router.getAmountsOut( - outputRedeems, - path - ); - - // The remainder is the flash loan amount - amount paid for from shortOptionTokens. - uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by returning shortOptionTokens. - { - uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed - uint256 paid = amounts[1]; // quantity of underlyingTokens paid by shortOptionTokens - // consider the swap fee - remainder = quantity - .mul(1000) - .add(quantity.mul(3)) - .div(1000) - .sub(paid); - } - - // Pay back the pair in shortOptionTokens - IERC20(IOption(optionAddress).redeemToken()).safeTransfer( - pairAddress, - outputRedeems - ); - - // Pull underlyingTokens from the original msg.sender to pay the remainder of the flash swap. - IERC20(underlyingToken_).safeTransferFrom( - to, - pairAddress, - remainder - ); - emit FlashedShortOption(msg.sender, outputOptions, remainder); - } - - // Send longOptionTokens (option) to the original msg.sender. - IERC20(optionAddress).safeTransfer(to, outputOptions); - return true; - } - - /** - * @dev Opens a longOptionToken position by minting long + short tokens, then selling the short tokens. - * @notice IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens. - * IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid. - * @param optionToken The option address. - * @param amountOptions The quantity of longOptionTokens to purchase. - * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. - */ - function openFlashLong( - IOption optionToken, - uint256 amountOptions, - uint256 amountOutMin - ) external nonReentrant returns (bool) { - address redeemToken = optionToken.redeemToken(); - address underlyingToken = optionToken.getUnderlyingTokenAddress(); - address pairAddress = factory.getPair(redeemToken, underlyingToken); - - // Build the path to get the appropriate reserves to borrow from, and then pay back. - // We are borrowing from reserve1 then paying it back mostly in reserve0. - // Borrowing underlyingTokens, paying back in shortOptionTokens (normal swap). Pay any remainder in underlyingTokens. - address[] memory path = new address[](2); - path[0] = redeemToken; - path[1] = underlyingToken; - IUniswapV2Pair pair = IUniswapV2Pair(pairAddress); - - bytes4 selector = bytes4( - keccak256( - bytes( - "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)" - ) - ) - ); - bytes memory params = abi.encodeWithSelector( - selector, // function to call in this contract - pairAddress, // pair contract we are borrowing from - optionToken, // option token to mint with flash loaned tokens - amountOptions, // quantity of underlyingTokens from flash loan to use to mint options - amountOutMin, // total price paid (in underlyingTokens) for selling shortOptionTokens - path, // redeemToken -> underlyingToken - msg.sender // address to pull the remainder loan amount to pay, and send longOptionTokens to. - ); - - // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address. - // Then executes `flashMintShortOptionsThenSwap`. - uint256 amount0Out = pair.token0() == underlyingToken - ? amountOptions - : 0; - uint256 amount1Out = pair.token0() == underlyingToken - ? 0 - : amountOptions; - - // Borrow the amountOptions quantity of underlyingTokens and execute the callback function using params. - pair.swap(amount0Out, amount1Out, address(this), params); - return true; - } - - // ==== Liquidity Functions ==== - - /** - * @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. - * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. - * underlyingToken -> optionToken -> UNI-V2. - * @param optionAddress The address of the optionToken to mint then provide liquidity for. - * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. - * @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens. - * @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. - * @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. - * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. - * @param to The address that receives UNI-V2 shares. - * @param deadline The timestamp to expire a pending transaction. - */ - function addLongLiquidityWithUnderlying( - address optionAddress, - address otherTokenAddress, - uint256 quantityOptions, - uint256 quantityOtherTokens, - uint256 minOptionTokens, - uint256 minOtherTokens, - address to, - uint256 deadline - ) public nonReentrant returns (bool) { - bool success = UniswapConnectorLib.addLongLiquidityWithUnderlying( - router, - optionAddress, - otherTokenAddress, - quantityOptions, - quantityOtherTokens, - minOptionTokens, - minOtherTokens, - to, - deadline - ); - return success; - } - - /** - * @dev Adds redeemToken liquidity to a redeem<>token pair by minting shortOptionTokens with underlyingTokens. - * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. - * underlyingToken -> redeemToken -> UNI-V2. - * @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for. - * @param otherTokenAddress IMPORTANT: Should be the underlyingToken of the optionToken. Address of other reserve asset. - * @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens. - * @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair. - * @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with. - * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. - * @param to The address that receives UNI-V2 shares. - * @param deadline The timestamp to expire a pending transaction. - */ - function addShortLiquidityWithUnderlying( - address optionAddress, - address otherTokenAddress, - uint256 quantityOptions, - uint256 quantityOtherTokens, - uint256 minShortTokens, - uint256 minOtherTokens, - address to, - uint256 deadline - ) public nonReentrant returns (bool) { - bool success = UniswapConnectorLib.addShortLiquidityWithUnderlying( - router, - optionAddress, - otherTokenAddress, - quantityOptions, - quantityOtherTokens, - minShortTokens, - minOtherTokens, - to, - deadline - ); - return success; - } - - /** - * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. - * @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. - * Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. - * Sends otherTokens from the burned UNI-V2 liquidity shares to the "to" address. - * UNI-V2 -> optionToken -> underlyingToken. - * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. - * @param otherTokenAddress The address of the other token in the pair with the options. - * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. - * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. - * @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity. - * @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options. - * @param deadline The timestamp to expire a pending transaction. - */ - function removeLongLiquidityThenCloseOptions( - address optionAddress, - address otherTokenAddress, - uint256 liquidity, - uint256 amountAMin, - uint256 amountBMin, - address to, - uint256 deadline - ) public nonReentrant returns (uint256, uint256) { - (uint256 amountOptions, uint256 amountOtherTokens) = UniswapConnectorLib - .removeLongLiquidityThenCloseOptions( - factory, - router, - trader, - optionAddress, - otherTokenAddress, - liquidity, - amountAMin, - amountBMin, - to, - deadline - ); - - return (amountOptions, amountOtherTokens); - } - - /** - * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. - * @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. - * Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. - * Sends quoteTokens from the burned UNI-V2 liquidity shares to the "to" address. - * UNI-V2 -> optionToken -> underlyingToken. - * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. - * @param otherTokenAddress The address of the other token in the option pair. - * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. - * @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity. - * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. - * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options. - * @param deadline The timestamp to expire a pending transaction. - */ - function removeShortLiquidityThenCloseOptions( - address optionAddress, - address otherTokenAddress, - uint256 liquidity, - uint256 amountAMin, - uint256 amountBMin, - address to, - uint256 deadline - ) public nonReentrant returns (uint256, uint256) { - (uint256 amountOptions, uint256 amountOtherTokens) = UniswapConnectorLib - .removeShortLiquidityThenCloseOptions( - factory, - router, - trader, - optionAddress, - otherTokenAddress, - liquidity, - amountAMin, - amountBMin, - to, - deadline - ); - - return (amountOptions, amountOtherTokens); - } - - // ==== Callback Implementation ==== - - /** - * @dev The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data. - * @param sender The original msg.sender of the UniswapV2Pair.swap() call. - * @param amount0 The quantity of token0 received to the `to` address in the swap() call. - * @param amount1 The quantity of token1 received to the `to` address in the swap() call. - * @param data The payload passed in the `data` parameter of the swap() call. - */ - function uniswapV2Call( - address sender, - uint256 amount0, - uint256 amount1, - bytes calldata data - ) external override { - address token0 = IUniswapV2Pair(msg.sender).token0(); - address token1 = IUniswapV2Pair(msg.sender).token1(); - assert(msg.sender == factory.getPair(token0, token1)); // ensure that msg.sender is actually a V2 pair - (bool success, bytes memory returnData) = address(this).call(data); - require( - success && - (returnData.length == 0 || abi.decode(returnData, (bool))), - "ERR_UNISWAPV2_CALL_FAIL" - ); - } - - // ==== Management Functions ==== - - /** - * @dev Creats a Uniswap pair for option<>other tokens. - * @param optionAddress The address of the option to deploy a Uniswap V2 Pair for with the quoteToken. - */ - function deployUniswapMarket(address optionAddress, address otherToken) - external - returns (address) - { - address uniswapPair = factory.createPair(optionAddress, otherToken); - return uniswapPair; - } - - // ==== View ==== - - /** - * @dev Gets a Uniswap Pair address for two tokens. - */ - function getUniswapMarketForTokens(address token0, address token1) - public - view - returns (address) - { - address uniswapPair = factory.getPair(token0, token1); - require(uniswapPair != address(0x0), "ERR_PAIR_DOES_NOT_EXIST"); - return uniswapPair; - } -} diff --git a/contracts/connectors/Uniswap/UniswapConnector02.sol b/contracts/connectors/Uniswap/UniswapConnector02.sol new file mode 100644 index 00000000..7546ed7e --- /dev/null +++ b/contracts/connectors/Uniswap/UniswapConnector02.sol @@ -0,0 +1,490 @@ +pragma solidity >=0.6.0; + +/** + * @title Combines Uniswap V2 Protocol functions with Primitive V1. + * @notice Primitive V1 Uniswap Connector 2 - @primitivefi/contracts@v0.4.1 + * @author Primitive + */ + +/// Uniswap V2 & Primitive V1 +import { + IUniswapV2Callee +} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol"; +import { + IUniswapV2Pair +} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; +import { + IUniswapConnector02, + IUniswapV2Router02, + IUniswapV2Factory, + IOption, + ITrader, + IERC20 +} from "./IUniswapConnector02.sol"; +import { UniswapConnectorLib02 } from "./UniswapConnectorLib02.sol"; +/// Open Zeppelin +import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; +import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; +import { + ReentrancyGuard +} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; + +contract UniswapConnector02 is + IUniswapConnector02, + IUniswapV2Callee, + ReentrancyGuard +{ + using SafeERC20 for IERC20; /// Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data + using SafeMath for uint256; /// Reverts on math underflows/overflows + + ITrader public override trader; /// The Primitive contract used to interact with the protocol + IUniswapV2Factory public override factory; /// The Uniswap V2 factory contract to get pair addresses from + IUniswapV2Router02 public override router; /// The Uniswap contract used to interact with the protocol + + event Initialized(address indexed from); /// Emmitted on deployment + event FlashOpened(address indexed from, uint256 quantity, uint256 premium); /// Emmitted on flash opening a long position + + /// ==== Constructor ==== + + constructor( + address router_, + address factory_, + address trader_ + ) public { + require(address(router) == address(0x0), "ERR_INITIALIZED"); + require(address(factory) == address(0x0), "ERR_INITIALIZED"); + require(address(trader) == address(0x0), "ERR_INITIALIZED"); + router = IUniswapV2Router02(router_); + factory = IUniswapV2Factory(factory_); + trader = ITrader(trader_); + emit Initialized(msg.sender); + } + + /// ==== Combo Operations ==== + + /// + /// @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. + /// Combines Primitive "mintOptions" function with Uniswap V2 Router "swapExactTokensForTokens" function. + /// @notice If the first address in the path is not the optionToken address, the tx will fail. + /// underlyingToken -> optionToken -> quoteToken. + /// @param optionToken The address of the Oracle-less Primitive option. + /// @param amountIn The quantity of longOptionTokens to mint and then sell. + /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens. + /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option. + /// @param to The address to send the optionToken proceeds and redeem tokens to. + /// @param deadline The timestamp for a trade to fail at if not successful. + /// @return bool Whether the transaction was successful or not. + /// + function mintLongOptionsThenSwapToTokens( + IOption optionToken, + uint256 amountIn, + uint256 amountOutMin, + address[] calldata path, + address to, + uint256 deadline + ) external override returns (bool) { + bool success = UniswapConnectorLib02.mintLongOptionsThenSwapToTokens( + router, + optionToken, + amountIn, + amountOutMin, + path, + to, + deadline + ); + return success; + } + + /// + /// @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens. + /// @notice If the first address in the path is not the shortOptionToken address, the tx will fail. + /// underlyingToken -> shortOptionToken -> quoteToken. + /// IMPORTANT: redeemTokens = shortOptionTokens + /// @param optionToken The address of the Option contract. + /// @param amountIn The quantity of options to mint. + /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens. + /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. + /// @param to The address to send the shortOptionToken proceeds and longOptionTokens to. + /// @param deadline The timestamp for a trade to fail at if not successful. + /// @return bool Whether the transaction was successful or not. + /// + function mintShortOptionsThenSwapToTokens( + IOption optionToken, + uint256 amountIn, + uint256 amountOutMin, + address[] calldata path, + address to, + uint256 deadline + ) external override returns (bool) { + bool success = UniswapConnectorLib02.mintShortOptionsThenSwapToTokens( + router, + optionToken, + amountIn, + amountOutMin, + path, + to, + deadline + ); + return success; + } + + /// ==== Flash Open Functions ==== + + /// + /// @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with + /// reserve0 = shortOptionTokens and reserve1 = underlyingTokens. + /// Uses underlyingTokens to mint long (option) + short (redeem) tokens. + /// Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens, + /// AND any remainder quantity of underlyingTokens (paid by msg.sender). + /// @notice If the first address in the path is not the shortOptionToken address, the tx will fail. + /// @param optionAddress The address of the Option contract. + /// @param flashLoanQuantity The quantity of options to mint using borrowed underlyingTokens. + /// @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. + /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. + /// @param to The address to send the shortOptionToken proceeds and longOptionTokens to. + /// @return success bool Whether the transaction was successful or not. + /// + function flashMintShortOptionsThenSwap( + address pairAddress, + address optionAddress, + uint256 flashLoanQuantity, + uint256 amountOutMin, + address[] memory path, + address to + ) public returns (bool) { + require(msg.sender == address(this), "ERR_NOT_SELF"); + require(flashLoanQuantity > 0, "ERR_ZERO"); + /// IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. + /// We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens + /// and any remainder of underlyingToken. + + address underlyingToken = IOption(optionAddress) + .getUnderlyingTokenAddress(); + require(path[1] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); + + /// Mint longOptionTokens using the underlyingTokens received from UniswapV2 flash swap to this contract. + /// Send underlyingTokens from this contract to the optionToken contract, then call mintOptions. + IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity); + (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress) + .mintOptions(address(this)); + + /// Need to return tokens from the flash swap by returning shortOptionTokens and any remainder of underlyingTokens. + { + address underlyingToken_ = underlyingToken; + /// Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of shortOptionTokens. + uint256[] memory amounts = router.getAmountsOut( + outputRedeems, + path + ); + + /// The remainder is the flash loan amount - amount paid for from shortOptionTokens. + uint256 remainder; /// underlyingTokens borrowed - underlyingTokens paid back by returning shortOptionTokens. + { + uint256 quantity = flashLoanQuantity; /// quantity of underlying tokens borrowed + uint256 paid = amounts[1]; /// quantity of underlyingTokens paid by shortOptionTokens + /// consider the swap fee + remainder = quantity + .mul(1000) + .add(quantity.mul(3)) + .div(1000) + .sub(paid); + } + + /// Pay back the pair in shortOptionTokens + IERC20(IOption(optionAddress).redeemToken()).safeTransfer( + pairAddress, + outputRedeems + ); + + /// Pull underlyingTokens from the original msg.sender to pay the remainder of the flash swap. + IERC20(underlyingToken_).safeTransferFrom( + to, + pairAddress, + remainder + ); + emit FlashOpened(msg.sender, outputOptions, remainder); + } + + /// Send longOptionTokens (option) to the original msg.sender. + IERC20(optionAddress).safeTransfer(to, outputOptions); + return true; + } + + /// + /// @dev Opens a longOptionToken position by minting long + short tokens, then selling the short tokens. + /// @notice IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens. + /// IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid. + /// @param optionToken The option address. + /// @param amountOptions The quantity of longOptionTokens to purchase. + /// @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. + /// + function openFlashLong( + IOption optionToken, + uint256 amountOptions, + uint256 amountOutMin + ) external override nonReentrant returns (bool) { + address redeemToken = optionToken.redeemToken(); + address underlyingToken = optionToken.getUnderlyingTokenAddress(); + address pairAddress = factory.getPair(redeemToken, underlyingToken); + + /// Build the path to get the appropriate reserves to borrow from, and then pay back. + /// We are borrowing from reserve1 then paying it back mostly in reserve0. + /// Borrowing underlyingTokens, paying back in shortOptionTokens (normal swap). Pay any remainder in underlyingTokens. + address[] memory path = new address[](2); + path[0] = redeemToken; + path[1] = underlyingToken; + IUniswapV2Pair pair = IUniswapV2Pair(pairAddress); + + bytes4 selector = bytes4( + keccak256( + bytes( + "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)" + ) + ) + ); + bytes memory params = abi.encodeWithSelector( + selector, /// function to call in this contract + pairAddress, /// pair contract we are borrowing from + optionToken, /// option token to mint with flash loaned tokens + amountOptions, /// quantity of underlyingTokens from flash loan to use to mint options + amountOutMin, /// total price paid (in underlyingTokens) for selling shortOptionTokens + path, /// redeemToken -> underlyingToken + msg.sender /// address to pull the remainder loan amount to pay, and send longOptionTokens to. + ); + + /// Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address. + /// Then executes `flashMintShortOptionsThenSwap`. + uint256 amount0Out = pair.token0() == underlyingToken + ? amountOptions + : 0; + uint256 amount1Out = pair.token0() == underlyingToken + ? 0 + : amountOptions; + + /// Borrow the amountOptions quantity of underlyingTokens and execute the callback function using params. + pair.swap(amount0Out, amount1Out, address(this), params); + return true; + } + + /// ==== Liquidity Functions ==== + + /// + /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. + /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + /// underlyingToken -> optionToken -> UNI-V2. + /// @param optionAddress The address of the optionToken to mint then provide liquidity for. + /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken. + /// @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens. + /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. + /// @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. + /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. + /// @param to The address that receives UNI-V2 shares. + /// @param deadline The timestamp to expire a pending transaction. + /// + function addLongLiquidityWithUnderlying( + address optionAddress, + address otherTokenAddress, + uint256 quantityOptions, + uint256 quantityOtherTokens, + uint256 minOptionTokens, + uint256 minOtherTokens, + address to, + uint256 deadline + ) external override nonReentrant returns (bool) { + bool success = UniswapConnectorLib02.addLongLiquidityWithUnderlying( + router, + optionAddress, + otherTokenAddress, + quantityOptions, + quantityOtherTokens, + minOptionTokens, + minOtherTokens, + to, + deadline + ); + return success; + } + + /// + /// @dev Adds redeemToken liquidity to a redeem<>token pair by minting shortOptionTokens with underlyingTokens. + /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + /// underlyingToken -> redeemToken -> UNI-V2. + /// @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for. + /// @param otherTokenAddress IMPORTANT: Should be the underlyingToken of option. Address of other reserve asset. + /// @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens. + /// @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair. + /// @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with. + /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. + /// @param to The address that receives UNI-V2 shares. + /// @param deadline The timestamp to expire a pending transaction. + /// + function addShortLiquidityWithUnderlying( + address optionAddress, + address otherTokenAddress, + uint256 quantityOptions, + uint256 quantityOtherTokens, + uint256 minShortTokens, + uint256 minOtherTokens, + address to, + uint256 deadline + ) external override nonReentrant returns (bool) { + bool success = UniswapConnectorLib02.addShortLiquidityWithUnderlying( + router, + optionAddress, + otherTokenAddress, + quantityOptions, + quantityOtherTokens, + minShortTokens, + minOtherTokens, + to, + deadline + ); + return success; + } + + /// + /// @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. + /// @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. + /// Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. + /// Sends otherTokens from the burned UNI-V2 liquidity shares to the "to" address. + /// UNI-V2 -> optionToken -> underlyingToken. + /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. + /// @param otherTokenAddress The address of the other token in the pair with the options. + /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. + /// @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. + /// @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity. + /// @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options. + /// @param deadline The timestamp to expire a pending transaction. + /// + function removeLongLiquidityThenCloseOptions( + address optionAddress, + address otherTokenAddress, + uint256 liquidity, + uint256 amountAMin, + uint256 amountBMin, + address to, + uint256 deadline + ) external override nonReentrant returns (uint256, uint256) { + ( + uint256 amountOptions, + uint256 amountOtherTokens + ) = UniswapConnectorLib02.removeLongLiquidityThenCloseOptions( + factory, + router, + trader, + optionAddress, + otherTokenAddress, + liquidity, + amountAMin, + amountBMin, + to, + deadline + ); + + return (amountOptions, amountOtherTokens); + } + + /// + /// @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. + /// @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. + /// Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. + /// Sends quoteTokens from the burned UNI-V2 liquidity shares to the "to" address. + /// UNI-V2 -> optionToken -> underlyingToken. + /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. + /// @param otherTokenAddress The address of the other token in the option pair. + /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. + /// @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity. + /// @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. + /// @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options. + /// @param deadline The timestamp to expire a pending transaction. + /// + function removeShortLiquidityThenCloseOptions( + address optionAddress, + address otherTokenAddress, + uint256 liquidity, + uint256 amountAMin, + uint256 amountBMin, + address to, + uint256 deadline + ) external override nonReentrant returns (uint256, uint256) { + ( + uint256 amountOptions, + uint256 amountOtherTokens + ) = UniswapConnectorLib02.removeShortLiquidityThenCloseOptions( + factory, + router, + trader, + optionAddress, + otherTokenAddress, + liquidity, + amountAMin, + amountBMin, + to, + deadline + ); + + return (amountOptions, amountOtherTokens); + } + + /// ==== Callback Implementation ==== + + /// + /// @dev The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data. + /// @param sender The original msg.sender of the UniswapV2Pair.swap() call. + /// @param amount0 The quantity of token0 received to the `to` address in the swap() call. + /// @param amount1 The quantity of token1 received to the `to` address in the swap() call. + /// @param data The payload passed in the `data` parameter of the swap() call. + /// + function uniswapV2Call( + address sender, + uint256 amount0, + uint256 amount1, + bytes calldata data + ) external override { + address token0 = IUniswapV2Pair(msg.sender).token0(); + address token1 = IUniswapV2Pair(msg.sender).token1(); + assert(msg.sender == factory.getPair(token0, token1)); /// ensure that msg.sender is actually a V2 pair + (bool success, bytes memory returnData) = address(this).call(data); + require( + success && + (returnData.length == 0 || abi.decode(returnData, (bool))), + "ERR_UNISWAPV2_CALL_FAIL" + ); + } + + /// ==== Management Functions ==== + + /// @dev Creates a UniswapV2Pair by calling `createPair` on the UniswapV2Factory. + function deployUniswapMarket(address optionAddress, address otherToken) + external + override + returns (address) + { + address uniswapPair = factory.createPair(optionAddress, otherToken); + return uniswapPair; + } + + /// ==== View ==== + + /// @dev Gets a UniswapV2Pair address for two tokens by calling the UniswapV2Factory. + function getUniswapMarketForTokens(address token0, address token1) + public + override + view + returns (address) + { + address uniswapPair = factory.getPair(token0, token1); + require(uniswapPair != address(0x0), "ERR_PAIR_DOES_NOT_EXIST"); + return uniswapPair; + } + + /// @dev Gets the name of the contract. + function getName() external override pure returns (string memory) { + return "PrimitiveV1UniswapConnector02"; + } + + /// @dev Gets the version of the contract. + function getVersion() external override pure returns (uint8) { + return uint8(2); + } +} diff --git a/contracts/connectors/Uniswap/UniswapConnectorLib.sol b/contracts/connectors/Uniswap/UniswapConnectorLib02.sol similarity index 99% rename from contracts/connectors/Uniswap/UniswapConnectorLib.sol rename to contracts/connectors/Uniswap/UniswapConnectorLib02.sol index 3ee86355..12a78985 100644 --- a/contracts/connectors/Uniswap/UniswapConnectorLib.sol +++ b/contracts/connectors/Uniswap/UniswapConnectorLib02.sol @@ -1,7 +1,8 @@ pragma solidity >=0.6.0; /** - * @title Combines Uniswap V2 Protocol functions with Primitive V1. + * @title Library for business logic for connecting Uniswap V2 Protocol functions with Primitive V1. + * @notice Primitive V1 Uniswap Connector Lib 2 - @primitivefi/contracts@v0.4.1 * @author Primitive */ @@ -29,7 +30,7 @@ import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; -library UniswapConnectorLib { +library UniswapConnectorLib02 { using SafeMath for uint256; using SafeERC20 for IERC20; diff --git a/deploy/5_deploy_uni_connector.js b/deploy/5_deploy_uni_connector.js index 53feb886..d5bcc165 100644 --- a/deploy/5_deploy_uni_connector.js +++ b/deploy/5_deploy_uni_connector.js @@ -9,51 +9,15 @@ const { UNI_FACTORY, UNI_ROUTER02 } = ADDRESSES; module.exports = async ({ getNamedAccounts, deployments }) => { const { log, deploy } = deployments; const { deployer } = await getNamedAccounts(); - const signer = ethers.provider.getSigner(deployer); const chain = await bre.getChainId(); - const uniswapConnector = await deploy("UniswapConnector", { - from: deployer, - contractName: "UniswapConnector", - args: [], - }); - const uniswapInstance = new ethers.Contract( - uniswapConnector.address, - uniswapConnector.abi, - signer - ); - const registry = await deployments.get("Registry"); - const trader = await deployments.get("Trader"); - let STABLECOIN; - if (chain == 1) { - STABLECOIN = "0x6b175474e89094c44da98b954eedeac495271d0f"; // Mainnet Dai - } else { - let USDC = await deployments.get("USDC"); - STABLECOIN = USDC.address; - } - const quoteTokenAddress = await uniswapInstance.quoteToken(); - if (quoteTokenAddress == bre.ethers.constants.AddressZero) { - await uniswapInstance.setQuoteToken(STABLECOIN); - } - const routerAddress = await uniswapInstance.router(); - const factoryAddress = await uniswapInstance.factory(); - if ( - routerAddress == bre.ethers.constants.AddressZero && - factoryAddress == bre.ethers.constants.AddressZero - ) { - await uniswapInstance.setRouter(UNI_ROUTER02); - await uniswapInstance.setFactory(UNI_FACTORY); - } + const trader = await deployments.get("Trader"); - const traderAddress = await uniswapInstance.trader(); - const registryAddress = await uniswapInstance.registry(); - if ( - traderAddress == bre.ethers.constants.AddressZero && - registryAddress == bre.ethers.constants.AddressZero - ) { - await uniswapInstance.setTrader(trader.address); - await uniswapInstance.setRegistry(registry.address); - } + const uniswapConnector = await deploy("UniswapConnector02", { + from: deployer, + contractName: "UniswapConnector02", + args: [UNI_ROUTER02, UNI_FACTORY, trader.address], + }); let deployed = [uniswapConnector]; for (let i = 0; i < deployed.length; i++) { diff --git a/test/lib/setup.js b/test/lib/setup.js index 5808de12..3d425ba8 100644 --- a/test/lib/setup.js +++ b/test/lib/setup.js @@ -13,7 +13,7 @@ const Flash = require("../../artifacts/Flash"); const Weth = require("../../artifacts/WETH9"); const Trader = require("../../artifacts/Trader"); const WethConnector = require("../../artifacts/WethConnector"); -const UniswapConnector = require("../../artifacts/UniswapConnector.json"); +const UniswapConnector02 = require("../../artifacts/UniswapConnector02.json"); const OptionTemplateLib = require("../../artifacts/OptionTemplateLib"); const RedeemTemplateLib = require("../../artifacts/RedeemTemplateLib"); @@ -359,8 +359,8 @@ const approveToken = async (token, signer, spender) => { /** * @dev Gets the UniswapConnector instance. */ -const newUniswapConnector = async (signer) => { - const connector = await deployContract(signer, UniswapConnector, [], { +const newUniswapConnector = async (signer, params) => { + const connector = await deployContract(signer, UniswapConnector02, params, { gasLimit: 6000000, }); return connector; diff --git a/test/test_uni_connector.js b/test/test_uni_connector.js index 331f1521..6e1f92c8 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.js @@ -45,9 +45,6 @@ describe("UniswapConnector", () => { uniswapFactory = uniswap.uniswapFactory; uniswapRouter = uniswap.uniswapRouter; - // Uniswap Connector contract - uniswapConnector = await setup.newUniswapConnector(Admin); - // Option parameters underlyingToken = weth; strikeToken = dai; @@ -71,6 +68,13 @@ describe("UniswapConnector", () => { // Trader Instance trader = await setup.newTrader(Admin, weth.address); + // Uniswap Connector contract + uniswapConnector = await setup.newUniswapConnector(Admin, [ + uniswapRouter.address, + uniswapFactory.address, + trader.address, + ]); + // Approve all tokens and contracts await batchApproval( [trader.address, uniswapConnector.address, uniswapRouter.address], @@ -150,20 +154,6 @@ describe("UniswapConnector", () => { await batchApproval([uniswapConnector.address], [pair], [Admin, User]); }); - describe("initialize", () => { - it("should set the initial contract addresses", async () => { - await expect( - uniswapConnector.initialize( - uniswapRouter.address, - uniswapFactory.address, - trader.address - ) - ) - .to.emit(uniswapConnector, "Initialized") - .withArgs(Alice); - }); - }); - describe("mintLongOptionsThenSwapToTokens", () => { it("should mint Primitive V1 Options then swap them on Uniswap V2", async () => { // Get the pair address. @@ -494,9 +484,6 @@ describe("UniswapConnector", () => { uniswapFactory = uniswap.uniswapFactory; uniswapRouter = uniswap.uniswapRouter; - // Uniswap Connector contract - uniswapConnector = await setup.newUniswapConnector(Admin); - // Option parameters underlyingToken = weth; strikeToken = dai; @@ -521,14 +508,14 @@ describe("UniswapConnector", () => { // Trader Instance trader = await setup.newTrader(Admin, weth.address); - // Initialize the uniswap connector with addresses - await uniswapConnector.initialize( + // Uniswap Connector contract + uniswapConnector = await setup.newUniswapConnector(Admin, [ uniswapRouter.address, uniswapFactory.address, - trader.address - ); + trader.address, + ]); - // Approve tokens to be sent to trader contract + // Approve all tokens and contracts await batchApproval( [ trader.address, @@ -644,7 +631,7 @@ describe("UniswapConnector", () => { amountOutMin ) ) - .to.emit(uniswapConnector, "FlashedShortOption") + .to.emit(uniswapConnector, "FlashOpened") .withArgs(uniswapConnector.address, amountOptions, remainder); console.log( From 45adad93e4ec9b6f9288972e58451b1f8e8a44de Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 15:17:32 -0700 Subject: [PATCH 16/20] Separated natspec and comments in connectors. Added versioning. --- artifacts/IWethConnector01.json | 247 +++++ artifacts/UniswapConnector02.json | 4 +- artifacts/UniswapConnectorLib02.json | 4 +- artifacts/WethConnector01.json | 399 ++++++++ artifacts/WethConnectorLib01.json | 8 + .../Uniswap/IUniswapConnector02.sol | 8 +- .../connectors/Uniswap/UniswapConnector02.sol | 98 +- .../Uniswap/UniswapConnectorLib02.sol | 414 +++------ ...WethConnector.sol => IWethConnector01.sol} | 6 +- contracts/connectors/WETH/WethConnector.sol | 285 ------ contracts/connectors/WETH/WethConnector01.sol | 294 ++++++ ...thRouterLib.sol => WethConnectorLib01.sol} | 149 ++- .../localhost_31337/OptionFactory.json | 12 +- .../localhost_31337/OptionTemplateLib.json | 4 +- .../localhost_31337/RedeemFactory.json | 12 +- .../localhost_31337/RedeemTemplateLib.json | 4 +- deployments/localhost_31337/Registry.json | 24 +- deployments/localhost_31337/TestERC20.json | 18 +- deployments/localhost_31337/Trader.json | 8 +- deployments/localhost_31337/USDC.json | 18 +- .../localhost_31337/UniswapConnector02.json | 865 ++++++++++++++++++ deployments/localhost_31337/WETH9.json | 14 +- .../localhost_31337/WethConnector.json | 139 +-- ...fdd4ce7a7e622875001d187fa1bd5aee80a9e.json | 174 ++++ 24 files changed, 2304 insertions(+), 904 deletions(-) create mode 100644 artifacts/IWethConnector01.json create mode 100644 artifacts/WethConnector01.json create mode 100644 artifacts/WethConnectorLib01.json rename contracts/connectors/WETH/{IWethConnector.sol => IWethConnector01.sol} (89%) delete mode 100644 contracts/connectors/WETH/WethConnector.sol create mode 100644 contracts/connectors/WETH/WethConnector01.sol rename contracts/connectors/WETH/{WethRouterLib.sol => WethConnectorLib01.sol} (72%) create mode 100644 deployments/localhost_31337/UniswapConnector02.json create mode 100644 deployments/localhost_31337/solcInputs/0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e.json diff --git a/artifacts/IWethConnector01.json b/artifacts/IWethConnector01.json new file mode 100644 index 00000000..2821b1ef --- /dev/null +++ b/artifacts/IWethConnector01.json @@ -0,0 +1,247 @@ +{ + "contractName": "IWethConnector01", + "abi": [ + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "closeQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeCloseForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "exerciseQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeExerciseForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeExerciseWithETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeMintWithETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeRedeemForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "unwindQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeUnwindForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "weth", + "outputs": [ + { + "internalType": "contract IWETH", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/UniswapConnector02.json b/artifacts/UniswapConnector02.json index 5a2e3cd9..49d257c3 100644 --- a/artifacts/UniswapConnector02.json +++ b/artifacts/UniswapConnector02.json @@ -579,8 +579,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50604051620053dc380380620053dc833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050614ffe80620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d136d33b871865713b819675eed6a1a8dbf937bf04fd2865ee02f2a8611cd77864736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d136d33b871865713b819675eed6a1a8dbf937bf04fd2865ee02f2a8611cd77864736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620053dc380380620053dc833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050614ffe80620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a2954fdd90c6910a5e29b837422d1dd174bb7e5ebbdbc408aa14f498f7c5932b64736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a2954fdd90c6910a5e29b837422d1dd174bb7e5ebbdbc408aa14f498f7c5932b64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/UniswapConnectorLib02.json b/artifacts/UniswapConnectorLib02.json index 78db1ed3..6e4a4cb8 100644 --- a/artifacts/UniswapConnectorLib02.json +++ b/artifacts/UniswapConnectorLib02.json @@ -1,8 +1,8 @@ { "contractName": "UniswapConnectorLib02", "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204d47d390fea8d4e4f781858ddf7f888bf295bd789c00aa0f7c1535369576e69c64736f6c63430006020033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204d47d390fea8d4e4f781858ddf7f888bf295bd789c00aa0f7c1535369576e69c64736f6c63430006020033", + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bf614cc7bcb1a2b76d32de932923f9d82c7c41089638ba6f313e96634dbacbbe64736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bf614cc7bcb1a2b76d32de932923f9d82c7c41089638ba6f313e96634dbacbbe64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/WethConnector01.json b/artifacts/WethConnector01.json new file mode 100644 index 00000000..01aac67e --- /dev/null +++ b/artifacts/WethConnector01.json @@ -0,0 +1,399 @@ +{ + "contractName": "WethConnector01", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_weth", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inOptions", + "type": "uint256" + } + ], + "name": "WethConnectorClose", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "outUnderlyings", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inStrikes", + "type": "uint256" + } + ], + "name": "WethConnectorExercise", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "outputOptions", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "outputRedeems", + "type": "uint256" + } + ], + "name": "WethConnectorMint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inRedeems", + "type": "uint256" + } + ], + "name": "WethConnectorRedeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inOptions", + "type": "uint256" + } + ], + "name": "WethConnectorUnwind", + "type": "event" + }, + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "closeQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeCloseForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "exerciseQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeExerciseForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeExerciseWithETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeMintWithETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeRedeemForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "unwindQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeUnwindForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "weth", + "outputs": [ + { + "internalType": "contract IWETH", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50604051613c89380380613c898339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613bda806100af6000396000f3fe60806040526004361061008a5760003560e01c80636ba17e7a116100595780636ba17e7a146102a25780636db8ce241461033f57806380e42f8e146103d55780638549780b14610454578063c9c9163e146104d3576100e8565b80630d8e6e2c146100ed57806317d7de7c1461011e5780633fc8cef3146101ae57806350e2f0ba14610205576100e8565b366100e857600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100e657fe5b005b600080fd5b3480156100f957600080fd5b50610102610562565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b5061013361056b565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610173578082015181840152602081019050610158565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ba57600080fd5b506101c36105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021157600080fd5b5061027e6004803603606081101561022857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102ae57600080fd5b5061031b600480360360608110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b3565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561034b57600080fd5b506103b86004803603606081101561036257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610998565b604051808381526020018281526020019250505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7a565b604051808381526020018281526020019250505060405180910390f35b6104b66004803603604081101561046a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b604051808381526020018281526020019250505060405180910390f35b3480156104df57600080fd5b5061054c600480360360608110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3a565b6040518082815260200191505060405180910390f35b60006001905090565b60606040518060400160405280601a81526020017f5072696d6974697665563157657468436f6e6e6563746f723031000000000000815250905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806000610718600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61110b565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006108fd600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b611889565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16610a1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ade600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611fa2565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610bfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610c8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610cbf600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612738565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610e9f600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612cef565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550826000811161104e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600061107e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612f75565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008460008111611187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156111cf57600080fd5b505afa1580156111e3573d6000803e3d6000fd5b505050506040513d60208110156111f957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b810190808051906020019092919050505010156113da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006115008973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b81019080805190602001909291905050506114f28b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a857600080fd5b505afa1580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154957600080fd5b505afa15801561155d573d6000803e3d6000fd5b505050506040513d602081101561157357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561160057600080fd5b505afa158015611614573d6000803e3d6000fd5b505050506040513d602081101561162a57600080fd5b810190808051906020019092919050505010156116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61175c338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116fb57600080fd5b505afa15801561170f573d6000803e3d6000fd5b505050506040513d602081101561172557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b611789338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d606081101561183557600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506118718c8a8c613588565b82828297509750975050505050509450945094915050565b60008060008460008111611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b810190808051906020019092919050505010611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611c468973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6b57600080fd5b505afa158015611b7f573d6000803e3d6000fd5b505050506040513d6020811015611b9557600080fd5b8101908080519060200190929190505050611c388b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bee57600080fd5b505afa158015611c02573d6000803e3d6000fd5b505050506040513d6020811015611c1857600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d4657600080fd5b505afa158015611d5a573d6000803e3d6000fd5b505050506040513d6020811015611d7057600080fd5b81019080805190602001909291905050501015611df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611ea2338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e4157600080fd5b505afa158015611e55573d6000803e3d6000fd5b505050506040513d6020811015611e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611f2457600080fd5b505af1158015611f38573d6000803e3d6000fd5b505050506040513d6060811015611f4e57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611f8a8c8a8c613588565b82828297509750975050505050509450945094915050565b600080836000811161201c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561206457600080fd5b505afa158015612078573d6000803e3d6000fd5b505050506040513d602081101561208e57600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561224557600080fd5b505afa158015612259573d6000803e3d6000fd5b505050506040513d602081101561226f57600080fd5b810190808051906020019092919050505010156122f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b600061241a8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561233f57600080fd5b505afa158015612353573d6000803e3d6000fd5b505050506040513d602081101561236957600080fd5b810190808051906020019092919050505061240c8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123c257600080fd5b505afa1580156123d6573d6000803e3d6000fd5b505050506040513d60208110156123ec57600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561249a57600080fd5b505afa1580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b81019080805190602001909291905050501015612549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612576338a838573ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6125a3338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156125f75781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561267f578082015181840152602081019050612664565b50505050905090810190601f1680156126ac5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156126cc57600080fd5b505af11580156126e0573d6000803e3d6000fd5b505050506040513d60408110156126f657600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506127248b898b613588565b818196509650505050505094509492505050565b60008034600081116127b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156127fa57600080fd5b505afa15801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60003490506000612a038873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561292757600080fd5b505afa15801561293b573d6000803e3d6000fd5b505050506040513d602081101561295157600080fd5b81019080805190602001909291905050506129f58a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ab57600080fd5b505afa1580156129bf573d6000803e3d6000fd5b505050506040513d60208110156129d557600080fd5b8101908080519060200190929190505050856133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a8357600080fd5b505afa158015612a97573d6000803e3d6000fd5b505050506040513d6020811015612aad57600080fd5b81019080805190602001909291905050501015612b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612b3c89896136d5565b612b693389838b73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612bbb5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c43578082015181840152602081019050612c28565b50505050905090810190601f168015612c705780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612c9057600080fd5b505af1158015612ca4573d6000803e3d6000fd5b505050506040513d6040811015612cba57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612d69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d6020811015612ddb57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612e9987876136d5565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1a57600080fd5b505af1158015612f2e573d6000803e3d6000fd5b505050506040513d6040811015612f4457600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561303657600080fd5b505afa15801561304a573d6000803e3d6000fd5b505050506040513d602081101561306057600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315c57600080fd5b505afa158015613170573d6000803e3d6000fd5b505050506040513d602081101561318657600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561321757600080fd5b505afa15801561322b573d6000803e3d6000fd5b505050506040513d602081101561324157600080fd5b810190808051906020019092919050505010156132c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6132f33388888473ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505090506133bc898789613588565b80945050505050949350505050565b6000808314156133de576000905061344b565b60008284029050828482816133ef57fe5b0414613446576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613b5a6021913960400191505060405180910390fd5b809150505b92915050565b600061349383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506137fd565b905092915050565b613582846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506138c3565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135db57600080fd5b505af11580156135ef573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613653576040519150601f19603f3d011682016040523d82523d6000602084013e613658565b606091505b50509050806136cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561371d57600080fd5b505af1158015613731573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b505050506040513d60208110156137e757600080fd5b8101908080519060200190929190505050505050565b600080831182906138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561386e578082015181840152602081019050613853565b50505050905090810190601f16801561389b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138b557fe5b049050809150509392505050565b6138e28273ffffffffffffffffffffffffffffffffffffffff16613b0e565b613954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106139a35780518252602082019150602081019050602083039250613980565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a05576040519150601f19603f3d011682016040523d82523d6000602084013e613a0a565b606091505b509150915081613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115613b0857808060200190516020811015613aa157600080fd5b8101908080519060200190929190505050613b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613b7b602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613b5057506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206c30d054d8c296b4f1365fb04c5a3c5d5ebcaadb63abc0129128ccc0a91a2b3864736f6c63430006020033", + "deployedBytecode": "0x60806040526004361061008a5760003560e01c80636ba17e7a116100595780636ba17e7a146102a25780636db8ce241461033f57806380e42f8e146103d55780638549780b14610454578063c9c9163e146104d3576100e8565b80630d8e6e2c146100ed57806317d7de7c1461011e5780633fc8cef3146101ae57806350e2f0ba14610205576100e8565b366100e857600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100e657fe5b005b600080fd5b3480156100f957600080fd5b50610102610562565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b5061013361056b565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610173578082015181840152602081019050610158565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ba57600080fd5b506101c36105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021157600080fd5b5061027e6004803603606081101561022857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102ae57600080fd5b5061031b600480360360608110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b3565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561034b57600080fd5b506103b86004803603606081101561036257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610998565b604051808381526020018281526020019250505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7a565b604051808381526020018281526020019250505060405180910390f35b6104b66004803603604081101561046a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b604051808381526020018281526020019250505060405180910390f35b3480156104df57600080fd5b5061054c600480360360608110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3a565b6040518082815260200191505060405180910390f35b60006001905090565b60606040518060400160405280601a81526020017f5072696d6974697665563157657468436f6e6e6563746f723031000000000000815250905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806000610718600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61110b565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006108fd600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b611889565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16610a1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ade600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611fa2565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610bfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610c8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610cbf600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612738565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610e9f600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612cef565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550826000811161104e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600061107e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612f75565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008460008111611187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156111cf57600080fd5b505afa1580156111e3573d6000803e3d6000fd5b505050506040513d60208110156111f957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b810190808051906020019092919050505010156113da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006115008973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b81019080805190602001909291905050506114f28b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a857600080fd5b505afa1580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154957600080fd5b505afa15801561155d573d6000803e3d6000fd5b505050506040513d602081101561157357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561160057600080fd5b505afa158015611614573d6000803e3d6000fd5b505050506040513d602081101561162a57600080fd5b810190808051906020019092919050505010156116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61175c338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116fb57600080fd5b505afa15801561170f573d6000803e3d6000fd5b505050506040513d602081101561172557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b611789338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d606081101561183557600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506118718c8a8c613588565b82828297509750975050505050509450945094915050565b60008060008460008111611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b810190808051906020019092919050505010611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611c468973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6b57600080fd5b505afa158015611b7f573d6000803e3d6000fd5b505050506040513d6020811015611b9557600080fd5b8101908080519060200190929190505050611c388b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bee57600080fd5b505afa158015611c02573d6000803e3d6000fd5b505050506040513d6020811015611c1857600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d4657600080fd5b505afa158015611d5a573d6000803e3d6000fd5b505050506040513d6020811015611d7057600080fd5b81019080805190602001909291905050501015611df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611ea2338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e4157600080fd5b505afa158015611e55573d6000803e3d6000fd5b505050506040513d6020811015611e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611f2457600080fd5b505af1158015611f38573d6000803e3d6000fd5b505050506040513d6060811015611f4e57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611f8a8c8a8c613588565b82828297509750975050505050509450945094915050565b600080836000811161201c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561206457600080fd5b505afa158015612078573d6000803e3d6000fd5b505050506040513d602081101561208e57600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561224557600080fd5b505afa158015612259573d6000803e3d6000fd5b505050506040513d602081101561226f57600080fd5b810190808051906020019092919050505010156122f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b600061241a8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561233f57600080fd5b505afa158015612353573d6000803e3d6000fd5b505050506040513d602081101561236957600080fd5b810190808051906020019092919050505061240c8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123c257600080fd5b505afa1580156123d6573d6000803e3d6000fd5b505050506040513d60208110156123ec57600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561249a57600080fd5b505afa1580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b81019080805190602001909291905050501015612549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612576338a838573ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6125a3338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156125f75781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561267f578082015181840152602081019050612664565b50505050905090810190601f1680156126ac5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156126cc57600080fd5b505af11580156126e0573d6000803e3d6000fd5b505050506040513d60408110156126f657600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506127248b898b613588565b818196509650505050505094509492505050565b60008034600081116127b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156127fa57600080fd5b505afa15801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60003490506000612a038873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561292757600080fd5b505afa15801561293b573d6000803e3d6000fd5b505050506040513d602081101561295157600080fd5b81019080805190602001909291905050506129f58a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ab57600080fd5b505afa1580156129bf573d6000803e3d6000fd5b505050506040513d60208110156129d557600080fd5b8101908080519060200190929190505050856133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a8357600080fd5b505afa158015612a97573d6000803e3d6000fd5b505050506040513d6020811015612aad57600080fd5b81019080805190602001909291905050501015612b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612b3c89896136d5565b612b693389838b73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612bbb5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c43578082015181840152602081019050612c28565b50505050905090810190601f168015612c705780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612c9057600080fd5b505af1158015612ca4573d6000803e3d6000fd5b505050506040513d6040811015612cba57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612d69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d6020811015612ddb57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612e9987876136d5565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1a57600080fd5b505af1158015612f2e573d6000803e3d6000fd5b505050506040513d6040811015612f4457600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561303657600080fd5b505afa15801561304a573d6000803e3d6000fd5b505050506040513d602081101561306057600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315c57600080fd5b505afa158015613170573d6000803e3d6000fd5b505050506040513d602081101561318657600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561321757600080fd5b505afa15801561322b573d6000803e3d6000fd5b505050506040513d602081101561324157600080fd5b810190808051906020019092919050505010156132c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6132f33388888473ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505090506133bc898789613588565b80945050505050949350505050565b6000808314156133de576000905061344b565b60008284029050828482816133ef57fe5b0414613446576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613b5a6021913960400191505060405180910390fd5b809150505b92915050565b600061349383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506137fd565b905092915050565b613582846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506138c3565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135db57600080fd5b505af11580156135ef573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613653576040519150601f19603f3d011682016040523d82523d6000602084013e613658565b606091505b50509050806136cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561371d57600080fd5b505af1158015613731573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b505050506040513d60208110156137e757600080fd5b8101908080519060200190929190505050505050565b600080831182906138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561386e578082015181840152602081019050613853565b50505050905090810190601f16801561389b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138b557fe5b049050809150509392505050565b6138e28273ffffffffffffffffffffffffffffffffffffffff16613b0e565b613954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106139a35780518252602082019150602081019050602083039250613980565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a05576040519150601f19603f3d011682016040523d82523d6000602084013e613a0a565b606091505b509150915081613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115613b0857808060200190516020811015613aa157600080fd5b8101908080519060200190929190505050613b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613b7b602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613b5057506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206c30d054d8c296b4f1365fb04c5a3c5d5ebcaadb63abc0129128ccc0a91a2b3864736f6c63430006020033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/WethConnectorLib01.json b/artifacts/WethConnectorLib01.json new file mode 100644 index 00000000..04e8ac8c --- /dev/null +++ b/artifacts/WethConnectorLib01.json @@ -0,0 +1,8 @@ +{ + "contractName": "WethConnectorLib01", + "abi": [], + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122051339644bc5e55da545c8eccc8e5f8cca0d38c1f419608c24a11bdc0364f7e8264736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122051339644bc5e55da545c8eccc8e5f8cca0d38c1f419608c24a11bdc0364f7e8264736f6c63430006020033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/contracts/connectors/Uniswap/IUniswapConnector02.sol b/contracts/connectors/Uniswap/IUniswapConnector02.sol index b0435e67..9fc18108 100644 --- a/contracts/connectors/Uniswap/IUniswapConnector02.sol +++ b/contracts/connectors/Uniswap/IUniswapConnector02.sol @@ -95,13 +95,13 @@ interface IUniswapConnector02 { view returns (address); - function getName() external pure returns (string memory); - - function getVersion() external pure returns (uint8); - function router() external view returns (IUniswapV2Router02); function factory() external view returns (IUniswapV2Factory); function trader() external view returns (ITrader); + + function getName() external pure returns (string memory); + + function getVersion() external pure returns (uint8); } diff --git a/contracts/connectors/Uniswap/UniswapConnector02.sol b/contracts/connectors/Uniswap/UniswapConnector02.sol index 7546ed7e..d319f953 100644 --- a/contracts/connectors/Uniswap/UniswapConnector02.sol +++ b/contracts/connectors/Uniswap/UniswapConnector02.sol @@ -1,12 +1,12 @@ pragma solidity >=0.6.0; -/** - * @title Combines Uniswap V2 Protocol functions with Primitive V1. - * @notice Primitive V1 Uniswap Connector 2 - @primitivefi/contracts@v0.4.1 - * @author Primitive - */ +/// +/// @title Combines Uniswap V2 Protocol functions with Primitive V1. +/// @notice Primitive V1 UniswapConnector02 - @primitivefi/contracts@v0.4.1 +/// @author Primitive +/// -/// Uniswap V2 & Primitive V1 +// Uniswap V2 & Primitive V1 import { IUniswapV2Callee } from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol"; @@ -22,7 +22,7 @@ import { IERC20 } from "./IUniswapConnector02.sol"; import { UniswapConnectorLib02 } from "./UniswapConnectorLib02.sol"; -/// Open Zeppelin +// Open Zeppelin import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import { @@ -34,17 +34,17 @@ contract UniswapConnector02 is IUniswapV2Callee, ReentrancyGuard { - using SafeERC20 for IERC20; /// Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data - using SafeMath for uint256; /// Reverts on math underflows/overflows + using SafeERC20 for IERC20; // Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data + using SafeMath for uint256; // Reverts on math underflows/overflows - ITrader public override trader; /// The Primitive contract used to interact with the protocol - IUniswapV2Factory public override factory; /// The Uniswap V2 factory contract to get pair addresses from - IUniswapV2Router02 public override router; /// The Uniswap contract used to interact with the protocol + ITrader public override trader; // The Primitive contract used to interact with the protocol + IUniswapV2Factory public override factory; // The Uniswap V2 factory contract to get pair addresses from + IUniswapV2Router02 public override router; // The Uniswap contract used to interact with the protocol - event Initialized(address indexed from); /// Emmitted on deployment - event FlashOpened(address indexed from, uint256 quantity, uint256 premium); /// Emmitted on flash opening a long position + event Initialized(address indexed from); // Emmitted on deployment + event FlashOpened(address indexed from, uint256 quantity, uint256 premium); // Emmitted on flash opening a long position - /// ==== Constructor ==== + // ==== Constructor ==== constructor( address router_, @@ -60,7 +60,7 @@ contract UniswapConnector02 is emit Initialized(msg.sender); } - /// ==== Combo Operations ==== + // ==== Combo Operations ==== /// /// @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. @@ -128,7 +128,7 @@ contract UniswapConnector02 is return success; } - /// ==== Flash Open Functions ==== + // ==== Flash Open Functions ==== /// /// @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with @@ -154,35 +154,35 @@ contract UniswapConnector02 is ) public returns (bool) { require(msg.sender == address(this), "ERR_NOT_SELF"); require(flashLoanQuantity > 0, "ERR_ZERO"); - /// IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. - /// We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens - /// and any remainder of underlyingToken. + // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. + // We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens + // and any remainder of underlyingToken. address underlyingToken = IOption(optionAddress) .getUnderlyingTokenAddress(); require(path[1] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); - /// Mint longOptionTokens using the underlyingTokens received from UniswapV2 flash swap to this contract. - /// Send underlyingTokens from this contract to the optionToken contract, then call mintOptions. + // Mint longOptionTokens using the underlyingTokens received from UniswapV2 flash swap to this contract. + // Send underlyingTokens from this contract to the optionToken contract, then call mintOptions. IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity); (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress) .mintOptions(address(this)); - /// Need to return tokens from the flash swap by returning shortOptionTokens and any remainder of underlyingTokens. + // Need to return tokens from the flash swap by returning shortOptionTokens and any remainder of underlyingTokens. { address underlyingToken_ = underlyingToken; - /// Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of shortOptionTokens. + // Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of shortOptionTokens. uint256[] memory amounts = router.getAmountsOut( outputRedeems, path ); - /// The remainder is the flash loan amount - amount paid for from shortOptionTokens. - uint256 remainder; /// underlyingTokens borrowed - underlyingTokens paid back by returning shortOptionTokens. + // The remainder is the flash loan amount - amount paid for from shortOptionTokens. + uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by returning shortOptionTokens. { - uint256 quantity = flashLoanQuantity; /// quantity of underlying tokens borrowed - uint256 paid = amounts[1]; /// quantity of underlyingTokens paid by shortOptionTokens - /// consider the swap fee + uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed + uint256 paid = amounts[1]; // quantity of underlyingTokens paid by shortOptionTokens + // consider the swap fee remainder = quantity .mul(1000) .add(quantity.mul(3)) @@ -190,13 +190,13 @@ contract UniswapConnector02 is .sub(paid); } - /// Pay back the pair in shortOptionTokens + // Pay back the pair in shortOptionTokens IERC20(IOption(optionAddress).redeemToken()).safeTransfer( pairAddress, outputRedeems ); - /// Pull underlyingTokens from the original msg.sender to pay the remainder of the flash swap. + // Pull underlyingTokens from the original msg.sender to pay the remainder of the flash swap. IERC20(underlyingToken_).safeTransferFrom( to, pairAddress, @@ -205,7 +205,7 @@ contract UniswapConnector02 is emit FlashOpened(msg.sender, outputOptions, remainder); } - /// Send longOptionTokens (option) to the original msg.sender. + // Send longOptionTokens (option) to the original msg.sender. IERC20(optionAddress).safeTransfer(to, outputOptions); return true; } @@ -227,9 +227,9 @@ contract UniswapConnector02 is address underlyingToken = optionToken.getUnderlyingTokenAddress(); address pairAddress = factory.getPair(redeemToken, underlyingToken); - /// Build the path to get the appropriate reserves to borrow from, and then pay back. - /// We are borrowing from reserve1 then paying it back mostly in reserve0. - /// Borrowing underlyingTokens, paying back in shortOptionTokens (normal swap). Pay any remainder in underlyingTokens. + // Build the path to get the appropriate reserves to borrow from, and then pay back. + // We are borrowing from reserve1 then paying it back mostly in reserve0. + // Borrowing underlyingTokens, paying back in shortOptionTokens (normal swap). Pay any remainder in underlyingTokens. address[] memory path = new address[](2); path[0] = redeemToken; path[1] = underlyingToken; @@ -243,17 +243,17 @@ contract UniswapConnector02 is ) ); bytes memory params = abi.encodeWithSelector( - selector, /// function to call in this contract - pairAddress, /// pair contract we are borrowing from - optionToken, /// option token to mint with flash loaned tokens - amountOptions, /// quantity of underlyingTokens from flash loan to use to mint options - amountOutMin, /// total price paid (in underlyingTokens) for selling shortOptionTokens - path, /// redeemToken -> underlyingToken - msg.sender /// address to pull the remainder loan amount to pay, and send longOptionTokens to. + selector, // function to call in this contract + pairAddress, // pair contract we are borrowing from + optionToken, // option token to mint with flash loaned tokens + amountOptions, // quantity of underlyingTokens from flash loan to use to mint options + amountOutMin, // total price paid (in underlyingTokens) for selling shortOptionTokens + path, // redeemToken -> underlyingToken + msg.sender // address to pull the remainder loan amount to pay, and send longOptionTokens to. ); - /// Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address. - /// Then executes `flashMintShortOptionsThenSwap`. + // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address. + // Then executes `flashMintShortOptionsThenSwap`. uint256 amount0Out = pair.token0() == underlyingToken ? amountOptions : 0; @@ -261,12 +261,12 @@ contract UniswapConnector02 is ? 0 : amountOptions; - /// Borrow the amountOptions quantity of underlyingTokens and execute the callback function using params. + // Borrow the amountOptions quantity of underlyingTokens and execute the callback function using params. pair.swap(amount0Out, amount1Out, address(this), params); return true; } - /// ==== Liquidity Functions ==== + // ==== Liquidity Functions ==== /// /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. @@ -426,7 +426,7 @@ contract UniswapConnector02 is return (amountOptions, amountOtherTokens); } - /// ==== Callback Implementation ==== + // ==== Callback Implementation ==== /// /// @dev The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data. @@ -452,7 +452,7 @@ contract UniswapConnector02 is ); } - /// ==== Management Functions ==== + // ==== Management Functions ==== /// @dev Creates a UniswapV2Pair by calling `createPair` on the UniswapV2Factory. function deployUniswapMarket(address optionAddress, address otherToken) @@ -464,7 +464,7 @@ contract UniswapConnector02 is return uniswapPair; } - /// ==== View ==== + // ==== View ==== /// @dev Gets a UniswapV2Pair address for two tokens by calling the UniswapV2Factory. function getUniswapMarketForTokens(address token0, address token1) diff --git a/contracts/connectors/Uniswap/UniswapConnectorLib02.sol b/contracts/connectors/Uniswap/UniswapConnectorLib02.sol index 12a78985..3dbdae39 100644 --- a/contracts/connectors/Uniswap/UniswapConnectorLib02.sol +++ b/contracts/connectors/Uniswap/UniswapConnectorLib02.sol @@ -1,10 +1,10 @@ pragma solidity >=0.6.0; -/** - * @title Library for business logic for connecting Uniswap V2 Protocol functions with Primitive V1. - * @notice Primitive V1 Uniswap Connector Lib 2 - @primitivefi/contracts@v0.4.1 - * @author Primitive - */ +/// +/// @title Library for business logic for connecting Uniswap V2 Protocol functions with Primitive V1. +/// @notice Primitive V1 UniswapConnectorLib02 - @primitivefi/contracts@v0.4.1 +/// @author Primitive +/// // Uniswap import { @@ -20,35 +20,33 @@ import { IUniswapV2Pair } from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; // Primitive -import { IOption } from "../../option/interfaces/IOption.sol"; -import { ITrader } from "../../option/interfaces/ITrader.sol"; -import { TraderLib } from "../../option/libraries/TraderLib.sol"; -import { IWETH, WethRouterLib } from "../WETH/WethRouterLib.sol"; -import { IWethConnector } from "../WETH/IWethConnector.sol"; +import { ITrader, IOption } from "../../option/interfaces/ITrader.sol"; +import { TraderLib, IERC20 } from "../../option/libraries/TraderLib.sol"; +import { IWethConnector01, IWETH } from "../WETH/IWethConnector01.sol"; +import { WethConnectorLib01 } from "../WETH/WethConnectorLib01.sol"; // Open Zeppelin import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; library UniswapConnectorLib02 { - using SafeMath for uint256; - using SafeERC20 for IERC20; - - // ==== Combo Operations ==== - - /** - * @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. - * Combines Primitive "mintOptions" function with Uniswap V2 Router "swapExactTokensForTokens" function. - * @notice If the first address in the path is not the optionToken address, the tx will fail. - * underlyingToken -> optionToken -> quoteToken. - * @param optionToken The address of the Oracle-less Primitive option. - * @param amountIn The quantity of longOptionTokens to mint and then sell. - * @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens. - * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option. - * @param to The address to send the optionToken proceeds and redeem tokens to. - * @param deadline The timestamp for a trade to fail at if not successful. - * @return bool Whether the transaction was successful or not. - */ + using SafeERC20 for IERC20; // Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data + using SafeMath for uint256; // Reverts on math underflows/overflows + + /// ==== Combo Operations ==== + + /// + /// @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. + /// Combines Primitive "mintOptions" function with Uniswap V2 Router "swapExactTokensForTokens" function. + /// @notice If the first address in the path is not the optionToken address, the tx will fail. + /// underlyingToken -> optionToken -> quoteToken. + /// @param optionToken The address of the Oracle-less Primitive option. + /// @param amountIn The quantity of longOptionTokens to mint and then sell. + /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens. + /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option. + /// @param to The address to send the optionToken proceeds and redeem tokens to. + /// @param deadline The timestamp for a trade to fail at if not successful. + /// @return bool Whether the transaction was successful or not. + /// function mintLongOptionsThenSwapToTokens( IUniswapV2Router02 router, IOption optionToken, @@ -85,19 +83,19 @@ library UniswapConnectorLib02 { return success; } - /** - * @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens. - * @notice If the first address in the path is not the shortOptionToken address, the tx will fail. - * underlyingToken -> shortOptionToken -> quoteToken. - * IMPORTANT: redeemTokens = shortOptionTokens - * @param optionToken The address of the Option contract. - * @param amountIn The quantity of options to mint. - * @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens. - * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. - * @param to The address to send the shortOptionToken proceeds and longOptionTokens to. - * @param deadline The timestamp for a trade to fail at if not successful. - * @return bool Whether the transaction was successful or not. - */ + /// + /// @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens. + /// @notice If the first address in the path is not the shortOptionToken address, the tx will fail. + /// underlyingToken -> shortOptionToken -> quoteToken. + /// IMPORTANT: redeemTokens = shortOptionTokens + /// @param optionToken The address of the Option contract. + /// @param amountIn The quantity of options to mint. + /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens. + /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. + /// @param to The address to send the shortOptionToken proceeds and longOptionTokens to. + /// @param deadline The timestamp for a trade to fail at if not successful. + /// @return bool Whether the transaction was successful or not. + /// function mintShortOptionsThenSwapToTokens( IUniswapV2Router02 router, IOption optionToken, @@ -135,159 +133,21 @@ library UniswapConnectorLib02 { return success; } - // ==== Flash Open Functions ==== - - /** - * @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with - * reserve0 = shortOptionTokens and reserve1 = underlyingTokens. - * Uses underlyingTokens to mint long (option) + short (redeem) tokens. - * Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens, - * AND any remainder quantity of underlyingTokens (paid by msg.sender). - * @notice If the first address in the path is not the shortOptionToken address, the tx will fail. - * @param optionAddress The address of the Option contract. - * @param flashLoanQuantity The quantity of options to mint using borrowed underlyingTokens. - * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. - * @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken. - * @param to The address to send the shortOptionToken proceeds and longOptionTokens to. - * @return success bool Whether the transaction was successful or not. - */ - function flashMintShortOptionsThenSwap( - IUniswapV2Router02 router, - address pairAddress, - address optionAddress, - uint256 flashLoanQuantity, - uint256 amountOutMin, - address[] memory path, - address to - ) internal returns (bool) { - require(flashLoanQuantity > 0, "ERR_ZERO"); - // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens. - // We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens - // and any remainder of underlyingToken. - - address underlyingToken = IOption(optionAddress) - .getUnderlyingTokenAddress(); - require(path[1] == underlyingToken, "ERR_END_PATH_NOT_UNDERLYING"); - - // Mint longOptionTokens using the underlyingTokens received from UniswapV2 flash swap to this contract. - // Send underlyingTokens from this contract to the optionToken contract, then call mintOptions. - IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity); - (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress) - .mintOptions(address(this)); - - // Need to return tokens from the flash swap by returning shortOptionTokens and any remainder of underlyingTokens. - { - address underlyingToken_ = underlyingToken; - // Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of shortOptionTokens. - uint256[] memory amounts = router.getAmountsOut( - outputRedeems, - path - ); - - // The remainder is the flash loan amount - amount paid for from shortOptionTokens. - uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by returning shortOptionTokens. - { - uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed - uint256 paid = amounts[1]; // quantity of underlyingTokens paid by shortOptionTokens - // consider the swap fee - remainder = quantity - .mul(1000) - .add(quantity.mul(3)) - .div(1000) - .sub(paid); - } - - // Pay back the pair in shortOptionTokens - IERC20(IOption(optionAddress).redeemToken()).safeTransfer( - pairAddress, - outputRedeems - ); - - // Pull underlyingTokens from the original msg.sender to pay the remainder of the flash swap. - IERC20(underlyingToken_).safeTransferFrom( - to, - pairAddress, - remainder - ); - } - - // Send longOptionTokens (option) to the original msg.sender. - IERC20(optionAddress).safeTransfer(to, outputOptions); - return true; - } - - /** - * @dev Opens a longOptionToken position by minting long + short tokens, then selling the short tokens. - * @notice IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens. - * IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid. - * @param optionToken The option address. - * @param amountOptions The quantity of longOptionTokens to purchase. - * @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. - */ - function openFlashLong( - IUniswapV2Factory factory, - IOption optionToken, - uint256 amountOptions, - uint256 amountOutMin - ) internal returns (bool) { - address redeemToken = optionToken.redeemToken(); - address underlyingToken = optionToken.getUnderlyingTokenAddress(); - address pairAddress = factory.getPair(redeemToken, underlyingToken); - - // Build the path to get the appropriate reserves to borrow from, and then pay back. - // We are borrowing from reserve1 then paying it back mostly in reserve0. - // Borrowing underlyingTokens, paying back in shortOptionTokens (normal swap). Pay any remainder in underlyingTokens. - address[] memory path = new address[](2); - path[0] = redeemToken; - path[1] = underlyingToken; - IUniswapV2Pair pair = IUniswapV2Pair(pairAddress); - - bytes4 selector = bytes4( - keccak256( - bytes( - "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)" - ) - ) - ); - bytes memory params = abi.encodeWithSelector( - selector, // function to call in this contract - pairAddress, // pair contract we are borrowing from - optionToken, // option token to mint with flash loaned tokens - amountOptions, // quantity of underlyingTokens from flash loan to use to mint options - amountOutMin, // total price paid (in underlyingTokens) for selling shortOptionTokens - path, // redeemToken -> underlyingToken - msg.sender // address to pull the remainder loan amount to pay, and send longOptionTokens to. - ); - - // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address. - // Then executes `flashMintShortOptionsThenSwap`. - uint256 amount0Out = pair.token0() == underlyingToken - ? amountOptions - : 0; - uint256 amount1Out = pair.token0() == underlyingToken - ? 0 - : amountOptions; - - // Borrow the amountOptions quantity of underlyingTokens and execute the callback function using params. - pair.swap(amount0Out, amount1Out, address(this), params); - return true; - } - // ==== Liquidity Functions ==== - /** - * @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. - * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. - * underlyingToken -> optionToken -> UNI-V2. - * @param optionAddress The address of the optionToken to mint then provide liquidity for. - * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. - * @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens. - * @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. - * @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. - * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. - * @param to The address that receives UNI-V2 shares. - * @param deadline The timestamp to expire a pending transaction. - */ + /// + /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. + /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + /// underlyingToken -> optionToken -> UNI-V2. + /// @param optionAddress The address of the optionToken to mint then provide liquidity for. + /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken. + /// @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens. + /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. + /// @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. + /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. + /// @param to The address that receives UNI-V2 shares. + /// @param deadline The timestamp to expire a pending transaction. + /// function addLongLiquidityWithUnderlying( IUniswapV2Router02 router, address optionAddress, @@ -341,18 +201,18 @@ library UniswapConnectorLib02 { return true; } - /** - * @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. - * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. - * underlyingToken -> optionToken -> UNI-V2. - * @param optionAddress The address of the optionToken to mint then provide liquidity for. - * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. - * @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. - * @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. - * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. - * @param to The address that receives UNI-V2 shares. - * @param deadline The timestamp to expire a pending transaction. - */ + /// + /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens. + /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + /// underlyingToken -> optionToken -> UNI-V2. + /// @param optionAddress The address of the optionToken to mint then provide liquidity for. + /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken. + /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. + /// @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. + /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. + /// @param to The address that receives UNI-V2 shares. + /// @param deadline The timestamp to expire a pending transaction. + /// function addLongLiquidityWithETHUnderlying( IWETH weth, IUniswapV2Router02 router, @@ -375,7 +235,7 @@ library UniswapConnectorLib02 { // Pulls underlyingTokens from msg.sender to this contract. // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract. // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. - (uint256 outputOptions, uint256 outputRedeems) = WethRouterLib + (uint256 outputOptions, uint256 outputRedeems) = WethConnectorLib01 .safeMintWithETH(weth, IOption(optionAddress), address(this)); assert(outputOptions == msg.value); @@ -403,19 +263,19 @@ library UniswapConnectorLib02 { return true; } - /** - * @dev Adds redeemToken liquidity to a redeem<>quote token pair by minting shortOptionTokens with underlyingTokens. - * @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. - * underlyingToken -> redeemToken -> UNI-V2. - * @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for. - * @param otherTokenAddress The address of the otherToken in the pair with the optionToken. - * @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens. - * @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair. - * @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with. - * @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. - * @param to The address that receives UNI-V2 shares. - * @param deadline The timestamp to expire a pending transaction. - */ + /// + /// @dev Adds redeemToken liquidity to a redeem<>quote token pair by minting shortOptionTokens with underlyingTokens. + /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. + /// underlyingToken -> redeemToken -> UNI-V2. + /// @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for. + /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken. + /// @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens. + /// @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair. + /// @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with. + /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. + /// @param to The address that receives UNI-V2 shares. + /// @param deadline The timestamp to expire a pending transaction. + /// function addShortLiquidityWithUnderlying( IUniswapV2Router02 router, address optionAddress, @@ -466,20 +326,20 @@ library UniswapConnectorLib02 { return true; } - /** - * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. - * @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. - * Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. - * Sends otherTokens from the burned UNI-V2 liquidity shares to the "to" address. - * UNI-V2 -> optionToken -> underlyingToken. - * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. - * @param otherTokenAddress The address of the other token in the pair with the options. - * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. - * @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. - * @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity. - * @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options. - * @param deadline The timestamp to expire a pending transaction. - */ + /// + /// @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. + /// @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. + /// Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. + /// Sends otherTokens from the burned UNI-V2 liquidity shares to the "to" address. + /// UNI-V2 -> optionToken -> underlyingToken. + /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. + /// @param otherTokenAddress The address of the other token in the pair with the options. + /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. + /// @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity. + /// @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity. + /// @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options. + /// @param deadline The timestamp to expire a pending transaction. + /// function removeLongLiquidityThenCloseOptions( IUniswapV2Factory factory, IUniswapV2Router02 router, @@ -545,20 +405,20 @@ library UniswapConnectorLib02 { return (amountOptions, amountOtherTokens); } - /** - * @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. - * @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. - * Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. - * Sends quoteTokens from the burned UNI-V2 liquidity shares to the "to" address. - * UNI-V2 -> optionToken -> underlyingToken. - * @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. - * @param otherTokenAddress The address of the other token in the option pair. - * @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. - * @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity. - * @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. - * @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options. - * @param deadline The timestamp to expire a pending transaction. - */ + /// + /// @dev Combines Uniswap V2 Router "removeLiquidity" function with Primitive "closeOptions" function. + /// @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. + /// Then closes the longOptionTokens and withdraws underlyingTokens to the "to" address. + /// Sends quoteTokens from the burned UNI-V2 liquidity shares to the "to" address. + /// UNI-V2 -> optionToken -> underlyingToken. + /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares. + /// @param otherTokenAddress The address of the other token in the option pair. + /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn. + /// @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity. + /// @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity. + /// @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options. + /// @param deadline The timestamp to expire a pending transaction. + /// function removeShortLiquidityThenCloseOptions( IUniswapV2Factory factory, IUniswapV2Router02 router, @@ -627,16 +487,16 @@ library UniswapConnectorLib02 { // ==== Internal Functions ==== - /** - * @dev Calls the "swapExactTokensForTokens" function on the Uniswap V2 Router 02 Contract. - * @notice Fails early if the address in the beginning of the path is not the token address. - * @param tokenAddress The address of the token to swap from. - * @param amountIn The quantity of longOptionTokens to swap with. - * @param amountOutMin The minimum quantity of tokens to receive in exchange for the tokens swapped. - * @param path The token addresses to trade through using their Uniswap V2 pairs. - * @param to The address to send the token proceeds to. - * @param deadline The timestamp for a trade to fail at if not successful. - */ + /// + /// @dev Calls the "swapExactTokensForTokens" function on the Uniswap V2 Router 02 Contract. + /// @notice Fails early if the address in the beginning of the path is not the token address. + /// @param tokenAddress The address of the token to swap from. + /// @param amountIn The quantity of longOptionTokens to swap with. + /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the tokens swapped. + /// @param path The token addresses to trade through using their Uniswap V2 pairs. + /// @param to The address to send the token proceeds to. + /// @param deadline The timestamp for a trade to fail at if not successful. + /// function _swapExactOptionsForTokens( IUniswapV2Router02 router, address tokenAddress, @@ -661,44 +521,4 @@ library UniswapConnectorLib02 { ); success = true; } - - // ==== Callback Implementation ==== - - /** - * @dev The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data. - * @param sender The original msg.sender of the UniswapV2Pair.swap() call. - * @param amount0 The quantity of token0 received to the `to` address in the swap() call. - * @param amount1 The quantity of token1 received to the `to` address in the swap() call. - * @param data The payload passed in the `data` parameter of the swap() call. - */ - function uniswapV2Call( - address sender, - uint256 amount0, - uint256 amount1, - bytes memory data - ) internal { - (bool success, bytes memory returnData) = address(this).call(data); - require( - success && - (returnData.length == 0 || abi.decode(returnData, (bool))), - "ERR_UNISWAPV2_CALL_FAIL" - ); - } - - // ==== Management Functions ==== - - /** - * @dev Creats a Uniswap pair for option<>other tokens. - * @param optionAddress The address of the option to deploy a Uniswap V2 Pair for with the quoteToken. - */ - function deployUniswapMarket( - IUniswapV2Factory factory, - address optionAddress, - address otherToken - ) internal returns (address) { - address uniswapPair = factory.createPair(optionAddress, otherToken); - return uniswapPair; - } - - // ==== View ==== } diff --git a/contracts/connectors/WETH/IWethConnector.sol b/contracts/connectors/WETH/IWethConnector01.sol similarity index 89% rename from contracts/connectors/WETH/IWethConnector.sol rename to contracts/connectors/WETH/IWethConnector01.sol index c530c35b..3e731832 100644 --- a/contracts/connectors/WETH/IWethConnector.sol +++ b/contracts/connectors/WETH/IWethConnector01.sol @@ -6,7 +6,7 @@ pragma solidity 0.6.2; import { IOption } from "../../option/interfaces/IOption.sol"; import { IWETH } from "./IWETH.sol"; -interface IWethConnector { +interface IWethConnector01 { function weth() external view returns (IWETH); function safeMintWithETH(IOption optionToken, address receiver) @@ -54,4 +54,8 @@ interface IWethConnector { uint256, uint256 ); + + function getName() external pure returns (string memory); + + function getVersion() external pure returns (uint8); } diff --git a/contracts/connectors/WETH/WethConnector.sol b/contracts/connectors/WETH/WethConnector.sol deleted file mode 100644 index e6a74753..00000000 --- a/contracts/connectors/WETH/WethConnector.sol +++ /dev/null @@ -1,285 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.6.2; - -/** - * @title Weth Connector for bridging ether to WETH Primitive options. - * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use. - * Manages operations involving options with WETH as the underlying or strike asset. - * Accepts deposits in ethers and withdraws ethers. - * @author Primitive - */ - -// WETH Interface -import { IWETH } from "./IWETH.sol"; -// Primitive -import { IOption } from "../../option/interfaces/IOption.sol"; -import { IWethConnector } from "./IWethConnector.sol"; -import { WethRouterLib } from "./WethRouterLib.sol"; -// Open Zeppelin -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; -import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; -import { - ReentrancyGuard -} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; - -contract WethConnector is IWethConnector, ReentrancyGuard { - using SafeMath for uint256; - using SafeERC20 for IERC20; - - IWETH public override weth; - - event WethConnectorMint( - address indexed from, - address indexed option, - uint256 outputOptions, - uint256 outputRedeems - ); - event WethConnectorExercise( - address indexed from, - address indexed option, - uint256 outUnderlyings, - uint256 inStrikes - ); - event WethConnectorRedeem( - address indexed from, - address indexed option, - uint256 inRedeems - ); - event WethConnectorClose( - address indexed from, - address indexed option, - uint256 inOptions - ); - - event WethConnectorUnwind( - address indexed from, - address indexed option, - uint256 inOptions - ); - - /** - * @dev Checks the quantity of an operation to make sure its not zero. Fails early. - */ - modifier nonZero(uint256 quantity) { - require(quantity > 0, "ERR_ZERO"); - _; - } - - /** - * @dev Since the WethConnector contract is responsible for converting between ethers and WETH, - * the contract is initialized with the address for WETH. - */ - constructor(address payable _weth) public { - weth = IWETH(_weth); - } - - /** - * @dev If ether is sent to this contract through a normal transaction, it will fail, unless - * it was the WETH contract who sent it. - */ - receive() external payable { - assert(msg.sender == address(weth)); - } - - // ==== Operation Functions ==== - - /** - * @dev Mints msg.value quantity of options and "quote" (option parameter) quantity of redeem tokens. - * @notice This function is for options that have WETH as the underlying asset. - * @param optionToken The address of the option token to mint. - * @param receiver The address which receives the minted option and redeem tokens. - */ - function safeMintWithETH(IOption optionToken, address receiver) - external - override - payable - nonReentrant - nonZero(msg.value) - returns (uint256, uint256) - { - (uint256 outputOptions, uint256 outputRedeems) = WethRouterLib - .safeMintWithETH(weth, optionToken, receiver); - emit WethConnectorMint( - msg.sender, - address(optionToken), - outputOptions, - outputRedeems - ); - - return (outputOptions, outputRedeems); - } - - /** - * @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens. - * Uses the strike ratio as the exchange rate. Strike ratio = base / quote. - * Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw. - * @notice This function is for options with WETH as the strike asset. - * Burns option tokens, accepts ethers, and pushes out underlyingTokens. - * @param optionToken The address of the option contract. - * @param receiver The underlyingTokens are sent to the receiver address. - */ - function safeExerciseWithETH(IOption optionToken, address receiver) - external - override - payable - nonReentrant - nonZero(msg.value) - returns (uint256, uint256) - { - (uint256 inputStrikes, uint256 inputOptions) = WethRouterLib - .safeExerciseWithETH(weth, optionToken, receiver); - - emit WethConnectorExercise( - msg.sender, - address(optionToken), - inputOptions, - inputStrikes - ); - - return (inputStrikes, inputOptions); - } - - /** - * @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. - * Uses the strike ratio as the exchange rate. Strike ratio = base / quote. - * @notice This function is for options with WETH as the underlying asset. - * Burns option tokens, pulls strikeTokens, and pushes out ethers. - * @param optionToken The address of the option contract. - * @param exerciseQuantity Quantity of optionTokens to exercise. - * @param receiver The underlyingTokens (ethers) are sent to the receiver address. - */ - function safeExerciseForETH( - IOption optionToken, - uint256 exerciseQuantity, - address receiver - ) - external - override - nonReentrant - nonZero(exerciseQuantity) - returns (uint256, uint256) - { - (uint256 inputStrikes, uint256 inputOptions) = WethRouterLib - .safeExerciseForETH(weth, optionToken, exerciseQuantity, receiver); - - emit WethConnectorExercise( - msg.sender, - address(optionToken), - exerciseQuantity, - inputStrikes - ); - - return (inputStrikes, inputOptions); - } - - /** - * @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio. - * @notice This function is for options that have WETH as the strike asset. - * Converts WETH to ethers, and withdraws ethers to the receiver address. - * @param optionToken The address of the option contract. - * @param redeemQuantity The quantity of redeemTokens to burn. - * @param receiver The strikeTokens (ethers) are sent to the receiver address. - */ - function safeRedeemForETH( - IOption optionToken, - uint256 redeemQuantity, - address receiver - ) external override nonReentrant nonZero(redeemQuantity) returns (uint256) { - uint256 inputRedeems = WethRouterLib.safeRedeemForETH( - weth, - optionToken, - redeemQuantity, - receiver - ); - - emit WethConnectorRedeem( - msg.sender, - address(optionToken), - inputRedeems - ); - return inputRedeems; - } - - /** - * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers). - * @notice This function is for options with WETH as the underlying asset. - * WETH underlyingTokens are converted to ethers before being sent to receiver. - * The redeemTokens to burn is equal to the optionTokens * strike ratio. - * inputOptions = inputRedeems / strike ratio = outUnderlyings - * @param optionToken The address of the option contract. - * @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn. - * @param receiver The underlyingTokens (ethers) are sent to the receiver address. - */ - function safeCloseForETH( - IOption optionToken, - uint256 closeQuantity, - address receiver - ) - external - override - nonReentrant - nonZero(closeQuantity) - returns ( - uint256, - uint256, - uint256 - ) - { - ( - uint256 inputRedeems, - uint256 inputOptions, - uint256 outUnderlyings - ) = WethRouterLib.safeCloseForETH( - weth, - optionToken, - closeQuantity, - receiver - ); - emit WethConnectorClose(msg.sender, address(optionToken), inputOptions); - return (inputRedeems, inputOptions, outUnderlyings); - } - - /** - * @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. - * This function is for options with WETH as the underlying asset. - * The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver. - * @param optionToken The address of the option contract. - * @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw. - * @param receiver The underlyingTokens (ethers) are sent to the receiver address. - */ - function safeUnwindForETH( - IOption optionToken, - uint256 unwindQuantity, - address receiver - ) - external - override - nonReentrant - nonZero(unwindQuantity) - returns ( - uint256, - uint256, - uint256 - ) - { - ( - uint256 inputRedeems, - uint256 inputOptions, - uint256 outUnderlyings - ) = WethRouterLib.safeUnwindForETH( - weth, - optionToken, - unwindQuantity, - receiver - ); - - emit WethConnectorUnwind( - msg.sender, - address(optionToken), - inputOptions - ); - return (inputRedeems, inputOptions, outUnderlyings); - } -} diff --git a/contracts/connectors/WETH/WethConnector01.sol b/contracts/connectors/WETH/WethConnector01.sol new file mode 100644 index 00000000..ca848838 --- /dev/null +++ b/contracts/connectors/WETH/WethConnector01.sol @@ -0,0 +1,294 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.6.2; + +/// +/// @title Weth Connector for bridging ether to WETH Primitive options. +/// @notice Abstracts the interfacing with the protocol's option contract for ease-of-use. +/// Manages operations involving options with WETH as the underlying or strike asset. +/// Accepts deposits in ethers and withdraws ethers. +/// Primitive V1 WethConnector01 - @primitivefi/contracts@v0.4.1 +/// @author Primitive +/// + +// Primitive +import { IWethConnector01, IOption, IWETH } from "./IWethConnector01.sol"; +import { WethConnectorLib01, IERC20 } from "./WethConnectorLib01.sol"; +// Open Zeppelin +import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; +import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; +import { + ReentrancyGuard +} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; + +contract WethConnector01 is IWethConnector01, ReentrancyGuard { + using SafeERC20 for IERC20; // Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data + using SafeMath for uint256; // Reverts on math underflows/overflows + + IWETH public override weth; + + event WethConnectorMint( + address indexed from, + address indexed option, + uint256 outputOptions, + uint256 outputRedeems + ); + event WethConnectorExercise( + address indexed from, + address indexed option, + uint256 outUnderlyings, + uint256 inStrikes + ); + event WethConnectorRedeem( + address indexed from, + address indexed option, + uint256 inRedeems + ); + event WethConnectorClose( + address indexed from, + address indexed option, + uint256 inOptions + ); + + event WethConnectorUnwind( + address indexed from, + address indexed option, + uint256 inOptions + ); + + /// + /// @dev Checks the quantity of an operation to make sure its not zero. Fails early. + /// + modifier nonZero(uint256 quantity) { + require(quantity > 0, "ERR_ZERO"); + _; + } + + /// + /// @dev Since the WethConnector contract is responsible for converting between ethers and WETH, + /// the contract is initialized with the address for WETH. + /// + constructor(address payable _weth) public { + weth = IWETH(_weth); + } + + /// + /// @dev If ether is sent to this contract through a normal transaction, it will fail, unless + /// it was the WETH contract who sent it. + /// + receive() external payable { + assert(msg.sender == address(weth)); + } + + // ==== Operation Functions ==== + + /// + /// @dev Mints msg.value quantity of options and "quote" (option parameter) quantity of redeem tokens. + /// @notice This function is for options that have WETH as the underlying asset. + /// @param optionToken The address of the option token to mint. + /// @param receiver The address which receives the minted option and redeem tokens. + /// + function safeMintWithETH(IOption optionToken, address receiver) + external + override + payable + nonReentrant + nonZero(msg.value) + returns (uint256, uint256) + { + (uint256 outputOptions, uint256 outputRedeems) = WethConnectorLib01 + .safeMintWithETH(weth, optionToken, receiver); + emit WethConnectorMint( + msg.sender, + address(optionToken), + outputOptions, + outputRedeems + ); + + return (outputOptions, outputRedeems); + } + + /// + /// @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens. + /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote. + /// Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw. + /// @notice This function is for options with WETH as the strike asset. + /// Burns option tokens, accepts ethers, and pushes out underlyingTokens. + /// @param optionToken The address of the option contract. + /// @param receiver The underlyingTokens are sent to the receiver address. + /// + function safeExerciseWithETH(IOption optionToken, address receiver) + external + override + payable + nonReentrant + nonZero(msg.value) + returns (uint256, uint256) + { + (uint256 inputStrikes, uint256 inputOptions) = WethConnectorLib01 + .safeExerciseWithETH(weth, optionToken, receiver); + + emit WethConnectorExercise( + msg.sender, + address(optionToken), + inputOptions, + inputStrikes + ); + + return (inputStrikes, inputOptions); + } + + /// + /// @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. + /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote. + /// @notice This function is for options with WETH as the underlying asset. + /// Burns option tokens, pulls strikeTokens, and pushes out ethers. + /// @param optionToken The address of the option contract. + /// @param exerciseQuantity Quantity of optionTokens to exercise. + /// @param receiver The underlyingTokens (ethers) are sent to the receiver address. + /// + function safeExerciseForETH( + IOption optionToken, + uint256 exerciseQuantity, + address receiver + ) + external + override + nonReentrant + nonZero(exerciseQuantity) + returns (uint256, uint256) + { + (uint256 inputStrikes, uint256 inputOptions) = WethConnectorLib01 + .safeExerciseForETH(weth, optionToken, exerciseQuantity, receiver); + + emit WethConnectorExercise( + msg.sender, + address(optionToken), + exerciseQuantity, + inputStrikes + ); + + return (inputStrikes, inputOptions); + } + + /// + /// @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio. + /// @notice This function is for options that have WETH as the strike asset. + /// Converts WETH to ethers, and withdraws ethers to the receiver address. + /// @param optionToken The address of the option contract. + /// @param redeemQuantity The quantity of redeemTokens to burn. + /// @param receiver The strikeTokens (ethers) are sent to the receiver address. + /// + function safeRedeemForETH( + IOption optionToken, + uint256 redeemQuantity, + address receiver + ) external override nonReentrant nonZero(redeemQuantity) returns (uint256) { + uint256 inputRedeems = WethConnectorLib01.safeRedeemForETH( + weth, + optionToken, + redeemQuantity, + receiver + ); + + emit WethConnectorRedeem( + msg.sender, + address(optionToken), + inputRedeems + ); + return inputRedeems; + } + + /// + /// @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers). + /// @notice This function is for options with WETH as the underlying asset. + /// WETH underlyingTokens are converted to ethers before being sent to receiver. + /// The redeemTokens to burn is equal to the optionTokens * strike ratio. + /// inputOptions = inputRedeems / strike ratio = outUnderlyings + /// @param optionToken The address of the option contract. + /// @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn. + /// @param receiver The underlyingTokens (ethers) are sent to the receiver address. + /// + function safeCloseForETH( + IOption optionToken, + uint256 closeQuantity, + address receiver + ) + external + override + nonReentrant + nonZero(closeQuantity) + returns ( + uint256, + uint256, + uint256 + ) + { + ( + uint256 inputRedeems, + uint256 inputOptions, + uint256 outUnderlyings + ) = WethConnectorLib01.safeCloseForETH( + weth, + optionToken, + closeQuantity, + receiver + ); + emit WethConnectorClose(msg.sender, address(optionToken), inputOptions); + return (inputRedeems, inputOptions, outUnderlyings); + } + + /// + /// @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. + /// This function is for options with WETH as the underlying asset. + /// The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver. + /// @param optionToken The address of the option contract. + /// @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw. + /// @param receiver The underlyingTokens (ethers) are sent to the receiver address. + /// + function safeUnwindForETH( + IOption optionToken, + uint256 unwindQuantity, + address receiver + ) + external + override + nonReentrant + nonZero(unwindQuantity) + returns ( + uint256, + uint256, + uint256 + ) + { + ( + uint256 inputRedeems, + uint256 inputOptions, + uint256 outUnderlyings + ) = WethConnectorLib01.safeUnwindForETH( + weth, + optionToken, + unwindQuantity, + receiver + ); + + emit WethConnectorUnwind( + msg.sender, + address(optionToken), + inputOptions + ); + return (inputRedeems, inputOptions, outUnderlyings); + } + + // ==== View ==== + + /// @dev Gets the name of the contract. + function getName() external override pure returns (string memory) { + return "PrimitiveV1WethConnector01"; + } + + /// @dev Gets the version of the contract. + function getVersion() external override pure returns (uint8) { + return uint8(1); + } +} diff --git a/contracts/connectors/WETH/WethRouterLib.sol b/contracts/connectors/WETH/WethConnectorLib01.sol similarity index 72% rename from contracts/connectors/WETH/WethRouterLib.sol rename to contracts/connectors/WETH/WethConnectorLib01.sol index 9f84c218..733b83ae 100644 --- a/contracts/connectors/WETH/WethRouterLib.sol +++ b/contracts/connectors/WETH/WethConnectorLib01.sol @@ -2,31 +2,30 @@ pragma solidity 0.6.2; -/** - * @title Weth Connector for bridging ether to WETH Primitive options. - * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use. - * Manages operations involving options with WETH as the underlying or strike asset. - * Accepts deposits in ethers and withdraws ethers. - * @author Primitive - */ +/// +/// @title Weth Connector for bridging ether to WETH Primitive options. +/// @notice Abstracts the interfacing with the protocol's option contract for ease-of-use. +/// Manages operations involving options with WETH as the underlying or strike asset. +/// Accepts deposits in ethers and withdraws ethers. +/// Primitive V1 WethConnectorLib01 - @primitivefi/contracts@v0.4.1 +/// @author Primitive +/// // WETH Interface import { IWETH } from "./IWETH.sol"; // Primitive -import { IOption } from "../../option/interfaces/IOption.sol"; -import { IWethConnector } from "./IWethConnector.sol"; +import { IOption, IERC20 } from "../../option/interfaces/IOption.sol"; // Open Zeppelin -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; -library WethRouterLib { - using SafeMath for uint256; - using SafeERC20 for IERC20; +library WethConnectorLib01 { + using SafeERC20 for IERC20; // Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data + using SafeMath for uint256; // Reverts on math underflows/overflows - /** - * @dev Checks the quantity of an operation to make sure its not zero. Fails early. - */ + /// + /// @dev Checks the quantity of an operation to make sure its not zero. Fails early. + /// modifier nonZero(uint256 quantity) { require(quantity > 0, "ERR_ZERO"); _; @@ -34,12 +33,12 @@ library WethRouterLib { // ==== Operation Functions ==== - /** - * @dev Mints msg.value quantity of options and "quote" (option parameter) quantity of redeem tokens. - * @notice This function is for options that have WETH as the underlying asset. - * @param optionToken The address of the option token to mint. - * @param receiver The address which receives the minted option and redeem tokens. - */ + /// + ///@dev Mints msg.value quantity of options and "quote" (option parameter) quantity of redeem tokens. + ///@notice This function is for options that have WETH as the underlying asset. + ///@param optionToken The address of the option token to mint. + ///@param receiver The address which receives the minted option and redeem tokens. + /// function safeMintWithETH( IWETH weth, IOption optionToken, @@ -59,15 +58,15 @@ library WethRouterLib { return (outputOptions, outputRedeems); } - /** - * @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens. - * Uses the strike ratio as the exchange rate. Strike ratio = base / quote. - * Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw. - * @notice This function is for options with WETH as the strike asset. - * Burns option tokens, accepts ethers, and pushes out underlyingTokens. - * @param optionToken The address of the option contract. - * @param receiver The underlyingTokens are sent to the receiver address. - */ + /// + /// @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens. + /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote. + /// Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw. + /// @notice This function is for options with WETH as the strike asset. + /// Burns option tokens, accepts ethers, and pushes out underlyingTokens. + /// @param optionToken The address of the option contract. + /// @param receiver The underlyingTokens are sent to the receiver address. + /// function safeExerciseWithETH( IWETH weth, IOption optionToken, @@ -114,15 +113,15 @@ library WethRouterLib { return (inputStrikes, inputOptions); } - /** - * @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. - * Uses the strike ratio as the exchange rate. Strike ratio = base / quote. - * @notice This function is for options with WETH as the underlying asset. - * Burns option tokens, pulls strikeTokens, and pushes out ethers. - * @param optionToken The address of the option contract. - * @param exerciseQuantity Quantity of optionTokens to exercise. - * @param receiver The underlyingTokens (ethers) are sent to the receiver address. - */ + /// + /// @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. + /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote. + /// @notice This function is for options with WETH as the underlying asset. + /// Burns option tokens, pulls strikeTokens, and pushes out ethers. + /// @param optionToken The address of the option contract. + /// @param exerciseQuantity Quantity of optionTokens to exercise. + /// @param receiver The underlyingTokens (ethers) are sent to the receiver address. + /// function safeExerciseForETH( IWETH weth, IOption optionToken, @@ -181,14 +180,14 @@ library WethRouterLib { return (inputStrikes, inputOptions); } - /** - * @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio. - * @notice This function is for options that have WETH as the strike asset. - * Converts WETH to ethers, and withdraws ethers to the receiver address. - * @param optionToken The address of the option contract. - * @param redeemQuantity The quantity of redeemTokens to burn. - * @param receiver The strikeTokens (ethers) are sent to the receiver address. - */ + /// + /// @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio. + /// @notice This function is for options that have WETH as the strike asset. + /// Converts WETH to ethers, and withdraws ethers to the receiver address. + /// @param optionToken The address of the option contract. + /// @param redeemQuantity The quantity of redeemTokens to burn. + /// @param receiver The strikeTokens (ethers) are sent to the receiver address. + /// function safeRedeemForETH( IWETH weth, IOption optionToken, @@ -224,16 +223,16 @@ library WethRouterLib { return inputRedeems; } - /** - * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers). - * @notice This function is for options with WETH as the underlying asset. - * WETH underlyingTokens are converted to ethers before being sent to receiver. - * The redeemTokens to burn is equal to the optionTokens * strike ratio. - * inputOptions = inputRedeems / strike ratio = outUnderlyings - * @param optionToken The address of the option contract. - * @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn. - * @param receiver The underlyingTokens (ethers) are sent to the receiver address. - */ + /// + /// @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers). + /// @notice This function is for options with WETH as the underlying asset. + /// WETH underlyingTokens are converted to ethers before being sent to receiver. + /// The redeemTokens to burn is equal to the optionTokens * strike ratio. + /// inputOptions = inputRedeems / strike ratio = outUnderlyings + /// @param optionToken The address of the option contract. + /// @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn. + /// @param receiver The underlyingTokens (ethers) are sent to the receiver address. + /// function safeCloseForETH( IWETH weth, IOption optionToken, @@ -295,14 +294,14 @@ library WethRouterLib { return (inputRedeems, inputOptions, outUnderlyings); } - /** - * @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. - * This function is for options with WETH as the underlying asset. - * The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver. - * @param optionToken The address of the option contract. - * @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw. - * @param receiver The underlyingTokens (ethers) are sent to the receiver address. - */ + /// + /// @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. + /// This function is for options with WETH as the underlying asset. + /// The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver. + /// @param optionToken The address of the option contract. + /// @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw. + /// @param receiver The underlyingTokens (ethers) are sent to the receiver address. + /// function safeUnwindForETH( IWETH weth, IOption optionToken, @@ -358,10 +357,10 @@ library WethRouterLib { // ==== WETH Operations ==== - /** - * @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to "to". - * @param to The address to send WETH ERC-20 tokens to. - */ + /// + /// @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to "to". + /// @param to The address to send WETH ERC-20 tokens to. + /// function _depositEthSendWeth(IWETH weth, address to) internal { // Deposit the ethers received from msg.value into the WETH contract. weth.deposit.value(msg.value)(); @@ -370,11 +369,11 @@ library WethRouterLib { weth.transfer(to, msg.value); } - /** - * @dev Unwraps WETH to withrdaw ethers, which are then sent to the "to" address. - * @param to The address to send withdrawn ethers to. - * @param quantity The quantity of WETH to unwrap. - */ + /// + /// @dev Unwraps WETH to withrdaw ethers, which are then sent to the "to" address. + /// @param to The address to send withdrawn ethers to. + /// @param quantity The quantity of WETH to unwrap. + /// function _withdrawEthAndSend( IWETH weth, address to, diff --git a/deployments/localhost_31337/OptionFactory.json b/deployments/localhost_31337/OptionFactory.json index a4aec87d..ecb8f995 100644 --- a/deployments/localhost_31337/OptionFactory.json +++ b/deployments/localhost_31337/OptionFactory.json @@ -200,7 +200,7 @@ "transactionIndex": 0, "gasUsed": "1170529", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000800000000000001000000000000000000000000000000000000020000000000000000000800000000001000000000000000080000400000000000000000000000008000000000000000000000000000000000000000010000000000000000000000000000000020000000000200000000000000000000000000000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8cc0ff5c2dcd252a8b5f7e75d6a93fcd94d03afd0523e9415cd85888096a1be2", + "blockHash": "0x0b3ec3c82c422e7b32081451452e7f116dede643efbc502a72222d5f9dd55cbb", "transactionHash": "0x35e324c0cb366f501d58a343c88a89345df4ada5d774ce65d5b7f39805809833", "logs": [ { @@ -215,7 +215,7 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0x8cc0ff5c2dcd252a8b5f7e75d6a93fcd94d03afd0523e9415cd85888096a1be2" + "blockHash": "0x0b3ec3c82c422e7b32081451452e7f116dede643efbc502a72222d5f9dd55cbb" }, { "transactionIndex": 0, @@ -229,7 +229,7 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0x8cc0ff5c2dcd252a8b5f7e75d6a93fcd94d03afd0523e9415cd85888096a1be2" + "blockHash": "0x0b3ec3c82c422e7b32081451452e7f116dede643efbc502a72222d5f9dd55cbb" } ], "blockNumber": 4, @@ -241,7 +241,7 @@ "args": [ "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7" ], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"calculateOptionAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"consData\",\"type\":\"bytes\"}],\"name\":\"cloneConstructor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"deployClone\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deployOptionTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"redeemAddress\",\"type\":\"address\"}],\"name\":\"initRedeemToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionTemplate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"calculateOptionAddress(address,address,uint256,uint256,uint256)\":{\"details\":\"Calculates the option token's address using the five option parameters.\",\"returns\":{\"_0\":\"The address of the option with the parameter arguments.\"}},\"deployClone(address,address,uint256,uint256,uint256)\":{\"details\":\"Deploys a create2 clone of the option template contract.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp for option expiry.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the strike ERC-20 token.\",\"underlyingToken\":\"The address of the underlying ERC-20 token.\"}},\"deployOptionTemplate()\":{\"details\":\"Deploys the bytecode for the Option contract.\"},\"initRedeemToken(address,address)\":{\"details\":\"Only the factory can call the initRedeemToken function to set the redeem token address. This function is only callable by the Registry contract (the owner).\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/applications/factories/OptionFactory.sol\":\"OptionFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/applications/NullCloneConstructor.sol\":{\"keccak256\":\"0x986f08b84ba86c6fc0f98ece380f7c48d231c95bcaab0ea1cd346dc93397def7\",\"urls\":[\"bzz-raw://4c0d8018a1bb734d2d1c047b8d3109ce802875572206c6fcff7fd418233f989d\",\"dweb:/ipfs/QmSJrgfHPjCyQu8MRJUirvepa92ZrEkoy4RPBmTPXargtZ\"]},\"contracts/option/applications/factories/OptionFactory.sol\":{\"keccak256\":\"0x7719a6f6afd8f6174230b87b8ff9e417218b26a45604bbd3ddd7011eef00069b\",\"urls\":[\"bzz-raw://e42d76f3b3c36bd5116c1116151b30e38a3ff375f6e9e9dc7397f0ba563e4932\",\"dweb:/ipfs/QmdjYZZbKZp4YMP9jXLBk8VfofPxGDqpVnFjD9kxW9ADR4\"]},\"contracts/option/interfaces/IFlash.sol\":{\"keccak256\":\"0x7caaea0111eb7c370eb36f59936e916a7998ceb17dd5f754707e9435f1cec133\",\"urls\":[\"bzz-raw://7e432d5aca4a5f5fee04e39b1c5412fda50af319df47f44ef5e7561a60f9ad8b\",\"dweb:/ipfs/QmXfy2RYBgiHRX5JKBXJhfLV3NSgsT4DxLS7jLrqbrMdiG\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IOptionFactory.sol\":{\"keccak256\":\"0x523335d4aa7b9895d0afd9dbc14e3f3356a1d64827a6f90571c08aef54fe5a3c\",\"urls\":[\"bzz-raw://6e59a331ddd34d836f0fd2a25800cf29ccf0a5d8a074ff2aefa4072106f1388d\",\"dweb:/ipfs/QmXMEvdgdhUgprAG2fAX95imL2vdPAfsoi6NemzvbqMQvK\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/libraries/CloneLib.sol\":{\"keccak256\":\"0x982f3d93fc17c4bc21a8bc122482b6e4aae93819bc5bdf6545d9a2a43cc86381\",\"urls\":[\"bzz-raw://559f62da36cca4457d8e2e63493a425f26c8aa4edad053bdfcbc188bd6f36d22\",\"dweb:/ipfs/QmRE1yu1te4hK6eooGie9oinWVyoa9SccNtPN9ma2WyYFR\"]},\"contracts/option/libraries/OptionTemplateLib.sol\":{\"keccak256\":\"0x016a2a2070fde7d3b526b950b118f13a61bfa0e6da3e9e7779ad07cf9a82c37f\",\"urls\":[\"bzz-raw://63c816d66b8287fe6e43bdbde876fdc152bbfd7e57f4e0ac0a9a8962549b218b\",\"dweb:/ipfs/Qmf1ef9k8sjQ4aCrWDmHtBRSJpRGgKsbhCyFzxNhKhqLF3\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Option.sol\":{\"keccak256\":\"0x25d1b63eb6a225b4b99113e08a6ba78eaf7ac6e92d087c15a440ebf7ab085989\",\"urls\":[\"bzz-raw://137f3007937abd8b1bb2ef7fab95c6f833cc4f788135501db64c8cc69a87d13e\",\"dweb:/ipfs/QmYP9WRcGvZkSZheB9TeincSeH6Gm9dQVQMBPh5SjJzWyZ\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50604051620016e5380380620016e58339818101604052602081101561003557600080fd5b8101908080519060200190929190505050600061005661010960201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506101038161011160201b60201c565b50610325565b600033905090565b61011f61010960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610267576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180620016bf6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61138a80620003356000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146102835780638dd7cc90146102cd578063b570eed814610317578063d604a1ef14610321578063f2fde38b146103e357610093565b80632e53926d1461009857806335638b6b1461015a57806352e831dd146101be578063715018a614610279575b600080fd5b610118600480360360a08110156100ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050610427565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bc6004803603604081101561017057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061051e565b005b610277600480360360208110156101d457600080fd5b81019080803590602001906401000000008111156101f157600080fd5b82018360208201111561020357600080fd5b8035906020019184600183028401116401000000008311171561022557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610682565b005b610281610685565b005b61028b61080d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d5610836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031f61085c565b005b6103a1600480360360a081101561033757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061091d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610425600480360360208110156103f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c89565b005b600080610432610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018481526020018381526020018281526020019650505050505050604051602081830303815290604052805190602001209050600061050e600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610ec1565b9050809250505095945050505050565b610526610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663b43bb135826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561066657600080fd5b505af115801561067a573d6000803e3d6000fd5b505050505050565b50565b61068d610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73__$e66ec45a77c89e1b8bb13f01de0ae8794c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a057600080fd5b505af41580156108b4573d6000803e3d6000fd5b505050506040513d60208110156108ca57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000610927610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4552525f4e4f5f4445504c4f5945445f54454d504c415445000000000000000081525060200191505060405180910390fd5b6000610ab7610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140184815260200183815260200182815260200196505050505050506040516020818303038152906040528051906020012090506000610b96600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610eec565b90508073ffffffffffffffffffffffffffffffffffffffff1663d13f90b489898989896040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050600060405180830381600087803b158015610c6357600080fd5b505af1158015610c77573d6000803e3d6000fd5b50505050809250505095945050505050565b610c91610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061132f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b905090565b6000610edc82610ed085610fbe565b80519060200120610fd1565b905092915050565b600033905090565b60006060610ef984610fbe565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610fca3083610fe6565b9050919050565b6000610fde838330611261565b905092915050565b60608060006040519080825280601f01601f19166020018201604052801561101d5781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611061578082015181840152602081019050611046565b50505050905090810190601f16801561108e5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f1916602001820160405280156111495781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b81518110156112595781818151811061120357fe5b602001015160f81c60f81b83606383018151811061121d57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506111ee565b505092915050565b60008060ff60f81b83868660405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401838152602001828152602001945050505050604051602081830303815290604052805190602001209050606081901b60601c915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212206bc5c7af636179796e4d635411de3cbad2f362f9f11cd6a799fe3fc0fb4233ad64736f6c634300060200334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146102835780638dd7cc90146102cd578063b570eed814610317578063d604a1ef14610321578063f2fde38b146103e357610093565b80632e53926d1461009857806335638b6b1461015a57806352e831dd146101be578063715018a614610279575b600080fd5b610118600480360360a08110156100ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050610427565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bc6004803603604081101561017057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061051e565b005b610277600480360360208110156101d457600080fd5b81019080803590602001906401000000008111156101f157600080fd5b82018360208201111561020357600080fd5b8035906020019184600183028401116401000000008311171561022557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610682565b005b610281610685565b005b61028b61080d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d5610836565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031f61085c565b005b6103a1600480360360a081101561033757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061091d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610425600480360360208110156103f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c89565b005b600080610432610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018481526020018381526020018281526020019650505050505050604051602081830303815290604052805190602001209050600061050e600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683610ec1565b9050809250505095945050505050565b610526610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663b43bb135826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561066657600080fd5b505af115801561067a573d6000803e3d6000fd5b505050505050565b50565b61068d610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b73__$e66ec45a77c89e1b8bb13f01de0ae8794c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a057600080fd5b505af41580156108b4573d6000803e3d6000fd5b505050506040513d60208110156108ca57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000610927610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4552525f4e4f5f4445504c4f5945445f54454d504c415445000000000000000081525060200191505060405180910390fd5b6000610ab7610e96565b8787878787604051602001808781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140184815260200183815260200182815260200196505050505050506040516020818303038152906040528051906020012090506000610b96600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610eec565b90508073ffffffffffffffffffffffffffffffffffffffff1663d13f90b489898989896040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050600060405180830381600087803b158015610c6357600080fd5b505af1158015610c77573d6000803e3d6000fd5b50505050809250505095945050505050565b610c91610ee4565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610dd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061132f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b905090565b6000610edc82610ed085610fbe565b80519060200120610fd1565b905092915050565b600033905090565b60006060610ef984610fbe565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610fca3083610fe6565b9050919050565b6000610fde838330611261565b905092915050565b60608060006040519080825280601f01601f19166020018201604052801561101d5781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015611061578082015181840152602081019050611046565b50505050905090810190601f16801561108e5780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f1916602001820160405280156111495781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b81518110156112595781818151811061120357fe5b602001015160f81c60f81b83606383018151811061121d57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506111ee565b505092915050565b60008060ff60f81b83868660405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401838152602001828152602001945050505050604051602081830303815290604052805190602001209050606081901b60601c915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212206bc5c7af636179796e4d635411de3cbad2f362f9f11cd6a799fe3fc0fb4233ad64736f6c63430006020033", @@ -289,7 +289,7 @@ "storageLayout": { "storage": [ { - "astId": 8111, + "astId": 33, "contract": "contracts/option/applications/factories/OptionFactory.sol:OptionFactory", "label": "_owner", "offset": 0, @@ -297,7 +297,7 @@ "type": "t_address" }, { - "astId": 13072, + "astId": 5867, "contract": "contracts/option/applications/factories/OptionFactory.sol:OptionFactory", "label": "optionTemplate", "offset": 0, diff --git a/deployments/localhost_31337/OptionTemplateLib.json b/deployments/localhost_31337/OptionTemplateLib.json index 1a3c7526..8b0fc070 100644 --- a/deployments/localhost_31337/OptionTemplateLib.json +++ b/deployments/localhost_31337/OptionTemplateLib.json @@ -7,7 +7,7 @@ "transactionIndex": 0, "gasUsed": "4032692", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x133d7e848a7bdb676d87eb6e57a259debe6fbf52533d1a47746eb8d6a1845d65", + "blockHash": "0x69eb15c1b9b5bc409d2763de9cc3d6cbc519238628333367f1114d880d97dcd7", "transactionHash": "0xc866fdda2f3c1258ccd2bdba65fc1a7a4687bcdbac19b59c697ca58b46393965", "logs": [], "blockNumber": 1, @@ -17,7 +17,7 @@ }, "address": "0x7c2C195CD6D34B8F845992d380aADB2730bB9C6F", "args": [], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{\"deployTemplate()\":{\"details\":\"Deploys a clone of the deployed Option.sol contract.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/libraries/OptionTemplateLib.sol\":\"OptionTemplateLib\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/interfaces/IFlash.sol\":{\"keccak256\":\"0x7caaea0111eb7c370eb36f59936e916a7998ceb17dd5f754707e9435f1cec133\",\"urls\":[\"bzz-raw://7e432d5aca4a5f5fee04e39b1c5412fda50af319df47f44ef5e7561a60f9ad8b\",\"dweb:/ipfs/QmXfy2RYBgiHRX5JKBXJhfLV3NSgsT4DxLS7jLrqbrMdiG\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/libraries/OptionTemplateLib.sol\":{\"keccak256\":\"0x016a2a2070fde7d3b526b950b118f13a61bfa0e6da3e9e7779ad07cf9a82c37f\",\"urls\":[\"bzz-raw://63c816d66b8287fe6e43bdbde876fdc152bbfd7e57f4e0ac0a9a8962549b218b\",\"dweb:/ipfs/Qmf1ef9k8sjQ4aCrWDmHtBRSJpRGgKsbhCyFzxNhKhqLF3\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Option.sol\":{\"keccak256\":\"0x25d1b63eb6a225b4b99113e08a6ba78eaf7ac6e92d087c15a440ebf7ab085989\",\"urls\":[\"bzz-raw://137f3007937abd8b1bb2ef7fab95c6f833cc4f788135501db64c8cc69a87d13e\",\"dweb:/ipfs/QmYP9WRcGvZkSZheB9TeincSeH6Gm9dQVQMBPh5SjJzWyZ\"]}},\"version\":1}", "bytecode": "0x61484e610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b614571806102a88339019056fe608060405234801561001057600080fd5b50614551806100206000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c8063787eae301161010f578063a5ea11da116100a2578063c45a015511610071578063c45a015514610b11578063d13f90b414610b5b578063dd62ed3e14610bdd578063fa9ad7c414610c55576101e4565b8063a5ea11da14610984578063a9059cbb14610a49578063b43bb13514610aaf578063b592a13814610af3576101e4565b806395d89b41116100de57806395d89b41146107bf578063a1a4076114610842578063a457c2d71461088c578063a49b41d4146108f2576101e4565b8063787eae30146105cd5780637a4fe3871461068b57806383499805146106a957806387685fb91461070f576101e4565b806325cb5bc011610187578063440f5fd211610156578063440f5fd2146104ae5780634a9d1036146104f85780635e86929d1461051d57806370a0823114610575576101e4565b806325cb5bc0146103bc5780632f310bad146103da578063313ce567146104245780633950935114610448576101e4565b8063095ea7b3116101c3578063095ea7b31461029457806318160ddd146102fa5780631f12b3f81461031857806323b872dd14610336576101e4565b8062fe19fa146101e957806302a5fea21461020757806306fdde0314610211575b600080fd5b6101f1610cb4565b6040518082815260200191505060405180910390f35b61020f610cc0565b005b610219610f3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561025957808201518184015260208101905061023e565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e0600480360360408110156102aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f75565b604051808215151515815260200191505060405180910390f35b610302610f93565b6040518082815260200191505060405180910390f35b610320610f9d565b6040518082815260200191505060405180910390f35b6103a26004803603606081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fa3565b604051808215151515815260200191505060405180910390f35b6103c461107c565b6040518082815260200191505060405180910390f35b6103e2611089565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61042c6110af565b604051808260ff1660ff16815260200191505060405180910390f35b6104946004803603604081101561045e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110b4565b604051808215151515815260200191505060405180910390f35b6104b6611167565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610500611194565b604051808381526020018281526020019250505060405180910390f35b61055f6004803603602081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111a5565b6040518082815260200191505060405180910390f35b6105b76004803603602081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116fe565b6040518082815260200191505060405180910390f35b61066e600480360360608110156105e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561062a57600080fd5b82018360208201111561063c57600080fd5b8035906020019184600183028401116401000000008311171561065e57600080fd5b9091929391929390505050611746565b604051808381526020018281526020019250505060405180910390f35b610693611f87565b6040518082815260200191505060405180910390f35b6106eb600480360360208110156106bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f8d565b60405180848152602001838152602001828152602001935050505060405180910390f35b61071761257b565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b6107c76125fa565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108075780820151818401526020810190506107ec565b50505050905090810190601f1680156108345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61084a612633565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108d8600480360360408110156108a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612660565b604051808215151515815260200191505060405180910390f35b6108fa61272d565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060405180910390f35b61098c612791565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838152602001828152602001965050505050505060405180910390f35b610a9560048036036040811015610a5f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128cc565b604051808215151515815260200191505060405180910390f35b610af160048036036020811015610ac557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128ea565b005b610afb612b0f565b6040518082815260200191505060405180910390f35b610b19612b1c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bdb600480360360a0811015610b7157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612b42565b005b610c3f60048036036040811015610bf357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f71565b6040518082815260200191505060405180910390f35b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ff8565b604051808381526020018281526020019250505060405180910390f35b60006003800154905090565b600b60149054906101000a900460ff16610d42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff021916908315150217905550610f1f600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610e0257600080fd5b505afa158015610e16573d6000803e3d6000fd5b505050506040513d6020811015610e2c57600080fd5b8101908080519060200190929190505050600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610edf57600080fd5b505afa158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b810190808051906020019092919050505061340a565b6001600b60146101000a81548160ff021916908315150217905550565b6040518060400160405280601381526020017f5072696d6974697665205631204f7074696f6e0000000000000000000000000081525081565b6000610f89610f8261345b565b8484613463565b6001905092915050565b6000600254905090565b60095481565b6000610fb084848461365a565b61107184610fbc61345b565b61106c8560405180606001604052806028815260200161443b60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061102261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b600190509392505050565b6000600360040154905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b600061115d6110c161345b565b8461115885600160006110d261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b613463565b6001905092915050565b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600854600954915091509091565b6000600b60149054906101000a900460ff16611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d602081101561133e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156113d057600080fd5b505afa1580156113e4573d6000803e3d6000fd5b505050506040513d60208110156113fa57600080fd5b8101908080519060200190929190505050905060008111611483576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b808210156114f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16639dc29fac30836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561158057600080fd5b505af1158015611594573d6000803e3d6000fd5b505050506115c386828673ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561164057600080fd5b505afa158015611654573d6000803e3d6000fd5b505050506040513d602081101561166a57600080fd5b810190808051906020019092919050505091506116896008548361340a565b3373ffffffffffffffffffffffffffffffffffffffff167f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6826040518082815260200191505060405180910390a2809450505050506001600b60146101000a81548160ff021916908315150217905550919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080600b60149054906101000a900460ff166117cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506117ee613b1b565b611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008611611900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b858173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561197e57600080fd5b505afa158015611992573d6000803e3d6000fd5b505050506040513d60208110156119a857600080fd5b81019080805190602001909291905050501015611a2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b611a5887878373ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b6000858590501115611b38578673ffffffffffffffffffffffffffffffffffffffff16636511d275338888886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611b1f57600080fd5b505af1158015611b33573d6000803e3d6000fd5b505050505b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611bdc57600080fd5b505afa158015611bf0573d6000803e3d6000fd5b505050506040513d6020811015611c0657600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c9857600080fd5b505afa158015611cac573d6000803e3d6000fd5b505050506040513d6020811015611cc257600080fd5b810190808051906020019092919050505090506000611cec60095484613b2b90919063ffffffff16565b90506000611d17611d088b600854613b2b90919063ffffffff16565b84613b2b90919063ffffffff16565b90506000821180611d285750600081115b611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008a8211611dbb57611db6828c613b2b90919063ffffffff16565b611dbe565b60005b90506000611df0600360020154611de2600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000611dfd306116fe565b905081851015611e75576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f535452494b45535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b82811015611eeb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f4f5054494f4e535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b611ef53082613c45565b611eff868861340a565b3373ffffffffffffffffffffffffffffffffffffffff167f7fb8af33a94ca7bd709d59757a015eb48270f350724a5409fd77b579d0b7247d8e87604051808381526020018281526020019250505060405180910390a284819950995050505050505050506001600b60146101000a81548160ff02191690831515021790555094509492505050565b60085481565b6000806000600b60149054906101000a900460ff16612014576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156120ff57600080fd5b505afa158015612113573d6000803e3d6000fd5b505050506040513d602081101561212957600080fd5b810190808051906020019092919050505090506000612147306116fe565b905060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121c857600080fd5b505afa1580156121dc573d6000803e3d6000fd5b505050506040513d60208110156121f257600080fd5b810190808051906020019092919050505090506000612235600380015461222760036002015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000612241613b1b565b61224b578161224d565b835b905060008311801561225f5750600081115b6122d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8181101580156122e15750818510155b612353576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b61235b613b1b565b1561236b5761236a3082613c45565b5b8573ffffffffffffffffffffffffffffffffffffffff16639dc29fac30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156123f257600080fd5b505af1158015612406573d6000803e3d6000fd5b505050506124358b838973ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156124b257600080fd5b505afa1580156124c6573d6000803e3d6000fd5b505050506040513d60208110156124dc57600080fd5b810190808051906020019092919050505094506124fb8560095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f684222b0069d4a2e5e0d986611cc5182d543904c4e4264bf770d4e51faefc822836040518082815260200191505060405180910390a2828183995099509950505050505050506001600b60146101000a81548160ff0219169083151502179055509193909250565b6000806000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925092509250909192565b6040518060400160405280600381526020017f50524d000000000000000000000000000000000000000000000000000000000081525081565b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600061272361266d61345b565b8461271e856040518060600160405280602581526020016144f7602591396001600061269761345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b6001905092915050565b60038060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154905085565b6000806000806000806127a2614331565b60036040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820154815260200160048201548152505090508060000151965080602001519550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945080604001519350806060015192508060800151915050909192939495565b60006128e06128d961345b565b848461365a565b6001905092915050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146129ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f52454445454d5f494e495449414c495a45440000000000000000000081525060200191505060405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d82022efb79096928f354aadac8912185187b551963720c3cf4db45f2b3fea60405160405180910390a350565b6000600360020154905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612c06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612ca8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b60008311612d1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008211612d94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b42811015612e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b33600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815250600360008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030155608082015181600401559050506001600b60146101000a81548160ff0219169083151502179055505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080600b60149054906101000a900460ff1661307d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506130a0613b1b565b613112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156131b657600080fd5b505afa1580156131ca573d6000803e3d6000fd5b505050506040513d60208110156131e057600080fd5b81019080805190602001909291905050509050600061320a60085483613b2b90919063ffffffff16565b9050600061323c60036002015461322e600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b9050600081116132b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1987836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561335d57600080fd5b505af1158015613371573d6000803e3d6000fd5b5050505061337f8683613e09565b61338b8360095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8383604051808381526020018281526020019250505060405180910390a28181945094505050506001600b60146101000a81548160ff021916908315150217905550915091565b81600881905550806009819055507f5a1c3e4cdfd0698a8d6ff240a75a16c8b2f07d2b7579bb89c8065077eda06d5f8282604051808381526020018281526020019250505060405180910390a15050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156134e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806144a96024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561356f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806143d26022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806144846025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061438d6023913960400191505060405180910390fd5b613771838383613fd0565b6137dc816040518060600160405280602681526020016143f4602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061386f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906139c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561398d578082015181840152602081019050613972565b50505050905090810190601f1680156139ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015613a59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b613b168363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613fd5565b505050565b6000426003600401541015905090565b6000613b6d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061391b565b905092915050565b600080831415613b885760009050613bf5565b6000828402905082848281613b9957fe5b0414613bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061441a6021913960400191505060405180910390fd5b809150505b92915050565b6000613c3d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614220565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806144636021913960400191505060405180910390fd5b613cd782600083613fd0565b613d42816040518060600160405280602281526020016143b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613d9981600254613b2b90919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613eac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b613eb860008383613fd0565b613ecd816002546139db90919063ffffffff16565b600281905550613f24816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b613ff48273ffffffffffffffffffffffffffffffffffffffff166142e6565b614066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106140b55780518252602082019150602081019050602083039250614092565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614117576040519150601f19603f3d011682016040523d82523d6000602084013e61411c565b606091505b509150915081614194576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561421a578080602001905160208110156141b357600080fd5b8101908080519060200190929190505050614219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806144cd602a913960400191505060405180910390fd5b5b50505050565b600080831182906142cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614291578082015181840152602081019050614276565b50505050905090810190601f1680156142be5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816142d857fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561432857506000801b8214155b92505050919050565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212200ddee87d0e0d8cdf46c88c878b0350291189424c3a5caca5e3f6ecb64003c56864736f6c63430006020033a26469706673582212206dbead405b0f5ae8aa6ce05b134c2557b7c9ef09655f3f97b6f8ec572fd7f08964736f6c63430006020033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007f56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd8760001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b614571806102a88339019056fe608060405234801561001057600080fd5b50614551806100206000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c8063787eae301161010f578063a5ea11da116100a2578063c45a015511610071578063c45a015514610b11578063d13f90b414610b5b578063dd62ed3e14610bdd578063fa9ad7c414610c55576101e4565b8063a5ea11da14610984578063a9059cbb14610a49578063b43bb13514610aaf578063b592a13814610af3576101e4565b806395d89b41116100de57806395d89b41146107bf578063a1a4076114610842578063a457c2d71461088c578063a49b41d4146108f2576101e4565b8063787eae30146105cd5780637a4fe3871461068b57806383499805146106a957806387685fb91461070f576101e4565b806325cb5bc011610187578063440f5fd211610156578063440f5fd2146104ae5780634a9d1036146104f85780635e86929d1461051d57806370a0823114610575576101e4565b806325cb5bc0146103bc5780632f310bad146103da578063313ce567146104245780633950935114610448576101e4565b8063095ea7b3116101c3578063095ea7b31461029457806318160ddd146102fa5780631f12b3f81461031857806323b872dd14610336576101e4565b8062fe19fa146101e957806302a5fea21461020757806306fdde0314610211575b600080fd5b6101f1610cb4565b6040518082815260200191505060405180910390f35b61020f610cc0565b005b610219610f3c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561025957808201518184015260208101905061023e565b50505050905090810190601f1680156102865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e0600480360360408110156102aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f75565b604051808215151515815260200191505060405180910390f35b610302610f93565b6040518082815260200191505060405180910390f35b610320610f9d565b6040518082815260200191505060405180910390f35b6103a26004803603606081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fa3565b604051808215151515815260200191505060405180910390f35b6103c461107c565b6040518082815260200191505060405180910390f35b6103e2611089565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61042c6110af565b604051808260ff1660ff16815260200191505060405180910390f35b6104946004803603604081101561045e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110b4565b604051808215151515815260200191505060405180910390f35b6104b6611167565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610500611194565b604051808381526020018281526020019250505060405180910390f35b61055f6004803603602081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111a5565b6040518082815260200191505060405180910390f35b6105b76004803603602081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116fe565b6040518082815260200191505060405180910390f35b61066e600480360360608110156105e357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561062a57600080fd5b82018360208201111561063c57600080fd5b8035906020019184600183028401116401000000008311171561065e57600080fd5b9091929391929390505050611746565b604051808381526020018281526020019250505060405180910390f35b610693611f87565b6040518082815260200191505060405180910390f35b6106eb600480360360208110156106bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f8d565b60405180848152602001838152602001828152602001935050505060405180910390f35b61071761257b565b604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390f35b6107c76125fa565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108075780820151818401526020810190506107ec565b50505050905090810190601f1680156108345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61084a612633565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108d8600480360360408110156108a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612660565b604051808215151515815260200191505060405180910390f35b6108fa61272d565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060405180910390f35b61098c612791565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838152602001828152602001965050505050505060405180910390f35b610a9560048036036040811015610a5f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506128cc565b604051808215151515815260200191505060405180910390f35b610af160048036036020811015610ac557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128ea565b005b610afb612b0f565b6040518082815260200191505060405180910390f35b610b19612b1c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610bdb600480360360a0811015610b7157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050612b42565b005b610c3f60048036036040811015610bf357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f71565b6040518082815260200191505060405180910390f35b610c9760048036036020811015610c6b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ff8565b604051808381526020018281526020019250505060405180910390f35b60006003800154905090565b600b60149054906101000a900460ff16610d42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff021916908315150217905550610f1f600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610e0257600080fd5b505afa158015610e16573d6000803e3d6000fd5b505050506040513d6020811015610e2c57600080fd5b8101908080519060200190929190505050600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610edf57600080fd5b505afa158015610ef3573d6000803e3d6000fd5b505050506040513d6020811015610f0957600080fd5b810190808051906020019092919050505061340a565b6001600b60146101000a81548160ff021916908315150217905550565b6040518060400160405280601381526020017f5072696d6974697665205631204f7074696f6e0000000000000000000000000081525081565b6000610f89610f8261345b565b8484613463565b6001905092915050565b6000600254905090565b60095481565b6000610fb084848461365a565b61107184610fbc61345b565b61106c8560405180606001604052806028815260200161443b60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061102261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b600190509392505050565b6000600360040154905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b600061115d6110c161345b565b8461115885600160006110d261345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b613463565b6001905092915050565b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600854600954915091509091565b6000600b60149054906101000a900460ff16611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d602081101561133e57600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156113d057600080fd5b505afa1580156113e4573d6000803e3d6000fd5b505050506040513d60208110156113fa57600080fd5b8101908080519060200190929190505050905060008111611483576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b808210156114f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16639dc29fac30836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561158057600080fd5b505af1158015611594573d6000803e3d6000fd5b505050506115c386828673ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561164057600080fd5b505afa158015611654573d6000803e3d6000fd5b505050506040513d602081101561166a57600080fd5b810190808051906020019092919050505091506116896008548361340a565b3373ffffffffffffffffffffffffffffffffffffffff167f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6826040518082815260200191505060405180910390a2809450505050506001600b60146101000a81548160ff021916908315150217905550919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080600b60149054906101000a900460ff166117cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506117ee613b1b565b611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008611611900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b858173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561197e57600080fd5b505afa158015611992573d6000803e3d6000fd5b505050506040513d60208110156119a857600080fd5b81019080805190602001909291905050501015611a2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b611a5887878373ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b6000858590501115611b38578673ffffffffffffffffffffffffffffffffffffffff16636511d275338888886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611b1f57600080fd5b505af1158015611b33573d6000803e3d6000fd5b505050505b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611bdc57600080fd5b505afa158015611bf0573d6000803e3d6000fd5b505050506040513d6020811015611c0657600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c9857600080fd5b505afa158015611cac573d6000803e3d6000fd5b505050506040513d6020811015611cc257600080fd5b810190808051906020019092919050505090506000611cec60095484613b2b90919063ffffffff16565b90506000611d17611d088b600854613b2b90919063ffffffff16565b84613b2b90919063ffffffff16565b90506000821180611d285750600081115b611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008a8211611dbb57611db6828c613b2b90919063ffffffff16565b611dbe565b60005b90506000611df0600360020154611de2600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000611dfd306116fe565b905081851015611e75576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f535452494b45535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b82811015611eeb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f4f5054494f4e535f494e50555400000000000000000000000000000081525060200191505060405180910390fd5b611ef53082613c45565b611eff868861340a565b3373ffffffffffffffffffffffffffffffffffffffff167f7fb8af33a94ca7bd709d59757a015eb48270f350724a5409fd77b579d0b7247d8e87604051808381526020018281526020019250505060405180910390a284819950995050505050505050506001600b60146101000a81548160ff02191690831515021790555094509492505050565b60085481565b6000806000600b60149054906101000a900460ff16612014576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156120ff57600080fd5b505afa158015612113573d6000803e3d6000fd5b505050506040513d602081101561212957600080fd5b810190808051906020019092919050505090506000612147306116fe565b905060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121c857600080fd5b505afa1580156121dc573d6000803e3d6000fd5b505050506040513d60208110156121f257600080fd5b810190808051906020019092919050505090506000612235600380015461222760036002015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b90506000612241613b1b565b61224b578161224d565b835b905060008311801561225f5750600081115b6122d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8181101580156122e15750818510155b612353576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f42414c5f554e4445524c59494e47000000000000000000000000000081525060200191505060405180910390fd5b61235b613b1b565b1561236b5761236a3082613c45565b5b8573ffffffffffffffffffffffffffffffffffffffff16639dc29fac30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156123f257600080fd5b505af1158015612406573d6000803e3d6000fd5b505050506124358b838973ffffffffffffffffffffffffffffffffffffffff16613a639092919063ffffffff16565b8673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156124b257600080fd5b505afa1580156124c6573d6000803e3d6000fd5b505050506040513d60208110156124dc57600080fd5b810190808051906020019092919050505094506124fb8560095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f684222b0069d4a2e5e0d986611cc5182d543904c4e4264bf770d4e51faefc822836040518082815260200191505060405180910390a2828183995099509950505050505050506001600b60146101000a81548160ff0219169083151502179055509193909250565b6000806000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925092509250909192565b6040518060400160405280600381526020017f50524d000000000000000000000000000000000000000000000000000000000081525081565b6000600360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600061272361266d61345b565b8461271e856040518060600160405280602581526020016144f7602591396001600061269761345b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b613463565b6001905092915050565b60038060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154905085565b6000806000806000806127a2614331565b60036040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820154815260200160048201548152505090508060000151965080602001519550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945080604001519350806060015192508060800151915050909192939495565b60006128e06128d961345b565b848461365a565b6001905092915050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146129ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f4f574e45520000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612a71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4552525f52454445454d5f494e495449414c495a45440000000000000000000081525060200191505060405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d82022efb79096928f354aadac8912185187b551963720c3cf4db45f2b3fea60405160405180910390a350565b6000600360020154905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612c06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612ca8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b60008311612d1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008211612d94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b42811015612e0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b33600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815250600360008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030155608082015181600401559050506001600b60146101000a81548160ff0219169083151502179055505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080600b60149054906101000a900460ff1661307d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055506130a0613b1b565b613112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4552525f4558504952454400000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156131b657600080fd5b505afa1580156131ca573d6000803e3d6000fd5b505050506040513d60208110156131e057600080fd5b81019080805190602001909291905050509050600061320a60085483613b2b90919063ffffffff16565b9050600061323c60036002015461322e600380015485613b7590919063ffffffff16565b613bfb90919063ffffffff16565b9050600081116132b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1987836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561335d57600080fd5b505af1158015613371573d6000803e3d6000fd5b5050505061337f8683613e09565b61338b8360095461340a565b3373ffffffffffffffffffffffffffffffffffffffff167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8383604051808381526020018281526020019250505060405180910390a28181945094505050506001600b60146101000a81548160ff021916908315150217905550915091565b81600881905550806009819055507f5a1c3e4cdfd0698a8d6ff240a75a16c8b2f07d2b7579bb89c8065077eda06d5f8282604051808381526020018281526020019250505060405180910390a15050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156134e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806144a96024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561356f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806143d26022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806144846025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061438d6023913960400191505060405180910390fd5b613771838383613fd0565b6137dc816040518060600160405280602681526020016143f4602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061386f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906139c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561398d578082015181840152602081019050613972565b50505050905090810190601f1680156139ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015613a59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b613b168363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613fd5565b505050565b6000426003600401541015905090565b6000613b6d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061391b565b905092915050565b600080831415613b885760009050613bf5565b6000828402905082848281613b9957fe5b0414613bf0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061441a6021913960400191505060405180910390fd5b809150505b92915050565b6000613c3d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614220565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613ccb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806144636021913960400191505060405180910390fd5b613cd782600083613fd0565b613d42816040518060600160405280602281526020016143b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391b9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613d9981600254613b2b90919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613eac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b613eb860008383613fd0565b613ecd816002546139db90919063ffffffff16565b600281905550613f24816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139db90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b613ff48273ffffffffffffffffffffffffffffffffffffffff166142e6565b614066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106140b55780518252602082019150602081019050602083039250614092565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614117576040519150601f19603f3d011682016040523d82523d6000602084013e61411c565b606091505b509150915081614194576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561421a578080602001905160208110156141b357600080fd5b8101908080519060200190929190505050614219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806144cd602a913960400191505060405180910390fd5b5b50505050565b600080831182906142cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614291578082015181840152602081019050614276565b50505050905090810190601f1680156142be5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816142d857fe5b049050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561432857506000801b8214155b92505050919050565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212200ddee87d0e0d8cdf46c88c878b0350291189424c3a5caca5e3f6ecb64003c56864736f6c63430006020033a26469706673582212206dbead405b0f5ae8aa6ce05b134c2557b7c9ef09655f3f97b6f8ec572fd7f08964736f6c63430006020033", diff --git a/deployments/localhost_31337/RedeemFactory.json b/deployments/localhost_31337/RedeemFactory.json index 465675f2..7f16b53e 100644 --- a/deployments/localhost_31337/RedeemFactory.json +++ b/deployments/localhost_31337/RedeemFactory.json @@ -123,7 +123,7 @@ "transactionIndex": 0, "gasUsed": "852141", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000001000000000400000000000000000000000000022000000000000000000800000000001000000000000000080000400000000000000000000000008000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe6660c26b8f3ce704f308587080061165cb4182f2dadfdc67f200d10251a72ee", + "blockHash": "0x1ca8b2b96d90010493a9c5526706a6ff19826446c7f1540455c4ef7516b51fa7", "transactionHash": "0xdf07c4ef6bed622d905a3c285bf9f59c85cd8f1c22d23249f629239bc1acbaa8", "logs": [ { @@ -138,7 +138,7 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0xe6660c26b8f3ce704f308587080061165cb4182f2dadfdc67f200d10251a72ee" + "blockHash": "0x1ca8b2b96d90010493a9c5526706a6ff19826446c7f1540455c4ef7516b51fa7" }, { "transactionIndex": 0, @@ -152,7 +152,7 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0xe6660c26b8f3ce704f308587080061165cb4182f2dadfdc67f200d10251a72ee" + "blockHash": "0x1ca8b2b96d90010493a9c5526706a6ff19826446c7f1540455c4ef7516b51fa7" } ], "blockNumber": 5, @@ -164,7 +164,7 @@ "args": [ "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7" ], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"consData\",\"type\":\"bytes\"}],\"name\":\"cloneConstructor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionToken\",\"type\":\"address\"}],\"name\":\"deployClone\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deployRedeemTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemTemplate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"deployClone(address)\":{\"details\":\"Deploys a cloned instance of the template Redeem contract.\",\"params\":{\"optionToken\":\"The address of the option token which this redeem clone will be paired with.\"},\"returns\":{\"_0\":\"redeemAddress The address of the deployed Redeem token clone.\"}},\"deployRedeemTemplate()\":{\"details\":\"Deploys the full bytecode of the Redeem contract to be used as a template for clones.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/applications/factories/RedeemFactory.sol\":\"RedeemFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/applications/NullCloneConstructor.sol\":{\"keccak256\":\"0x986f08b84ba86c6fc0f98ece380f7c48d231c95bcaab0ea1cd346dc93397def7\",\"urls\":[\"bzz-raw://4c0d8018a1bb734d2d1c047b8d3109ce802875572206c6fcff7fd418233f989d\",\"dweb:/ipfs/QmSJrgfHPjCyQu8MRJUirvepa92ZrEkoy4RPBmTPXargtZ\"]},\"contracts/option/applications/factories/RedeemFactory.sol\":{\"keccak256\":\"0xf98b63c21122483ede3f062b9561be991f61b32f36b721b462d3ac3a0c550e95\",\"urls\":[\"bzz-raw://8543c89e929ea4eb33a40c4d4cea3d1b7c27ec0bfc903d8e5fced98a438e0226\",\"dweb:/ipfs/QmNaKchRQJCqnA2oyZvbt9JJyY6wRR5oRexgTusYKxAyqc\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/interfaces/IRedeemFactory.sol\":{\"keccak256\":\"0xe08632c1198fa61a3848da09b11fd427f3fedfc1c1e3b8176e3ce2055e7ae208\",\"urls\":[\"bzz-raw://563f70356a74c1e98a4b90c96848082914292d758271cb529e10abd53cd88960\",\"dweb:/ipfs/QmRD4esxBckRUmERKuamJBPLTz7ukGcQj1PRzyQZNm5uo5\"]},\"contracts/option/libraries/CloneLib.sol\":{\"keccak256\":\"0x982f3d93fc17c4bc21a8bc122482b6e4aae93819bc5bdf6545d9a2a43cc86381\",\"urls\":[\"bzz-raw://559f62da36cca4457d8e2e63493a425f26c8aa4edad053bdfcbc188bd6f36d22\",\"dweb:/ipfs/QmRE1yu1te4hK6eooGie9oinWVyoa9SccNtPN9ma2WyYFR\"]},\"contracts/option/libraries/RedeemTemplateLib.sol\":{\"keccak256\":\"0x32d84298d723ba5276fab8128c26fe0855c62e5145ca2575a56e236e10c94398\",\"urls\":[\"bzz-raw://7c72dafc9e05d048224c1041ed2b424e5843e6d7412a0e82f734d38129b00457\",\"dweb:/ipfs/QmXkGKwoyhGCvtNZW2sCpWFn7uCTLnq1j6xqYUcNzTU3bU\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Redeem.sol\":{\"keccak256\":\"0x1057014625bc86d3b02faa35824d283d5baa6ae14b59a4561b0b27d342173090\",\"urls\":[\"bzz-raw://b51f63b92eb53fd5ed6cb48f66609a259f34d95af2c7796049951f667e405a4d\",\"dweb:/ipfs/QmWdT3TbmVrvPkLJw2DYLWecnoNabZ2CAQLnDLpHDPPn1o\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161111c38038061111c8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600061005461010760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506101018161010f60201b60201c565b50610322565b600033905090565b61011d61010760201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146101de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610264576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806110f66026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610dc5806103316000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146101515780639951c8af1461019b578063f2fde38b146101e5578063fe8d6396146102295761007d565b80631458ab4a1461008257806352e831dd1461008c578063715018a614610147575b600080fd5b61008a6102ad565b005b610145600480360360208110156100a257600080fd5b81019080803590602001906401000000008111156100bf57600080fd5b8201836020820111156100d157600080fd5b803590602001918460018302840111640100000000831117156100f357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061036e565b005b61014f610371565b005b6101596104f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a3610522565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610227600480360360208110156101fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610548565b005b61026b6004803603602081101561023f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610755565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b73__$9d5e8c0708ade2d55359313f562ebf5c4c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f157600080fd5b505af4158015610305573d6000803e3d6000fd5b505050506040513d602081101561031b57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b50565b6103796109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461043a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6105506109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610611576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610697576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061075f6109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600061082a6109de565b6108326104f9565b84604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401935050505060405160208183030381529060405280519060200120905060006108f8600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610a09565b90508073ffffffffffffffffffffffffffffffffffffffff1663485cc95561091e6104f9565b866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b505050508092505050919050565b600033905090565b60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b905090565b60006060610a1684610adb565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ad3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610ae73083610aee565b9050919050565b60608060006040519080825280601f01601f191660200182016040528015610b255781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015610b69578082015181840152602081019050610b4e565b50505050905090810190601f168015610b965780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f191660200182016040528015610c515781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b8151811015610d6157818181518110610d0b57fe5b602001015160f81c60f81b836063830181518110610d2557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610cf6565b50509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122056de3fe6d076c1320c7cff7d8ae33f9b2dbd3b3e6bd70282bf7aea822759c45e64736f6c634300060200334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146101515780639951c8af1461019b578063f2fde38b146101e5578063fe8d6396146102295761007d565b80631458ab4a1461008257806352e831dd1461008c578063715018a614610147575b600080fd5b61008a6102ad565b005b610145600480360360208110156100a257600080fd5b81019080803590602001906401000000008111156100bf57600080fd5b8201836020820111156100d157600080fd5b803590602001918460018302840111640100000000831117156100f357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061036e565b005b61014f610371565b005b6101596104f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101a3610522565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610227600480360360208110156101fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610548565b005b61026b6004803603602081101561023f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610755565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b73__$9d5e8c0708ade2d55359313f562ebf5c4c$__634b5e54886040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f157600080fd5b505af4158015610305573d6000803e3d6000fd5b505050506040513d602081101561031b57600080fd5b8101908080519060200190929190505050600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b50565b6103796109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461043a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6105506109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610611576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610697576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6a6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061075f6109d6565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600061082a6109de565b6108326104f9565b84604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401935050505060405160208183030381529060405280519060200120905060006108f8600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360001c610a09565b90508073ffffffffffffffffffffffffffffffffffffffff1663485cc95561091e6104f9565b866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b505050508092505050919050565b600033905090565b60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b905090565b60006060610a1684610adb565b905060008360001b90508151602083018282826000f594505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ad3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f435245415445325f4641494c0000000000000000000000000000000081525060200191505060405180910390fd5b505092915050565b6060610ae73083610aee565b9050919050565b60608060006040519080825280601f01601f191660200182016040528015610b255781602001600182028038833980820191505090505b506040516024018080602001828103825283818151815260200191508051906020019080838360005b83811015610b69578082015181840152602081019050610b4e565b50505050905090810190601f168015610b965780820380516001836020036101000a031916815260200191505b50925050506040516020818303038152906040527f52e831dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905080516063016040519080825280601f01601f191660200182016040528015610c515781602001600182028038833980820191505090505b5091507f3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe60208301526c010000000000000000000000008402602d8301527f5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be60418301526c01000000000000000000000000830260608301527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000607483015260008090505b8151811015610d6157818181518110610d0b57fe5b602001015160f81c60f81b836063830181518110610d2557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050610cf6565b50509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122056de3fe6d076c1320c7cff7d8ae33f9b2dbd3b3e6bd70282bf7aea822759c45e64736f6c63430006020033", @@ -202,7 +202,7 @@ "storageLayout": { "storage": [ { - "astId": 8111, + "astId": 33, "contract": "contracts/option/applications/factories/RedeemFactory.sol:RedeemFactory", "label": "_owner", "offset": 0, @@ -210,7 +210,7 @@ "type": "t_address" }, { - "astId": 13251, + "astId": 6046, "contract": "contracts/option/applications/factories/RedeemFactory.sol:RedeemFactory", "label": "redeemTemplate", "offset": 0, diff --git a/deployments/localhost_31337/RedeemTemplateLib.json b/deployments/localhost_31337/RedeemTemplateLib.json index 62d67bd2..068b4acd 100644 --- a/deployments/localhost_31337/RedeemTemplateLib.json +++ b/deployments/localhost_31337/RedeemTemplateLib.json @@ -7,7 +7,7 @@ "transactionIndex": 0, "gasUsed": "1610382", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x90ada4e203680bf89b71cc5cf894ead4c60854307f897efff6328800a5489349", + "blockHash": "0x2e8cf8f614fa4d21b372fa4fa9a3cc54543bd97bff9dc3c648d782aa7bf058a3", "transactionHash": "0xd62feceac146592f2ea4dd3e2e02936386b62e4c960a41c70252da64e8561dd4", "logs": [], "blockNumber": 2, @@ -17,7 +17,7 @@ }, "address": "0x8858eeB3DfffA017D4BCE9801D340D36Cf895CCf", "args": [], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{\"deployTemplate()\":{\"details\":\"Deploys a clone of the deployed Redeem.sol contract.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/option/libraries/RedeemTemplateLib.sol\":\"RedeemTemplateLib\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x66d1ed2a353be8d2492833a185c53a8f1de8d8fa575a201e9825cf334d79659a\",\"urls\":[\"bzz-raw://a2e9b79e9cf5b398cd29b30df860a6521eefadd9882a346c423afbee5aee606e\",\"dweb:/ipfs/QmUq7gfqR5x1DaMpRKkWwmLMGLPzqUQhqhFEJ2vcgvFraH\"]},\"contracts/option/interfaces/IRedeem.sol\":{\"keccak256\":\"0x6e70ad4936ffe65300a55942aed61e27b70abc284c17e32f1ac53782c8e7ec50\",\"urls\":[\"bzz-raw://c3576a34e82a5b0878e47b3e02d24f439a5f62f01ff64cfbc03f40424e750704\",\"dweb:/ipfs/QmVmr1UzDZYEMgE6Uf5BnPTfWheHfmNUQZetYynBn3DRsf\"]},\"contracts/option/libraries/RedeemTemplateLib.sol\":{\"keccak256\":\"0x32d84298d723ba5276fab8128c26fe0855c62e5145ca2575a56e236e10c94398\",\"urls\":[\"bzz-raw://7c72dafc9e05d048224c1041ed2b424e5843e6d7412a0e82f734d38129b00457\",\"dweb:/ipfs/QmXkGKwoyhGCvtNZW2sCpWFn7uCTLnq1j6xqYUcNzTU3bU\"]},\"contracts/option/primitives/ERC20.sol\":{\"keccak256\":\"0xade55a1efadc3d79eb4071f641632f8b5f4bfbedb5956c0cbc62a05e6b18fb28\",\"urls\":[\"bzz-raw://4333afaa0822c5ee146dc615c9a28d8abc01365a18d46667f8895cb46adf4cc1\",\"dweb:/ipfs/QmWnPet4XvzbjpS2j1ojrb6oXHUqJDAWJSYnP1TSUwZhkx\"]},\"contracts/option/primitives/Redeem.sol\":{\"keccak256\":\"0x1057014625bc86d3b02faa35824d283d5baa6ae14b59a4561b0b27d342173090\",\"urls\":[\"bzz-raw://b51f63b92eb53fd5ed6cb48f66609a259f34d95af2c7796049951f667e405a4d\",\"dweb:/ipfs/QmWdT3TbmVrvPkLJw2DYLWecnoNabZ2CAQLnDLpHDPPn1o\"]}},\"version\":1}", "bytecode": "0x611c45610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b611968806102a88339019056fe608060405234801561001057600080fd5b50611948806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063485cc95511610097578063a457c2d711610066578063a457c2d714610541578063a9059cbb146105a7578063c45a01551461060d578063dd62ed3e1461065757610100565b8063485cc955146103b457806370a082311461041857806395d89b41146104705780639dc29fac146104f357610100565b80632bab754b116100d35780632bab754b14610292578063313ce567146102dc578063395093511461030057806340c10f191461036657610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ee57806323b872dd1461020c575b600080fd5b61010d6106cf565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610708565b604051808215151515815260200191505060405180910390f35b6101f6610726565b6040518082815260200191505060405180910390f35b6102786004803603606081101561022257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610730565b604051808215151515815260200191505060405180910390f35b61029a610809565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102e461082f565b604051808260ff1660ff16815260200191505060405180910390f35b61034c6004803603604081101561031657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610834565b604051808215151515815260200191505060405180910390f35b6103b26004803603604081101561037c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108e7565b005b610416600480360360408110156103ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109b8565b005b61045a6004803603602081101561042e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b02565b6040518082815260200191505060405180910390f35b610478610b4a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b857808201518184015260208101905061049d565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61053f6004803603604081101561050957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b83565b005b61058d6004803603604081101561055757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c54565b604051808215151515815260200191505060405180910390f35b6105f3600480360360408110156105bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d21565b604051808215151515815260200191505060405180910390f35b610615610d3f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106b96004803603604081101561066d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d65565b6040518082815260200191505060405180910390f35b6040518060400160405280601381526020017f5072696d69746976652056312052656465656d0000000000000000000000000081525081565b600061071c610715610dec565b8484610df4565b6001905092915050565b6000600254905090565b600061073d848484610feb565b6107fe84610749610dec565b6107f98560405180606001604052806028815260200161185c60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107af610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b600190509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b60006108dd610841610dec565b846108d88560016000610852610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b610df4565b6001905092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b6109b482826113f4565b5050565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040518060400160405280600381526020017f52444d000000000000000000000000000000000000000000000000000000000081525081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b610c5082826115bb565b5050565b6000610d17610c61610dec565b84610d12856040518060600160405280602581526020016118ee6025913960016000610c8b610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b6001905092915050565b6000610d35610d2e610dec565b8484610feb565b6001905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806118ca6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806118146022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611071576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806118a56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806117cf6023913960400191505060405180910390fd5b61110283838361177f565b61116d81604051806060016040528060268152602001611836602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611200816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611359576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561131e578082015181840152602081019050611303565b50505050905090810190601f16801561134b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156113ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6114a36000838361177f565b6114b88160025461136c90919063ffffffff16565b60028190555061150f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118846021913960400191505060405180910390fd5b61164d8260008361177f565b6116b8816040518060600160405280602281526020016117f2602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061170f8160025461178490919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60006117c683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112ac565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fac7fa7b952186f8a18d776694bf28c0fedda6e4747c77cc4a8c2122833e598b64736f6c63430006020033a264697066735822122093b28d57b7ab1cda534fa8ed47da5ba7b6ac18c770e41052d0813b903b7a654e64736f6c63430006020033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c80634b5e54881461003a575b600080fd5b81801561004657600080fd5b5061004f610091565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006060604051806020016100a59061029a565b6020820181038252601f19601f8201166040525090506100ea60007fe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e260001b836100f0565b91505090565b60008084471015610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f437265617465323a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b6000835114156101e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f437265617465323a2062797465636f6465206c656e677468206973207a65726f81525060200191505060405180910390fd5b8383516020850187f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f437265617465323a204661696c6564206f6e206465706c6f790000000000000081525060200191505060405180910390fd5b809150509392505050565b611968806102a88339019056fe608060405234801561001057600080fd5b50611948806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063485cc95511610097578063a457c2d711610066578063a457c2d714610541578063a9059cbb146105a7578063c45a01551461060d578063dd62ed3e1461065757610100565b8063485cc955146103b457806370a082311461041857806395d89b41146104705780639dc29fac146104f357610100565b80632bab754b116100d35780632bab754b14610292578063313ce567146102dc578063395093511461030057806340c10f191461036657610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ee57806323b872dd1461020c575b600080fd5b61010d6106cf565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610708565b604051808215151515815260200191505060405180910390f35b6101f6610726565b6040518082815260200191505060405180910390f35b6102786004803603606081101561022257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610730565b604051808215151515815260200191505060405180910390f35b61029a610809565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102e461082f565b604051808260ff1660ff16815260200191505060405180910390f35b61034c6004803603604081101561031657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610834565b604051808215151515815260200191505060405180910390f35b6103b26004803603604081101561037c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108e7565b005b610416600480360360408110156103ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109b8565b005b61045a6004803603602081101561042e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b02565b6040518082815260200191505060405180910390f35b610478610b4a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b857808201518184015260208101905061049d565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61053f6004803603604081101561050957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b83565b005b61058d6004803603604081101561055757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c54565b604051808215151515815260200191505060405180910390f35b6105f3600480360360408110156105bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d21565b604051808215151515815260200191505060405180910390f35b610615610d3f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106b96004803603604081101561066d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d65565b6040518082815260200191505060405180910390f35b6040518060400160405280601381526020017f5072696d69746976652056312052656465656d0000000000000000000000000081525081565b600061071c610715610dec565b8484610df4565b6001905092915050565b6000600254905090565b600061073d848484610feb565b6107fe84610749610dec565b6107f98560405180606001604052806028815260200161185c60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107af610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b600190509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601281565b60006108dd610841610dec565b846108d88560016000610852610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b610df4565b6001905092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b6109b482826113f4565b5050565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f49535f494e495449414c495a4544000000000000000000000000000081525060200191505060405180910390fd5b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040518060400160405280600381526020017f52444d000000000000000000000000000000000000000000000000000000000081525081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f56414c49440000000000000000000000000000000000000081525060200191505060405180910390fd5b610c5082826115bb565b5050565b6000610d17610c61610dec565b84610d12856040518060600160405280602581526020016118ee6025913960016000610c8b610dec565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b610df4565b6001905092915050565b6000610d35610d2e610dec565b8484610feb565b6001905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806118ca6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f00576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806118146022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611071576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806118a56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806117cf6023913960400191505060405180910390fd5b61110283838361177f565b61116d81604051806060016040528060268152602001611836602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611200816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611359576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561131e578082015181840152602081019050611303565b50505050905090810190601f16801561134b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156113ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6114a36000838361177f565b6114b88160025461136c90919063ffffffff16565b60028190555061150f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806118846021913960400191505060405180910390fd5b61164d8260008361177f565b6116b8816040518060600160405280602281526020016117f2602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112ac9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061170f8160025461178490919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60006117c683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112ac565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fac7fa7b952186f8a18d776694bf28c0fedda6e4747c77cc4a8c2122833e598b64736f6c63430006020033a264697066735822122093b28d57b7ab1cda534fa8ed47da5ba7b6ac18c770e41052d0813b903b7a654e64736f6c63430006020033", diff --git a/deployments/localhost_31337/Registry.json b/deployments/localhost_31337/Registry.json index 854d2a63..b2a3d88d 100644 --- a/deployments/localhost_31337/Registry.json +++ b/deployments/localhost_31337/Registry.json @@ -531,7 +531,7 @@ "transactionIndex": 0, "gasUsed": "2143856", "logsBloom": "0x00000000000000000000000000000008000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000080000400400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb03efbf260c8ea5c3179d66ccd310165c4c9a9fdffa9b66f8414bc29a3140f51", + "blockHash": "0x89a8d1c34ff6b530230651dd0f1d9088dda0eaf8b5b59ce8f298b9a0f62377fd", "transactionHash": "0xae6c4ee82196f6c674b63d14686b1f4dd596f4c4ba52cfa00c39e28405acac9d", "logs": [ { @@ -546,7 +546,7 @@ ], "data": "0x", "logIndex": 0, - "blockHash": "0xb03efbf260c8ea5c3179d66ccd310165c4c9a9fdffa9b66f8414bc29a3140f51" + "blockHash": "0x89a8d1c34ff6b530230651dd0f1d9088dda0eaf8b5b59ce8f298b9a0f62377fd" }, { "transactionIndex": 0, @@ -560,7 +560,7 @@ ], "data": "0x", "logIndex": 1, - "blockHash": "0xb03efbf260c8ea5c3179d66ccd310165c4c9a9fdffa9b66f8414bc29a3140f51" + "blockHash": "0x89a8d1c34ff6b530230651dd0f1d9088dda0eaf8b5b59ce8f298b9a0f62377fd" } ], "blockNumber": 3, @@ -570,7 +570,7 @@ }, "address": "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7", "args": [], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"redeemAddress\",\"type\":\"address\"}],\"name\":\"DeployedOptionClone\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"UnverifiedExpiry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"UnverifiedToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"optionFactory_\",\"type\":\"address\"}],\"name\":\"UpdatedOptionFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"redeemFactory_\",\"type\":\"address\"}],\"name\":\"UpdatedRedeemFactory\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"VerifiedExpiry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"VerifiedToken\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allOptionClones\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"calculateOptionAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"deployOption\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllOptionClonesLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"strikeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"getOptionAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"isVerifiedExpiry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"}],\"name\":\"isVerifiedOption\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"isVerifiedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optionFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseDeployments\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionFactory_\",\"type\":\"address\"}],\"name\":\"setOptionFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemFactory_\",\"type\":\"address\"}],\"name\":\"setRedeemFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseDeployments\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"unverifyExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"unverifyToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"verifyExpiry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"verifyToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"calculateOptionAddress(address,address,uint256,uint256,uint256)\":{\"details\":\"Calculates the option address deployed with create2 using the parameter arguments.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp of the option's expiration date.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the ERC-20 strike token.\",\"underlyingToken\":\"The address of the ERC-20 underlying token.\"},\"returns\":{\"_0\":\"The address of the option with the parameter arguments.\"}},\"deployOption(address,address,uint256,uint256,uint256)\":{\"details\":\"Deploys an option contract clone with create2.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp of the option's expiration date.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the ERC-20 strike token.\",\"underlyingToken\":\"The address of the ERC-20 underlying token.\"},\"returns\":{\"_0\":\"The address of the deployed option clone.\"}},\"getAllOptionClonesLength()\":{\"details\":\"Returns the length of the allOptionClones address array.\"},\"getOptionAddress(address,address,uint256,uint256,uint256)\":{\"details\":\"Gets the option address and returns address zero if not yet deployed.\",\"params\":{\"base\":\"The quantity of underlying tokens per unit of quote amount of strike tokens.\",\"expiry\":\"The unix timestamp of the option's expiration date.\",\"quote\":\"The quantity of strike tokens per unit of base amount of underlying tokens.\",\"strikeToken\":\"The address of the ERC-20 strike token.\",\"underlyingToken\":\"The address of the ERC-20 underlying token.\"},\"returns\":{\"_0\":\"The address of the option with the parameter arguments.\"}},\"isVerifiedExpiry(uint256)\":{\"details\":\"Checks the verifiedExpiries private mapping and returns verification status of token.\",\"returns\":{\"_0\":\"bool Verified or not verified.\"}},\"isVerifiedOption(address)\":{\"details\":\"Checks an option address to see if it has verified assets and expiry time.\",\"params\":{\"optionAddress\":\"The address of the option token.\"},\"returns\":{\"_0\":\"bool If the option has verified underlying and strike tokens, and expiry time.\"}},\"isVerifiedToken(address)\":{\"details\":\"Checks the verifiedTokens private mapping and returns verification status of token.\",\"returns\":{\"_0\":\"bool Verified or not verified.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pauseDeployments()\":{\"details\":\"Pauses the deployOption function.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setOptionFactory(address)\":{\"details\":\"Sets the option factory contract to use for deploying clones.\",\"params\":{\"optionFactory_\":\"The address of the option factory.\"}},\"setRedeemFactory(address)\":{\"details\":\"Sets the redeem factory contract to use for deploying clones.\",\"params\":{\"redeemFactory_\":\"The address of the redeem factory.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpauseDeployments()\":{\"details\":\"Unpauses the deployOption function.\"},\"unverifyExpiry(uint256)\":{\"details\":\"Sets an expiry timestamp's verification status to false.\"},\"unverifyToken(address)\":{\"details\":\"Sets a verified token's verification status to false.\"},\"verifyExpiry(uint256)\":{\"details\":\"Sets an expiry timestamp's verification status to true.\"},\"verifyToken(address)\":{\"details\":\"Sets an ERC-20 token verification status to true.\"}}},\"userdoc\":{\"methods\":{\"getOptionAddress(address,address,uint256,uint256,uint256)\":{\"notice\":\"Will calculate the option address using the parameter arguments. Checks the code size of the address to see if the contract has been deployed yet. If contract has not been deployed, returns address zero.\"},\"unverifyExpiry(uint256)\":{\"notice\":\"A mapping of standardized, \\\"verified\\\", timestamps for the options.\"},\"verifyExpiry(uint256)\":{\"notice\":\"A mapping of standardized, \\\"verified\\\", timestamps for the options.\"},\"verifyToken(address)\":{\"notice\":\"A \\\"verified\\\" token is a standard ERC-20 token that we have tested with the option contract. An example of an \\\"unverified\\\" token is a non-standard ERC-20 token which has not been tested.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/option/applications/Registry.sol\":\"Registry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x9a8c691b81a4a48adbbd5b010faa56a168c189e711495c16347d93b60b805f82\",\"urls\":[\"bzz-raw://d951d626ed7bfe1a2d7a6bd4af315ff8691929bd567594d6ab53599fe9e17e4e\",\"dweb:/ipfs/QmYkGeowpa6Bjr9aaDirWdDo7hSfShzzZhanKC4nTfRhLj\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x0336d64bd695c5d8bb962fd3dacb3d26f52879b19e75472d7dea9f91f7add79a\",\"urls\":[\"bzz-raw://d709c1de86475b74fa4f614458e868213f8e5b13eed8b29b465793cd97e5c0f5\",\"dweb:/ipfs/QmYVgazum1VVeDoJYYmKhAJ1mcuTy8vidb2iFEMWcVdSeY\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/option/applications/Registry.sol\":{\"keccak256\":\"0x027242dd1913c0695475b055ed09b2ed557f7a76c4030d6df46b07ed4f8d67f3\",\"urls\":[\"bzz-raw://f11ace92d4cd469f7163cb43c52449367d4cf2f1c0e597730713fae96bf06eef\",\"dweb:/ipfs/QmawRj3FvvqmpZ2SognNin6spiJUK5fcioYDkJouxrMz9z\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/IOptionFactory.sol\":{\"keccak256\":\"0x523335d4aa7b9895d0afd9dbc14e3f3356a1d64827a6f90571c08aef54fe5a3c\",\"urls\":[\"bzz-raw://6e59a331ddd34d836f0fd2a25800cf29ccf0a5d8a074ff2aefa4072106f1388d\",\"dweb:/ipfs/QmXMEvdgdhUgprAG2fAX95imL2vdPAfsoi6NemzvbqMQvK\"]},\"contracts/option/interfaces/IRedeemFactory.sol\":{\"keccak256\":\"0xe08632c1198fa61a3848da09b11fd427f3fedfc1c1e3b8176e3ce2055e7ae208\",\"urls\":[\"bzz-raw://563f70356a74c1e98a4b90c96848082914292d758271cb529e10abd53cd88960\",\"dweb:/ipfs/QmRD4esxBckRUmERKuamJBPLTz7ukGcQj1PRzyQZNm5uo5\"]},\"contracts/option/interfaces/IRegistry.sol\":{\"keccak256\":\"0x02aeb84e8b748674bc31707899158885066923f203e7a3a58cee3c68a49ec96f\",\"urls\":[\"bzz-raw://78dd4aa316f8b50ed595437e8a1ec1e519384c89bd605b9aa9194f3b98543a43\",\"dweb:/ipfs/QmXvrc8JwQCkFHBTwoGjV7xCUcNN8Ed15QES9tKWsjuUAz\"]}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506000620000246200010e60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35060008060146101000a81548160ff0219169083151502179055506001600060156101000a81548160ff02191690831515021790555062000108336200011660201b60201c565b6200032e565b600033905090565b620001266200010e60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620001e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000270576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180620028706026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b612532806200033e6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638da5cb5b116100b8578063b000e9ec1161007c578063b000e9ec146105d7578063b3461c8714610699578063c7a988ac146106e3578063e4ec108c14610701578063f2fde38b14610745578063fce4ae3a1461078957610142565b80638da5cb5b146103f95780639180928f1461044357806392160076146105055780639788973414610549578063aaf15bb51461059357610142565b80635c975abb1161010a5780635c975abb146102e15780636189a4d31461030357806366f1976d14610371578063715018a61461037b5780637f53abde146103855780638229d851146103b357610142565b80631027b219146101475780632e53926d146101a357806339c00f41146102655780633d11c796146102935780634130276b1461029d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107e5565b604051808215151515815260200191505060405180910390f35b610223600480360360a08110156101b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061083b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102916004803603602081101561027b57600080fd5b8101908080359060200190929190505050610973565b005b61029b610aa2565b005b6102df600480360360208110156102b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b75565b005b6102e9610d7f565b604051808215151515815260200191505060405180910390f35b61032f6004803603602081101561031957600080fd5b8101908080359060200190929190505050610d95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610379610dd1565b005b610383610ea4565b005b6103b16004803603602081101561039b57600080fd5b810190808035906020019092919050505061102c565b005b6103df600480360360208110156103c957600080fd5b81019080803590602001909291905050506111d1565b604051808215151515815260200191505060405180910390f35b6104016111fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c3600480360360a081101561045957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611224565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105476004803603602081101561051b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a1a565b005b610551611b6a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105d5600480360360208110156105a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b90565b005b610657600480360360a08110156105ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611ce0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106a1611d28565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb611d4e565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d5b565b005b6107876004803603602081101561075b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ec2565b005b6107cb6004803603602081101561079f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120cf565b604051808215151515815260200191505060405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e53926d88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561092957600080fd5b505afa15801561093d573d6000803e3d6000fd5b505050506040513d602081101561095357600080fd5b810190808051906020019092919050505090508091505095945050505050565b61097b6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f928f06bc62edcabae2855ccfad4a2f103f1516665607048ed17a208d755713f9816040518082815260200191505060405180910390a150565b610aaa6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610b736122b4565b565b610b7d6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ce1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fb48a62163a7d747c16a177c1eb529841e700a0bb4a1e787d7d293eaaf7716d4d60405160405180910390a250565b60008060149054906101000a900460ff16905090565b60058181548110610da257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610dd96122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610ea26123bc565b565b610eac6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6110346122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b4281101561116b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f455850495245445f54494d455354414d50000000000000000000000081525060200191505060405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f01a8c23c3824519cd8b455f3e637b99e97249d2e06ab99d93f43d60d163fb5bf816040518082815260200191505060405180910390a150565b60006004600083815260200190815260200160002060009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060159054906101000a900460ff166112a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060156101000a81548160ff021916908315150217905550600060149054906101000a900460ff1615611344576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600084116113ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008311611430576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b428210156114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156115b25750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b611624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d604a1ef88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561171357600080fd5b505af1158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe8d6396836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156117f357600080fd5b505af1158015611807573d6000803e3d6000fd5b505050506040513d602081101561181d57600080fd5b810190808051906020019092919050505090506005829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166335638b6b83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fdb19f143ae8e015bc96c062e81a1c69f2e1568dfba82c18947239515a0b8725b60405160405180910390a481925050506001600060156101000a81548160ff02191690831515021790555095945050505050565b611a226122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ae3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f4f32895401ed84629e6727059ffe5f8d2f637bc6c325630ba6054007ceb95c2c60405160405180910390a250565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611b986122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167feec46c83ee301290575f8c7bb5428480c127f0c54263c00f30465050f4495a8e60405160405180910390a250565b600080611cf0878787878761083b565b90506000611cfd826124c6565b905060008163ffffffff161115611d18578192505050611d1f565b6000925050505b95945050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600580549050905090565b611d636122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611e24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fe9769d9a414671453740fdb9cc92922655391134bd1beec930a2203bd45a67c060405160405180910390a250565b611eca6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612011576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806124d76026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082905060008173ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561211d57600080fd5b505afa158015612131573d6000803e3d6000fd5b505050506040513d602081101561214757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d60208110156121cc57600080fd5b8101908080519060200190929190505050905060008373ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561222757600080fd5b505afa15801561223b573d6000803e3d6000fd5b505050506040513d602081101561225157600080fd5b81019080805190602001909291905050509050600061226f846107e5565b9050600061227c846107e5565b90506000612289846111d1565b90508280156122955750815b801561229e5750805b975050505050505050919050565b600033905090565b600060149054906101000a900460ff16612336576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6123796122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff161561243f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124836122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600080823b90508091505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122018888278084f33bcfed0ffea843d71474802d7d3a7183dda4dd402fd74264a0e64736f6c634300060200334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c80638da5cb5b116100b8578063b000e9ec1161007c578063b000e9ec146105d7578063b3461c8714610699578063c7a988ac146106e3578063e4ec108c14610701578063f2fde38b14610745578063fce4ae3a1461078957610142565b80638da5cb5b146103f95780639180928f1461044357806392160076146105055780639788973414610549578063aaf15bb51461059357610142565b80635c975abb1161010a5780635c975abb146102e15780636189a4d31461030357806366f1976d14610371578063715018a61461037b5780637f53abde146103855780638229d851146103b357610142565b80631027b219146101475780632e53926d146101a357806339c00f41146102655780633d11c796146102935780634130276b1461029d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107e5565b604051808215151515815260200191505060405180910390f35b610223600480360360a08110156101b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061083b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102916004803603602081101561027b57600080fd5b8101908080359060200190929190505050610973565b005b61029b610aa2565b005b6102df600480360360208110156102b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b75565b005b6102e9610d7f565b604051808215151515815260200191505060405180910390f35b61032f6004803603602081101561031957600080fd5b8101908080359060200190929190505050610d95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610379610dd1565b005b610383610ea4565b005b6103b16004803603602081101561039b57600080fd5b810190808035906020019092919050505061102c565b005b6103df600480360360208110156103c957600080fd5b81019080803590602001909291905050506111d1565b604051808215151515815260200191505060405180910390f35b6104016111fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c3600480360360a081101561045957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611224565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105476004803603602081101561051b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a1a565b005b610551611b6a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105d5600480360360208110156105a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b90565b005b610657600480360360a08110156105ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050611ce0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106a1611d28565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106eb611d4e565b6040518082815260200191505060405180910390f35b6107436004803603602081101561071757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d5b565b005b6107876004803603602081101561075b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ec2565b005b6107cb6004803603602081101561079f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120cf565b604051808215151515815260200191505060405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e53926d88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060206040518083038186803b15801561092957600080fd5b505afa15801561093d573d6000803e3d6000fd5b505050506040513d602081101561095357600080fd5b810190808051906020019092919050505090508091505095945050505050565b61097b6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f928f06bc62edcabae2855ccfad4a2f103f1516665607048ed17a208d755713f9816040518082815260200191505060405180910390a150565b610aaa6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610b736122b4565b565b610b7d6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ce1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fb48a62163a7d747c16a177c1eb529841e700a0bb4a1e787d7d293eaaf7716d4d60405160405180910390a250565b60008060149054906101000a900460ff16905090565b60058181548110610da257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610dd96122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610ea26123bc565b565b610eac6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6110346122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b4281101561116b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f455850495245445f54494d455354414d50000000000000000000000081525060200191505060405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507f01a8c23c3824519cd8b455f3e637b99e97249d2e06ab99d93f43d60d163fb5bf816040518082815260200191505060405180910390a150565b60006004600083815260200190815260200160002060009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060159054906101000a900460ff166112a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060156101000a81548160ff021916908315150217905550600060149054906101000a900460ff1615611344576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600084116113ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f424153455f5a45524f0000000000000000000000000000000000000081525060200191505060405180910390fd5b60008311611430576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f51554f54455f5a45524f00000000000000000000000000000000000081525060200191505060405180910390fd5b428210156114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f4552525f4558504952590000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f53414d455f415353455453000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156115b25750600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b611624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4552525f5a45524f5f414444524553530000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d604a1ef88888888886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561171357600080fd5b505af1158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b810190808051906020019092919050505090506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe8d6396836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156117f357600080fd5b505af1158015611807573d6000803e3d6000fd5b505050506040513d602081101561181d57600080fd5b810190808051906020019092919050505090506005829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166335638b6b83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fdb19f143ae8e015bc96c062e81a1c69f2e1568dfba82c18947239515a0b8725b60405160405180910390a481925050506001600060156101000a81548160ff02191690831515021790555095945050505050565b611a226122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ae3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f4f32895401ed84629e6727059ffe5f8d2f637bc6c325630ba6054007ceb95c2c60405160405180910390a250565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611b986122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167feec46c83ee301290575f8c7bb5428480c127f0c54263c00f30465050f4495a8e60405160405180910390a250565b600080611cf0878787878761083b565b90506000611cfd826124c6565b905060008163ffffffff161115611d18578192505050611d1f565b6000925050505b95945050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600580549050905090565b611d636122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611e24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fe9769d9a414671453740fdb9cc92922655391134bd1beec930a2203bd45a67c060405160405180910390a250565b611eca6122ac565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612011576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806124d76026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082905060008173ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561211d57600080fd5b505afa158015612131573d6000803e3d6000fd5b505050506040513d602081101561214757600080fd5b8101908080519060200190929190505050905060008273ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d60208110156121cc57600080fd5b8101908080519060200190929190505050905060008373ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561222757600080fd5b505afa15801561223b573d6000803e3d6000fd5b505050506040513d602081101561225157600080fd5b81019080805190602001909291905050509050600061226f846107e5565b9050600061227c846107e5565b90506000612289846111d1565b90508280156122955750815b801561229e5750805b975050505050505050919050565b600033905090565b600060149054906101000a900460ff16612336576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6123796122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff161561243f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124836122ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600080823b90508091505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122018888278084f33bcfed0ffea843d71474802d7d3a7183dda4dd402fd74264a0e64736f6c63430006020033", @@ -702,7 +702,7 @@ "storageLayout": { "storage": [ { - "astId": 8111, + "astId": 33, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "_owner", "offset": 0, @@ -710,7 +710,7 @@ "type": "t_address" }, { - "astId": 9359, + "astId": 1281, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "_paused", "offset": 20, @@ -718,7 +718,7 @@ "type": "t_bool" }, { - "astId": 9429, + "astId": 1351, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "_notEntered", "offset": 21, @@ -726,7 +726,7 @@ "type": "t_bool" }, { - "astId": 12549, + "astId": 5344, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "optionFactory", "offset": 0, @@ -734,7 +734,7 @@ "type": "t_address" }, { - "astId": 12552, + "astId": 5347, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "redeemFactory", "offset": 0, @@ -742,7 +742,7 @@ "type": "t_address" }, { - "astId": 12556, + "astId": 5351, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "verifiedTokens", "offset": 0, @@ -750,7 +750,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 12560, + "astId": 5355, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "verifiedExpiries", "offset": 0, @@ -758,7 +758,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 12563, + "astId": 5358, "contract": "contracts/option/applications/Registry.sol:Registry", "label": "allOptionClones", "offset": 0, diff --git a/deployments/localhost_31337/TestERC20.json b/deployments/localhost_31337/TestERC20.json index 7d4770c3..efa1bd3e 100644 --- a/deployments/localhost_31337/TestERC20.json +++ b/deployments/localhost_31337/TestERC20.json @@ -323,7 +323,7 @@ "transactionIndex": 0, "gasUsed": "1244188", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000010000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000020000000800000000000000000000000010080000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd672fd51816d9880557b3f752845b7e52f7ec5761d7e24fcb6ca568c30f1b9f8", + "blockHash": "0x2c303c7fe045656d14960f612a47447c209b13606d8c038587cc40496e5fbc54", "transactionHash": "0x9a323140f1bace890e55c6d658d8d87748486eba4b06f62786cb9b78db58309a", "logs": [ { @@ -338,7 +338,7 @@ ], "data": "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000", "logIndex": 0, - "blockHash": "0xd672fd51816d9880557b3f752845b7e52f7ec5761d7e24fcb6ca568c30f1b9f8" + "blockHash": "0x2c303c7fe045656d14960f612a47447c209b13606d8c038587cc40496e5fbc54" } ], "blockNumber": 8, @@ -352,7 +352,7 @@ "Ether", "10000000000000000000000" ], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"details\":\"Function to mint tokens\",\"params\":{\"to\":\"The address that will receive the minted tokens.\",\"value\":\"The amount of tokens to mint.\"},\"returns\":{\"_0\":\"A boolean that indicates if the operation was successful.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/test/tokens/TestERC20.sol\":\"TestERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"contracts/test/tokens/TestERC20.sol\":{\"keccak256\":\"0x9741e48a659e66a7615f2e8c8a93d7c8324866f178b926a53c396367c7c9f799\",\"urls\":[\"bzz-raw://7254e0de762562621113c1951978e291e9a5832565da9ab8df7857bbd0b0f657\",\"dweb:/ipfs/QmdA1Y2hRW21QTGdhWDZ2pdMfrhrjADTZhexqgK9HpCJPZ\"]}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200189938038062001899833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919050505082828160039080519060200190620001dc9291906200049b565b508060049080519060200190620001f59291906200049b565b506012600560006101000a81548160ff021916908360ff16021790555050506200022633826200022f60201b60201c565b5050506200054a565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620002d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b620002e7600083836200040d60201b60201c565b62000303816002546200041260201b62000fb41790919060201c565b60028190555062000361816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546200041260201b62000fb41790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60008082840190508381101562000491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004de57805160ff19168380011785556200050f565b828001600101855582156200050f579182015b828111156200050e578251825591602001919060010190620004f1565b5b5090506200051e919062000522565b5090565b6200054791905b808211156200054357600081600090555060010162000529565b5090565b90565b61133f806200055a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220aae222bc33195deeb2b44af7f5d04f03ff98f96bfefb7d6b2624f159b9f175c564736f6c63430006020033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220aae222bc33195deeb2b44af7f5d04f03ff98f96bfefb7d6b2624f159b9f175c564736f6c63430006020033", @@ -409,7 +409,7 @@ "storageLayout": { "storage": [ { - "astId": 8414, + "astId": 336, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_balances", "offset": 0, @@ -417,7 +417,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 8420, + "astId": 342, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_allowances", "offset": 0, @@ -425,7 +425,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 8422, + "astId": 344, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_totalSupply", "offset": 0, @@ -433,7 +433,7 @@ "type": "t_uint256" }, { - "astId": 8424, + "astId": 346, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_name", "offset": 0, @@ -441,7 +441,7 @@ "type": "t_string_storage" }, { - "astId": 8426, + "astId": 348, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_symbol", "offset": 0, @@ -449,7 +449,7 @@ "type": "t_string_storage" }, { - "astId": 8428, + "astId": 350, "contract": "contracts/test/tokens/TestERC20.sol:TestERC20", "label": "_decimals", "offset": 0, diff --git a/deployments/localhost_31337/Trader.json b/deployments/localhost_31337/Trader.json index 4cb8be52..bf07f5cd 100644 --- a/deployments/localhost_31337/Trader.json +++ b/deployments/localhost_31337/Trader.json @@ -344,7 +344,7 @@ "transactionIndex": 0, "gasUsed": "2285903", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x43b54cd3c83c42f3328d6f2db44adc9490139cc87894aff405757556164b7e20", + "blockHash": "0x820bb03255b4027a44e900b0ca1bad7500ee03170dcc46957af8b7ef2bc37472", "transactionHash": "0x5144fd4404c382fe2531c628feefc55b9e642dc60b7a65f447d573a2e6ec435f", "logs": [], "blockNumber": 11, @@ -356,7 +356,7 @@ "args": [ "0xc4905364b78a742ccce7B890A89514061E47068D" ], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"TraderClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outUnderlyings\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inStrikes\",\"type\":\"uint256\"}],\"name\":\"TraderExercise\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputOptions\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputRedeems\",\"type\":\"uint256\"}],\"name\":\"TraderMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inRedeems\",\"type\":\"uint256\"}],\"name\":\"TraderRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"TraderUnwind\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"closeQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeClose\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"exerciseQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExercise\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"unwindQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeUnwind\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"safeClose(address,uint256,address)\":{\"details\":\"Burn optionTokens and redeemTokens to withdraw underlyingTokens.\",\"params\":{\"closeQuantity\":\"Quantity of optionTokens to burn. (Implictly will burn the strike ratio quantity of redeemTokens).\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address.\"}},\"safeExercise(address,uint256,address)\":{\"details\":\"Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\",\"params\":{\"exerciseQuantity\":\"Quantity of optionTokens to exercise.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address.\"}},\"safeMint(address,uint256,address)\":{\"details\":\"Mint options at a 1:1 ratio with deposited underlying tokens.\",\"params\":{\"mintQuantity\":\"Quantity of options to mint and underlyingToken to deposit.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The newly minted options and redeems are sent to the receiver address.\"}},\"safeRedeem(address,uint256,address)\":{\"details\":\"Burns redeemTokens to withdraw available strikeTokens.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The strikeTokens are sent to the receiver address.\",\"redeemQuantity\":\"redeemQuantity of redeemTokens to burn.\"}},\"safeUnwind(address,uint256,address)\":{\"details\":\"Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens and redeemTokens are sent to the receiver address.\",\"unwindQuantity\":\"Quantity of option tokens used to calculate the amount of redeem tokens to burn.\"}}}},\"userdoc\":{\"methods\":{\"safeClose(address,uint256,address)\":{\"notice\":\"The redeemTokens to burn is equal to the optionTokens * strike ratio. inOptions = inRedeems / strike ratio = outUnderlyings\"},\"safeExercise(address,uint256,address)\":{\"notice\":\"Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\"},\"safeMint(address,uint256,address)\":{\"notice\":\"Also mints redeems at a strike ratio to the deposited underlyings. Warning: Calls msg.sender with safeTransferFrom.\"},\"safeRedeem(address,uint256,address)\":{\"notice\":\"inRedeems = outStrikes.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/option/extensions/Trader.sol\":\"Trader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/option/extensions/Trader.sol\":{\"keccak256\":\"0xcd6d24d50e76af7ace0d1b82e042fc0ada30c743f055988ca4e907a97a249b22\",\"urls\":[\"bzz-raw://cd7338a7a86d27b182f75cc8b5fcd88d8ea0b711581b0b9b9ec3eb9b5127de82\",\"dweb:/ipfs/QmeTux1AZ2Bqvk5frWotp28HLmnBpVqHkXyydYNNxeMFEv\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/ITrader.sol\":{\"keccak256\":\"0xb8f9e6d923e556e137a606c76e9adf8fd07375c7ff0650f4a7932adc950df44f\",\"urls\":[\"bzz-raw://ef82aa3d081c12e307f45334cffd8916a27c5c7db62c2b44ce9663633a8c385b\",\"dweb:/ipfs/QmQLsKZomP19HAAXKpLshhXiZhrusbf9yoZhy8tJDffVvS\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506040516128cc3803806128cc8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061281d806100af6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063087b063214610067578063154fa089146100f057806320e469d6146101805780633fc8cef314610209578063a1d8778f14610253578063b8a6bb3b146102d5575b600080fd5b6100d36004803603606081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610365565b604051808381526020018281526020019250505060405180910390f35b61015c6004803603606081101561010657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ac565b60405180848152602001838152602001828152602001935050505060405180910390f35b6101ec6004803603606081101561019657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105f6565b604051808381526020018281526020019250505060405180910390f35b61021161073d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102bf6004803603606081101561026957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610763565b6040518082815260200191505060405180910390f35b610341600480360360608110156102eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610899565b60405180848152602001838152602001828152602001935050505060405180910390f35b6000806000809054906101000a900460ff166103e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806104118787876109e3565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f453315713d2b83893ec1df8cf529328bf25e4fe72b6c4d880edb03243e80119b8885604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b60008060008060009054906101000a900460ff16610532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080600061055c8989896110be565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd0c7e26bb5b37129e4f53759eb48fc9e0c4bafd336a94f6b87c5ce9f139183e5846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff1661067a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806106a28787876116a1565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f58fb17601901d5509bf49bedd00d55850ef2ebff3adb67a5f517b86eed08a0c88484604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff166107e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061080d8585856118a1565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd75e50ef6162896bf5efc868c48b0c44d04ab08196d3e2b4c3aba5062c5ce94d836040518082815260200191505060405180910390a38091505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008060009054906101000a900460ff1661091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806000610949898989611c3b565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f602dc153bc8f9d064b879f6bc973338b7c009689b9cacc58a250c3fb3da51808846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008411610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ada57600080fd5b505afa158015610aee573d6000803e3d6000fd5b505050506040513d6020811015610b0457600080fd5b81019080805190602001909291905050501015610b89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000610caf8673ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015610bd457600080fd5b505afa158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b8101908080519060200190929190505050610ca18873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5757600080fd5b505afa158015610c6b573d6000803e3d6000fd5b505050506040513d6020811015610c8157600080fd5b81019080805190602001909291905050508861228390919063ffffffff16565b61230990919063ffffffff16565b9050808673ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf857600080fd5b505afa158015610d0c573d6000803e3d6000fd5b505050506040513d6020811015610d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610daf57600080fd5b505afa158015610dc3573d6000803e3d6000fd5b505050506040513d6020811015610dd957600080fd5b81019080805190602001909291905050501015610e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b610f0b3387838973ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610eaa57600080fd5b505afa158015610ebe573d6000803e3d6000fd5b505050506040513d6020811015610ed457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b610f383387878973ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008673ffffffffffffffffffffffffffffffffffffffff1663787eae30868860006040519080825280601f01601f191660200182016040528015610f8c5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611014578082015181840152602081019050610ff9565b50505050905090810190601f1680156110415780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b15801561106157600080fd5b505af1158015611075573d6000803e3d6000fd5b505050506040513d604081101561108b57600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508181935093505050935093915050565b6000806000808511611138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b428673ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561117f57600080fd5b505afa158015611193573d6000803e3d6000fd5b505050506040513d60208110156111a957600080fd5b81019080805190602001909291905050501061122d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006113538773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561127857600080fd5b505afa15801561128c573d6000803e3d6000fd5b505050506040513d60208110156112a257600080fd5b81019080805190602001909291905050506113458973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112fb57600080fd5b505afa15801561130f573d6000803e3d6000fd5b505050506040513d602081101561132557600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139c57600080fd5b505afa1580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561145357600080fd5b505afa158015611467573d6000803e3d6000fd5b505050506040513d602081101561147d57600080fd5b81019080805190602001909291905050501015611502576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6115af3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154e57600080fd5b505afa158015611562573d6000803e3d6000fd5b505050506040513d602081101561157857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561163157600080fd5b505af1158015611645573d6000803e3d6000fd5b505050506040513d606081101561165b57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000806000841161171a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6117c73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561176657600080fd5b505afa15801561177a573d6000803e3d6000fd5b505050506040513d602081101561179057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561184857600080fd5b505af115801561185c573d6000803e3d6000fd5b505050506040513d604081101561187257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6000808311611918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b828473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195f57600080fd5b505afa158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b81019080805190602001909291905050501015611ac5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611b723385858773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b1157600080fd5b505afa158015611b25573d6000803e3d6000fd5b505050506040513d6020811015611b3b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008473ffffffffffffffffffffffffffffffffffffffff16635e86929d846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611bf357600080fd5b505af1158015611c07573d6000803e3d6000fd5b505050506040513d6020811015611c1d57600080fd5b81019080805190602001909291905050509050809150509392505050565b6000806000808511611cb5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d3357600080fd5b505afa158015611d47573d6000803e3d6000fd5b505050506040513d6020811015611d5d57600080fd5b81019080805190602001909291905050501015611de2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611f088773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b8101908080519060200190929190505050611efa8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d6020811015611eda57600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d6020811015611f7b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561200857600080fd5b505afa15801561201c573d6000803e3d6000fd5b505050506040513d602081101561203257600080fd5b810190808051906020019092919050505010156120b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6121643388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561210357600080fd5b505afa158015612117573d6000803e3d6000fd5b505050506040513d602081101561212d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6121913388888a73ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561221357600080fd5b505af1158015612227573d6000803e3d6000fd5b505050506040513d606081101561223d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000808314156122965760009050612303565b60008284029050828482816122a757fe5b04146122fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061279d6021913960400191505060405180910390fd5b809150505b92915050565b600061234b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612440565b905092915050565b61243a846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612506565b50505050565b600080831182906124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156124b1578082015181840152602081019050612496565b50505050905090810190601f1680156124de5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816124f857fe5b049050809150509392505050565b6125258273ffffffffffffffffffffffffffffffffffffffff16612751565b612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106125e657805182526020820191506020810190506020830392506125c3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612648576040519150601f19603f3d011682016040523d82523d6000602084013e61264d565b606091505b5091509150816126c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561274b578080602001905160208110156126e457600080fd5b810190808051906020019092919050505061274a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806127be602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561279357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122053b598daeae8cb5287a7abf09921a29be70407f0204e7a824c66416f86ff7a1664736f6c63430006020033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063087b063214610067578063154fa089146100f057806320e469d6146101805780633fc8cef314610209578063a1d8778f14610253578063b8a6bb3b146102d5575b600080fd5b6100d36004803603606081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610365565b604051808381526020018281526020019250505060405180910390f35b61015c6004803603606081101561010657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ac565b60405180848152602001838152602001828152602001935050505060405180910390f35b6101ec6004803603606081101561019657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105f6565b604051808381526020018281526020019250505060405180910390f35b61021161073d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102bf6004803603606081101561026957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610763565b6040518082815260200191505060405180910390f35b610341600480360360608110156102eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610899565b60405180848152602001838152602001828152602001935050505060405180910390f35b6000806000809054906101000a900460ff166103e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806104118787876109e3565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f453315713d2b83893ec1df8cf529328bf25e4fe72b6c4d880edb03243e80119b8885604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b60008060008060009054906101000a900460ff16610532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080600061055c8989896110be565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd0c7e26bb5b37129e4f53759eb48fc9e0c4bafd336a94f6b87c5ce9f139183e5846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff1661067a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806106a28787876116a1565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f58fb17601901d5509bf49bedd00d55850ef2ebff3adb67a5f517b86eed08a0c88484604051808381526020018281526020019250505060405180910390a3818193509350505060016000806101000a81548160ff021916908315150217905550935093915050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900460ff166107e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061080d8585856118a1565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd75e50ef6162896bf5efc868c48b0c44d04ab08196d3e2b4c3aba5062c5ce94d836040518082815260200191505060405180910390a38091505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008060009054906101000a900460ff1661091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000806000610949898989611c3b565b9250925092508873ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f602dc153bc8f9d064b879f6bc973338b7c009689b9cacc58a250c3fb3da51808846040518082815260200191505060405180910390a382828295509550955050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008411610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610ada57600080fd5b505afa158015610aee573d6000803e3d6000fd5b505050506040513d6020811015610b0457600080fd5b81019080805190602001909291905050501015610b89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000610caf8673ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015610bd457600080fd5b505afa158015610be8573d6000803e3d6000fd5b505050506040513d6020811015610bfe57600080fd5b8101908080519060200190929190505050610ca18873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5757600080fd5b505afa158015610c6b573d6000803e3d6000fd5b505050506040513d6020811015610c8157600080fd5b81019080805190602001909291905050508861228390919063ffffffff16565b61230990919063ffffffff16565b9050808673ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf857600080fd5b505afa158015610d0c573d6000803e3d6000fd5b505050506040513d6020811015610d2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610daf57600080fd5b505afa158015610dc3573d6000803e3d6000fd5b505050506040513d6020811015610dd957600080fd5b81019080805190602001909291905050501015610e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b610f0b3387838973ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015610eaa57600080fd5b505afa158015610ebe573d6000803e3d6000fd5b505050506040513d6020811015610ed457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b610f383387878973ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008673ffffffffffffffffffffffffffffffffffffffff1663787eae30868860006040519080825280601f01601f191660200182016040528015610f8c5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611014578082015181840152602081019050610ff9565b50505050905090810190601f1680156110415780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b15801561106157600080fd5b505af1158015611075573d6000803e3d6000fd5b505050506040513d604081101561108b57600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508181935093505050935093915050565b6000806000808511611138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b428673ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561117f57600080fd5b505afa158015611193573d6000803e3d6000fd5b505050506040513d60208110156111a957600080fd5b81019080805190602001909291905050501061122d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006113538773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561127857600080fd5b505afa15801561128c573d6000803e3d6000fd5b505050506040513d60208110156112a257600080fd5b81019080805190602001909291905050506113458973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112fb57600080fd5b505afa15801561130f573d6000803e3d6000fd5b505050506040513d602081101561132557600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139c57600080fd5b505afa1580156113b0573d6000803e3d6000fd5b505050506040513d60208110156113c657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561145357600080fd5b505afa158015611467573d6000803e3d6000fd5b505050506040513d602081101561147d57600080fd5b81019080805190602001909291905050501015611502576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6115af3388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154e57600080fd5b505afa158015611562573d6000803e3d6000fd5b505050506040513d602081101561157857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561163157600080fd5b505af1158015611645573d6000803e3d6000fd5b505050506040513d606081101561165b57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000806000841161171a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6117c73386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561176657600080fd5b505afa15801561177a573d6000803e3d6000fd5b505050506040513d602081101561179057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561184857600080fd5b505af115801561185c573d6000803e3d6000fd5b505050506040513d604081101561187257600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b6000808311611918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b828473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561195f57600080fd5b505afa158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b81019080805190602001909291905050501015611ac5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611b723385858773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b1157600080fd5b505afa158015611b25573d6000803e3d6000fd5b505050506040513d6020811015611b3b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b60008473ffffffffffffffffffffffffffffffffffffffff16635e86929d846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611bf357600080fd5b505af1158015611c07573d6000803e3d6000fd5b505050506040513d6020811015611c1d57600080fd5b81019080805190602001909291905050509050809150509392505050565b6000806000808511611cb5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d3357600080fd5b505afa158015611d47573d6000803e3d6000fd5b505050506040513d6020811015611d5d57600080fd5b81019080805190602001909291905050501015611de2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611f088773ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2d57600080fd5b505afa158015611e41573d6000803e3d6000fd5b505050506040513d6020811015611e5757600080fd5b8101908080519060200190929190505050611efa8973ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d6020811015611eda57600080fd5b81019080805190602001909291905050508961228390919063ffffffff16565b61230990919063ffffffff16565b9050808773ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d6020811015611f7b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561200857600080fd5b505afa15801561201c573d6000803e3d6000fd5b505050506040513d602081101561203257600080fd5b810190808051906020019092919050505010156120b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6121643388838a73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561210357600080fd5b505afa158015612117573d6000803e3d6000fd5b505050506040513d602081101561212d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6121913388888a73ffffffffffffffffffffffffffffffffffffffff16612353909392919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff166383499805886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561221357600080fd5b505af1158015612227573d6000803e3d6000fd5b505050506040513d606081101561223d57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505080935081945082955050505082828295509550955050505093509350939050565b6000808314156122965760009050612303565b60008284029050828482816122a757fe5b04146122fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061279d6021913960400191505060405180910390fd5b809150505b92915050565b600061234b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612440565b905092915050565b61243a846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612506565b50505050565b600080831182906124ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156124b1578082015181840152602081019050612496565b50505050905090810190601f1680156124de5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816124f857fe5b049050809150509392505050565b6125258273ffffffffffffffffffffffffffffffffffffffff16612751565b612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106125e657805182526020820191506020810190506020830392506125c3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612648576040519150601f19603f3d011682016040523d82523d6000602084013e61264d565b606091505b5091509150816126c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b60008151111561274b578080602001905160208110156126e457600080fd5b810190808051906020019092919050505061274a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806127be602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561279357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122053b598daeae8cb5287a7abf09921a29be70407f0204e7a824c66416f86ff7a1664736f6c63430006020033", @@ -423,7 +423,7 @@ "storageLayout": { "storage": [ { - "astId": 9429, + "astId": 1351, "contract": "contracts/option/extensions/Trader.sol:Trader", "label": "_notEntered", "offset": 0, @@ -431,7 +431,7 @@ "type": "t_bool" }, { - "astId": 13341, + "astId": 6136, "contract": "contracts/option/extensions/Trader.sol:Trader", "label": "weth", "offset": 1, diff --git a/deployments/localhost_31337/USDC.json b/deployments/localhost_31337/USDC.json index 6b17384b..ef4a1e60 100644 --- a/deployments/localhost_31337/USDC.json +++ b/deployments/localhost_31337/USDC.json @@ -323,7 +323,7 @@ "transactionIndex": 0, "gasUsed": "1244260", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000010080000000000000000000000000000000000000000000000800000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000010000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xec62780627e1f8a369b097cc3de2d262e5fb939d9b59aee6e6ddcea0243ed3ce", + "blockHash": "0x491ae937bf001db797d5740bb6b57779a5aefd1c9581a918aebf38c8669fd54e", "transactionHash": "0xa9ab77e52076fa39f827a76d711e6f45e8e8d2640af6d24b7d1ded23930a05a9", "logs": [ { @@ -338,7 +338,7 @@ ], "data": "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000", "logIndex": 0, - "blockHash": "0xec62780627e1f8a369b097cc3de2d262e5fb939d9b59aee6e6ddcea0243ed3ce" + "blockHash": "0x491ae937bf001db797d5740bb6b57779a5aefd1c9581a918aebf38c8669fd54e" } ], "blockNumber": 9, @@ -352,7 +352,7 @@ "Stablecoin", "10000000000000000000000" ], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"details\":\"Function to mint tokens\",\"params\":{\"to\":\"The address that will receive the minted tokens.\",\"value\":\"The amount of tokens to mint.\"},\"returns\":{\"_0\":\"A boolean that indicates if the operation was successful.\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/test/tokens/USDC.sol\":\"USDC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"contracts/test/tokens/USDC.sol\":{\"keccak256\":\"0xf0de4f0b4604da9288a488ee768e19b523c52cd66186313a5274b67a6057c29b\",\"urls\":[\"bzz-raw://f690c6fd1e0680e4785832eacc7a0dc0245d042d9b8a50873feb7e1c7c92360d\",\"dweb:/ipfs/QmZpzzk5iVwBHR8wKZA5Hqk1TNKFp4m5Wx2qC2wgNDT3yt\"]}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b506040516200189938038062001899833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660018202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019080838360005b83811015620000c3578082015181840152602081019050620000a6565b50505050905090810190601f168015620000f15780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011557600080fd5b838201915060208201858111156200012c57600080fd5b82518660018202830111640100000000821117156200014a57600080fd5b8083526020830192505050908051906020019080838360005b838110156200018057808201518184015260208101905062000163565b50505050905090810190601f168015620001ae5780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919050505082828160039080519060200190620001dc9291906200049b565b508060049080519060200190620001f59291906200049b565b506012600560006101000a81548160ff021916908360ff16021790555050506200022633826200022f60201b60201c565b5050506200054a565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620002d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b620002e7600083836200040d60201b60201c565b62000303816002546200041260201b62000fb41790919060201c565b60028190555062000361816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546200041260201b62000fb41790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b60008082840190508381101562000491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004de57805160ff19168380011785556200050f565b828001600101855582156200050f579182015b828111156200050e578251825591602001919060010190620004f1565b5b5090506200051e919062000522565b5090565b6200054791905b808211156200054357600081600090555060010162000529565b5090565b90565b61133f806200055a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ead707f49c84c141b066b6af793c81a83b66f209561a87d30dffae0c79952f9364736f6c63430006020033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806340c10f191161007157806340c10f19146102d057806370a082311461033657806395d89b411461038e578063a457c2d714610411578063a9059cbb14610477578063dd62ed3e146104dd576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a257806323b872dd146101c0578063313ce56714610246578063395093511461026a575b600080fd5b6100c1610555565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105f7565b604051808215151515815260200191505060405180910390f35b6101aa610615565b6040518082815260200191505060405180910390f35b61022c600480360360608110156101d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061f565b604051808215151515815260200191505060405180910390f35b61024e6106f8565b604051808260ff1660ff16815260200191505060405180910390f35b6102b66004803603604081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070f565b604051808215151515815260200191505060405180910390f35b61031c600480360360408110156102e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c2565b604051808215151515815260200191505060405180910390f35b6103786004803603602081101561034c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107d8565b6040518082815260200191505060405180910390f35b610396610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561042757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b6104c36004803603604081101561048d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098f565b604051808215151515815260200191505060405180910390f35b61053f600480360360408110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ed5780601f106105c2576101008083540402835291602001916105ed565b820191906000526020600020905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b600061060b610604610a34565b8484610a3c565b6001905092915050565b6000600254905090565b600061062c848484610c33565b6106ed84610638610a34565b6106e88560405180606001604052806028815260200161127460289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061069e610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b600190509392505050565b6000600560009054906101000a900460ff16905090565b60006107b861071c610a34565b846107b3856001600061072d610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b610a3c565b6001905092915050565b60006107ce838361103c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b85780601f1061088d576101008083540402835291602001916108b8565b820191906000526020600020905b81548152906001019060200180831161089b57829003601f168201915b5050505050905090565b60006109856108cf610a34565b84610980856040518060600160405280602581526020016112e560259139600160006108f9610a34565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b610a3c565b6001905092915050565b60006109a361099c610a34565b8484610c33565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ac2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806112c16024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061122c6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061129c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112096023913960400191505060405180910390fd5b610d4a838383611203565b610db58160405180606001604052806026815260200161124e602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ef49092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e48816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fa1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f66578082015181840152602081019050610f4b565b50505050905090810190601f168015610f935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6110eb60008383611203565b61110081600254610fb490919063ffffffff16565b600281905550611157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb490919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ead707f49c84c141b066b6af793c81a83b66f209561a87d30dffae0c79952f9364736f6c63430006020033", @@ -409,7 +409,7 @@ "storageLayout": { "storage": [ { - "astId": 8414, + "astId": 336, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_balances", "offset": 0, @@ -417,7 +417,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 8420, + "astId": 342, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_allowances", "offset": 0, @@ -425,7 +425,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 8422, + "astId": 344, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_totalSupply", "offset": 0, @@ -433,7 +433,7 @@ "type": "t_uint256" }, { - "astId": 8424, + "astId": 346, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_name", "offset": 0, @@ -441,7 +441,7 @@ "type": "t_string_storage" }, { - "astId": 8426, + "astId": 348, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_symbol", "offset": 0, @@ -449,7 +449,7 @@ "type": "t_string_storage" }, { - "astId": 8428, + "astId": 350, "contract": "contracts/test/tokens/USDC.sol:USDC", "label": "_decimals", "offset": 0, diff --git a/deployments/localhost_31337/UniswapConnector02.json b/deployments/localhost_31337/UniswapConnector02.json new file mode 100644 index 00000000..2c0e2acd --- /dev/null +++ b/deployments/localhost_31337/UniswapConnector02.json @@ -0,0 +1,865 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "router_", + "type": "address" + }, + { + "internalType": "address", + "name": "factory_", + "type": "address" + }, + { + "internalType": "address", + "name": "trader_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "premium", + "type": "uint256" + } + ], + "name": "FlashOpened", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantityOtherTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOptionTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOtherTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLongLiquidityWithUnderlying", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantityOtherTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOtherTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addShortLiquidityWithUnderlying", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherToken", + "type": "address" + } + ], + "name": "deployUniswapMarket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pairAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "flashLoanQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "flashMintShortOptionsThenSwap", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + } + ], + "name": "getUniswapMarketForTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintLongOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintShortOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + } + ], + "name": "openFlashLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLongLiquidityThenCloseOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeShortLiquidityThenCloseOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trader", + "outputs": [ + { + "internalType": "contract ITrader", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "uniswapV2Call", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "receipt": { + "to": null, + "from": "0xc783df8a850f42e7F7e57013759C285caa701eB6", + "contractAddress": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0", + "transactionIndex": 0, + "gasUsed": "4549321", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000040000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000010000000000000000000000000000080000008000000000000000000000000000000000000000", + "blockHash": "0x2c3dc545558e05d27a6061701ca0d9670ff11018ad9d1f8391ebd5e470d08c0a", + "transactionHash": "0xedc42f06c6272e6a66b792b4856516d9eed3f54e7d62d47fadef5224c38120ba", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 13, + "transactionHash": "0xedc42f06c6272e6a66b792b4856516d9eed3f54e7d62d47fadef5224c38120ba", + "address": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0", + "topics": [ + "0x908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6", + "0x000000000000000000000000c783df8a850f42e7f7e57013759c285caa701eb6" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2c3dc545558e05d27a6061701ca0d9670ff11018ad9d1f8391ebd5e470d08c0a" + } + ], + "blockNumber": 13, + "cumulativeGasUsed": "4549321", + "status": 1, + "byzantium": true + }, + "address": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0", + "args": [ + "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", + "0xD6C850aeBFDC46D7F4c207e445cC0d6B0919BDBe" + ], + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", + "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"premium\",\"type\":\"uint256\"}],\"name\":\"FlashOpened\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityOtherTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minOptionTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minOtherTokens\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLongLiquidityWithUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityOtherTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minShortTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minOtherTokens\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addShortLiquidityWithUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherToken\",\"type\":\"address\"}],\"name\":\"deployUniswapMarket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pairAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"flashLoanQuantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"flashMintShortOptionsThenSwap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"getUniswapMarketForTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintLongOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintShortOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"}],\"name\":\"openFlashLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLongLiquidityThenCloseOptions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeShortLiquidityThenCloseOptions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router02\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trader\",\"outputs\":[{\"internalType\":\"contract ITrader\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV2Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.\",\"params\":{\"deadline\":\"The timestamp to expire a pending transaction. \\r\",\"minOptionTokens\":\"The minimum quantity of longOptionTokens expected to provide liquidity with.\",\"minOtherTokens\":\"The minimum quantity of otherTokens expected to provide liquidity with.\",\"optionAddress\":\"The address of the optionToken to mint then provide liquidity for.\",\"otherTokenAddress\":\"The address of the otherToken in the pair with the optionToken.\",\"quantityOptions\":\"The quantity of underlyingTokens to use to mint longOptionTokens.\",\"quantityOtherTokens\":\"The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.\",\"to\":\"The address that receives UNI-V2 shares.\"}},\"addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Adds redeemToken liquidity to a redeem<>token pair by minting shortOptionTokens with underlyingTokens.\",\"params\":{\"deadline\":\"The timestamp to expire a pending transaction. \\r\",\"minOtherTokens\":\"The minimum quantity of otherTokens expected to provide liquidity with.\",\"minShortTokens\":\"The minimum quantity of shortOptionTokens expected to provide liquidity with.\",\"optionAddress\":\"The address of the optionToken to get the redeemToken to mint then provide liquidity for.\",\"otherTokenAddress\":\"IMPORTANT: Should be the underlyingToken of option. Address of other reserve asset.\",\"quantityOptions\":\"The quantity of underlyingTokens to use to mint option + redeem tokens.\",\"quantityOtherTokens\":\"The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair.\",\"to\":\"The address that receives UNI-V2 shares.\"}},\"deployUniswapMarket(address,address)\":{\"details\":\"Creates a UniswapV2Pair by calling `createPair` on the UniswapV2Factory.\"},\"flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)\":{\"details\":\"Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with reserve0 = shortOptionTokens and reserve1 = underlyingTokens. Uses underlyingTokens to mint long (option) + short (redeem) tokens. Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens, AND any remainder quantity of underlyingTokens (paid by msg.sender).\",\"params\":{\"amountOutMin\":\"The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens.\",\"flashLoanQuantity\":\"The quantity of options to mint using borrowed underlyingTokens.\",\"optionAddress\":\"The address of the Option contract.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\",\"to\":\"The address to send the shortOptionToken proceeds and longOptionTokens to.\"},\"returns\":{\"_0\":\"success bool Whether the transaction was successful or not. \\r\"}},\"getName()\":{\"details\":\"Gets the name of the contract.\"},\"getUniswapMarketForTokens(address,address)\":{\"details\":\"Gets a UniswapV2Pair address for two tokens by calling the UniswapV2Factory.\"},\"getVersion()\":{\"details\":\"Gets the version of the contract.\"},\"mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. Combines Primitive \\\"mintOptions\\\" function with Uniswap V2 Router \\\"swapExactTokensForTokens\\\" function.\",\"params\":{\"amountIn\":\"The quantity of longOptionTokens to mint and then sell.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the longOptionTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Oracle-less Primitive option.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\",\"to\":\"The address to send the optionToken proceeds and redeem tokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not. \\r\"}},\"mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens.\",\"params\":{\"amountIn\":\"The quantity of options to mint.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the shortOptionTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Option contract.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\",\"to\":\"The address to send the shortOptionToken proceeds and longOptionTokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not. \\r\"}},\"openFlashLong(address,uint256,uint256)\":{\"details\":\"Opens a longOptionToken position by minting long + short tokens, then selling the short tokens.\",\"params\":{\"amountOptions\":\"The quantity of longOptionTokens to purchase.\",\"amountOutMin\":\"The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. \\r\",\"optionToken\":\"The option address.\"}},\"removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines Uniswap V2 Router \\\"removeLiquidity\\\" function with Primitive \\\"closeOptions\\\" function.\",\"params\":{\"amountAMin\":\"The minimum quantity of longOptionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of otherTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction. \\r\",\"liquidity\":\"The quantity of liquidity tokens to pull from msg.sender and burn.\",\"optionAddress\":\"The address of the option that will be closed from burned UNI-V2 liquidity shares.\",\"otherTokenAddress\":\"The address of the other token in the pair with the options.\",\"to\":\"The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options.\"}},\"removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines Uniswap V2 Router \\\"removeLiquidity\\\" function with Primitive \\\"closeOptions\\\" function.\",\"params\":{\"amountAMin\":\"The minimum quantity of shortOptionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction. \\r\",\"liquidity\":\"The quantity of liquidity tokens to pull from msg.sender and burn.\",\"optionAddress\":\"The address of the option that will be closed from burned UNI-V2 liquidity shares.\",\"otherTokenAddress\":\"The address of the other token in the option pair.\",\"to\":\"The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\"}},\"uniswapV2Call(address,uint256,uint256,bytes)\":{\"details\":\"The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data.\",\"params\":{\"amount0\":\"The quantity of token0 received to the `to` address in the swap() call.\",\"amount1\":\"The quantity of token1 received to the `to` address in the swap() call.\",\"data\":\"The payload passed in the `data` parameter of the swap() call. \\r\",\"sender\":\"The original msg.sender of the UniswapV2Pair.swap() call.\"}}}},\"userdoc\":{\"methods\":{\"addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"==== Liquidity Functions ==== \\rPulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \\\"to\\\" address. underlyingToken -> optionToken -> UNI-V2.\"},\"addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \\\"to\\\" address. underlyingToken -> redeemToken -> UNI-V2.\"},\"constructor\":\"Emmitted on flash opening a long position ==== Constructor ====\",\"deployUniswapMarket(address,address)\":{\"notice\":\"==== Management Functions ====\"},\"flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)\":{\"notice\":\"==== Flash Open Functions ==== \\rIf the first address in the path is not the shortOptionToken address, the tx will fail.\"},\"getUniswapMarketForTokens(address,address)\":{\"notice\":\"==== View ====\"},\"mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"==== Combo Operations ==== \\rIf the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken.\"},\"mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the shortOptionToken address, the tx will fail. underlyingToken -> shortOptionToken -> quoteToken. IMPORTANT: redeemTokens = shortOptionTokens\"},\"openFlashLong(address,uint256,uint256)\":{\"notice\":\"IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens. IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid.\"},\"removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. Then closes the longOptionTokens and withdraws underlyingTokens to the \\\"to\\\" address. Sends otherTokens from the burned UNI-V2 liquidity shares to the \\\"to\\\" address. UNI-V2 -> optionToken -> underlyingToken.\"},\"removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. Then closes the longOptionTokens and withdraws underlyingTokens to the \\\"to\\\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \\\"to\\\" address. UNI-V2 -> optionToken -> underlyingToken.\"},\"uniswapV2Call(address,uint256,uint256,bytes)\":{\"notice\":\"==== Callback Implementation ==== \\r\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/Uniswap/UniswapConnector02.sol\":\"UniswapConnector02\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\":{\"keccak256\":\"0xdb17a1fb73e261e736ae8862be2d9a32964fc4b3741f48980f5cdc9d92b99a96\",\"urls\":[\"bzz-raw://468dab23a95d9d9b7d6ce74008d45eef3de2f137ede604e6be6c5e7d0121c5e9\",\"dweb:/ipfs/QmcXwjTfp6tCRgf1KsNQyUAtrqKhiaN6fbaHVGr22eficP\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\":{\"keccak256\":\"0xe5905c0989cf5a865ed9bb7b9252536ca011c5b744017a82a7d4443b9c00a891\",\"urls\":[\"bzz-raw://5d2a90a0a796491507462a3da18c3f8819721d571572d765a2207c35bf0a0389\",\"dweb:/ipfs/Qmf9ACYiT3qzjgsYuhm866FBdiBpRMXAPpQhSFbgqcyhHt\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\",\"urls\":[\"bzz-raw://85d5ad2dd23ee127f40907a12865a1e8cb5828814f6f2480285e1827dd72dedf\",\"dweb:/ipfs/QmayKQWJgWmr46DqWseADyUanmqxh662hPNdAkdHRjiQQH\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\":{\"keccak256\":\"0x8a3c5c449d4b7cd76513ed6995f4b86e4a86f222c770f8442f5fc128ce29b4d2\",\"urls\":[\"bzz-raw://1df63ca373dafae3bd0ee7fe70f890a1dc7c45ed869c01de68413e0e97ff9deb\",\"dweb:/ipfs/QmefJgEYGUL8KX7kQKYTrDweF8GB7yjy3nw5Bmqzryg7PG\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\":{\"keccak256\":\"0x744e30c133bd0f7ca9e7163433cf6d72f45c6bb1508c2c9c02f1a6db796ae59d\",\"urls\":[\"bzz-raw://9bf2f4454ad63d4cff03a0630e787d9e8a9deed80aec89682cd8ad6379d9ef8c\",\"dweb:/ipfs/Qme51hQNR2wpax7ooUadhtqLtXm8ffeVVYyubLkTT4wMCG\"]},\"contracts/connectors/Uniswap/IUniswapConnector02.sol\":{\"keccak256\":\"0x486535ba8c5df9699ff0abc958394247f3e04f840297ebb80ae181e2b5117187\",\"urls\":[\"bzz-raw://7efc6596d05622cf7c4e9cc55ab81fe9001d8032e7b5df07e2074f77ee9041e3\",\"dweb:/ipfs/QmYtPNP3TJd2snBtupi2JkRVcADTCVD88x6ZAfQgc5xZEm\"]},\"contracts/connectors/Uniswap/UniswapConnector02.sol\":{\"keccak256\":\"0x825526c31c93d2525d6caad4a0bfb4996f8ef77bde82980acfde43c026a743e5\",\"urls\":[\"bzz-raw://e724d0747a161fff6f0556cb7831c7074a0085113588145dbd6f193e61d06388\",\"dweb:/ipfs/QmTWGUTfaCi5kXTEGa8CvVmQW3b387f4XGeApnkGUnQr4G\"]},\"contracts/connectors/Uniswap/UniswapConnectorLib02.sol\":{\"keccak256\":\"0xdff34e20cabb419bde960383e03f821f7f9808cb1ef64f99273620937764acc9\",\"urls\":[\"bzz-raw://b3b5c294894cf3d2c10bdff1a87311ac275a7b678b4c12046bd7ab0a7de6823c\",\"dweb:/ipfs/Qmdc2wVJ2323az7k2kmoRvbBtmVetwcHfrMgdyDVzQduhj\"]},\"contracts/connectors/WETH/IWETH.sol\":{\"keccak256\":\"0x63dce39ab69c513fb54459362900e4084a2ad2d164be2d46061afec61b956bfc\",\"urls\":[\"bzz-raw://43a214fb8eb4b26327dea29262c4e29e0f7269aec39ccb7e18bea20cfe7734da\",\"dweb:/ipfs/QmduwCTCBH4nQbXSBpJDhbLuATXLyS44yehfSvy6FTYyby\"]},\"contracts/connectors/WETH/IWethConnector01.sol\":{\"keccak256\":\"0x6905952f1f28e34ee28cac57848f7f639c60bfa03bf16432060abcc408d2b0b3\",\"urls\":[\"bzz-raw://db226bf2e4f5675b51a5beb364175267fa35ec0807b20185180a029f0078603d\",\"dweb:/ipfs/QmapJbPgSQhat4ybhs4LR6Ayb137cnv1vCB3SQSfULdaKP\"]},\"contracts/connectors/WETH/WethConnectorLib01.sol\":{\"keccak256\":\"0xc518591b3d1262e79c8fe2109eac3681fa34342ed766aa1111712d0d812e78b4\",\"urls\":[\"bzz-raw://5b0ed2377b84cdf817ff7ea1ae0a25c9f192e6bdd044ff9a9d91a7ec16d7ee37\",\"dweb:/ipfs/QmYejSYgjpi92gUEWKpSWnkW6TU5T3omW8YGHKstsd43Qe\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/ITrader.sol\":{\"keccak256\":\"0xb8f9e6d923e556e137a606c76e9adf8fd07375c7ff0650f4a7932adc950df44f\",\"urls\":[\"bzz-raw://ef82aa3d081c12e307f45334cffd8916a27c5c7db62c2b44ce9663633a8c385b\",\"dweb:/ipfs/QmQLsKZomP19HAAXKpLshhXiZhrusbf9yoZhy8tJDffVvS\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620053dc380380620053dc833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050614ffe80620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a2954fdd90c6910a5e29b837422d1dd174bb7e5ebbdbc408aa14f498f7c5932b64736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a2954fdd90c6910a5e29b837422d1dd174bb7e5ebbdbc408aa14f498f7c5932b64736f6c63430006020033", + "devdoc": { + "methods": { + "addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": { + "details": "Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.", + "params": { + "deadline": "The timestamp to expire a pending transaction. \r", + "minOptionTokens": "The minimum quantity of longOptionTokens expected to provide liquidity with.", + "minOtherTokens": "The minimum quantity of otherTokens expected to provide liquidity with.", + "optionAddress": "The address of the optionToken to mint then provide liquidity for.", + "otherTokenAddress": "The address of the otherToken in the pair with the optionToken.", + "quantityOptions": "The quantity of underlyingTokens to use to mint longOptionTokens.", + "quantityOtherTokens": "The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.", + "to": "The address that receives UNI-V2 shares." + } + }, + "addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": { + "details": "Adds redeemToken liquidity to a redeem<>token pair by minting shortOptionTokens with underlyingTokens.", + "params": { + "deadline": "The timestamp to expire a pending transaction. \r", + "minOtherTokens": "The minimum quantity of otherTokens expected to provide liquidity with.", + "minShortTokens": "The minimum quantity of shortOptionTokens expected to provide liquidity with.", + "optionAddress": "The address of the optionToken to get the redeemToken to mint then provide liquidity for.", + "otherTokenAddress": "IMPORTANT: Should be the underlyingToken of option. Address of other reserve asset.", + "quantityOptions": "The quantity of underlyingTokens to use to mint option + redeem tokens.", + "quantityOtherTokens": "The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair.", + "to": "The address that receives UNI-V2 shares." + } + }, + "deployUniswapMarket(address,address)": { + "details": "Creates a UniswapV2Pair by calling `createPair` on the UniswapV2Factory." + }, + "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)": { + "details": "Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with reserve0 = shortOptionTokens and reserve1 = underlyingTokens. Uses underlyingTokens to mint long (option) + short (redeem) tokens. Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens, AND any remainder quantity of underlyingTokens (paid by msg.sender).", + "params": { + "amountOutMin": "The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens.", + "flashLoanQuantity": "The quantity of options to mint using borrowed underlyingTokens.", + "optionAddress": "The address of the Option contract.", + "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.", + "to": "The address to send the shortOptionToken proceeds and longOptionTokens to." + }, + "returns": { + "_0": "success bool Whether the transaction was successful or not. \r" + } + }, + "getName()": { + "details": "Gets the name of the contract." + }, + "getUniswapMarketForTokens(address,address)": { + "details": "Gets a UniswapV2Pair address for two tokens by calling the UniswapV2Factory." + }, + "getVersion()": { + "details": "Gets the version of the contract." + }, + "mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "details": "Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.", + "params": { + "amountIn": "The quantity of longOptionTokens to mint and then sell.", + "amountOutMin": "The minimum quantity of tokens to receive in exchange for the longOptionTokens.", + "deadline": "The timestamp for a trade to fail at if not successful.", + "optionToken": "The address of the Oracle-less Primitive option.", + "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.", + "to": "The address to send the optionToken proceeds and redeem tokens to." + }, + "returns": { + "_0": "bool Whether the transaction was successful or not. \r" + } + }, + "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "details": "Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens.", + "params": { + "amountIn": "The quantity of options to mint.", + "amountOutMin": "The minimum quantity of tokens to receive in exchange for the shortOptionTokens.", + "deadline": "The timestamp for a trade to fail at if not successful.", + "optionToken": "The address of the Option contract.", + "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.", + "to": "The address to send the shortOptionToken proceeds and longOptionTokens to." + }, + "returns": { + "_0": "bool Whether the transaction was successful or not. \r" + } + }, + "openFlashLong(address,uint256,uint256)": { + "details": "Opens a longOptionToken position by minting long + short tokens, then selling the short tokens.", + "params": { + "amountOptions": "The quantity of longOptionTokens to purchase.", + "amountOutMin": "The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. \r", + "optionToken": "The option address." + } + }, + "removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": { + "details": "Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.", + "params": { + "amountAMin": "The minimum quantity of longOptionTokens to receive from removing liquidity.", + "amountBMin": "The minimum quantity of otherTokens to receive from removing liquidity.", + "deadline": "The timestamp to expire a pending transaction. \r", + "liquidity": "The quantity of liquidity tokens to pull from msg.sender and burn.", + "optionAddress": "The address of the option that will be closed from burned UNI-V2 liquidity shares.", + "otherTokenAddress": "The address of the other token in the pair with the options.", + "to": "The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options." + } + }, + "removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": { + "details": "Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.", + "params": { + "amountAMin": "The minimum quantity of shortOptionTokens to receive from removing liquidity.", + "amountBMin": "The minimum quantity of quoteTokens to receive from removing liquidity.", + "deadline": "The timestamp to expire a pending transaction. \r", + "liquidity": "The quantity of liquidity tokens to pull from msg.sender and burn.", + "optionAddress": "The address of the option that will be closed from burned UNI-V2 liquidity shares.", + "otherTokenAddress": "The address of the other token in the option pair.", + "to": "The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options." + } + }, + "uniswapV2Call(address,uint256,uint256,bytes)": { + "details": "The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data.", + "params": { + "amount0": "The quantity of token0 received to the `to` address in the swap() call.", + "amount1": "The quantity of token1 received to the `to` address in the swap() call.", + "data": "The payload passed in the `data` parameter of the swap() call. \r", + "sender": "The original msg.sender of the UniswapV2Pair.swap() call." + } + } + } + }, + "userdoc": { + "methods": { + "addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": { + "notice": "==== Liquidity Functions ==== \rPulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address. underlyingToken -> optionToken -> UNI-V2." + }, + "addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": { + "notice": "Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address. underlyingToken -> redeemToken -> UNI-V2." + }, + "constructor": "Emmitted on flash opening a long position ==== Constructor ====", + "deployUniswapMarket(address,address)": { + "notice": "==== Management Functions ====" + }, + "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)": { + "notice": "==== Flash Open Functions ==== \rIf the first address in the path is not the shortOptionToken address, the tx will fail." + }, + "getUniswapMarketForTokens(address,address)": { + "notice": "==== View ====" + }, + "mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "notice": "==== Combo Operations ==== \rIf the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken." + }, + "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "notice": "If the first address in the path is not the shortOptionToken address, the tx will fail. underlyingToken -> shortOptionToken -> quoteToken. IMPORTANT: redeemTokens = shortOptionTokens" + }, + "openFlashLong(address,uint256,uint256)": { + "notice": "IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens. IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid." + }, + "removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": { + "notice": "Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address. Sends otherTokens from the burned UNI-V2 liquidity shares to the \"to\" address. UNI-V2 -> optionToken -> underlyingToken." + }, + "removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": { + "notice": "Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address. UNI-V2 -> optionToken -> underlyingToken." + }, + "uniswapV2Call(address,uint256,uint256,bytes)": { + "notice": "==== Callback Implementation ==== \r" + } + } + }, + "storageLayout": { + "storage": [ + { + "astId": 1351, + "contract": "contracts/connectors/Uniswap/UniswapConnector02.sol:UniswapConnector02", + "label": "_notEntered", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 2314, + "contract": "contracts/connectors/Uniswap/UniswapConnector02.sol:UniswapConnector02", + "label": "trader", + "offset": 1, + "slot": "0", + "type": "t_contract(ITrader)6827" + }, + { + "astId": 2317, + "contract": "contracts/connectors/Uniswap/UniswapConnector02.sol:UniswapConnector02", + "label": "factory", + "offset": 0, + "slot": "1", + "type": "t_contract(IUniswapV2Factory)1454" + }, + { + "astId": 2320, + "contract": "contracts/connectors/Uniswap/UniswapConnector02.sol:UniswapConnector02", + "label": "router", + "offset": 0, + "slot": "2", + "type": "t_contract(IUniswapV2Router02)2092" + } + ], + "types": { + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ITrader)6827": { + "encoding": "inplace", + "label": "contract ITrader", + "numberOfBytes": "20" + }, + "t_contract(IUniswapV2Factory)1454": { + "encoding": "inplace", + "label": "contract IUniswapV2Factory", + "numberOfBytes": "20" + }, + "t_contract(IUniswapV2Router02)2092": { + "encoding": "inplace", + "label": "contract IUniswapV2Router02", + "numberOfBytes": "20" + } + } + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "4095600", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": "infinite", + "addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": "infinite", + "deployUniswapMarket(address,address)": "infinite", + "factory()": "1098", + "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)": "infinite", + "getName()": "infinite", + "getUniswapMarketForTokens(address,address)": "infinite", + "getVersion()": "271", + "mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": "infinite", + "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": "infinite", + "openFlashLong(address,uint256,uint256)": "infinite", + "removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": "infinite", + "removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": "infinite", + "router()": "1119", + "trader()": "1193", + "uniswapV2Call(address,uint256,uint256,bytes)": "infinite" + } + } +} \ No newline at end of file diff --git a/deployments/localhost_31337/WETH9.json b/deployments/localhost_31337/WETH9.json index cad7cbf3..7eeaab12 100644 --- a/deployments/localhost_31337/WETH9.json +++ b/deployments/localhost_31337/WETH9.json @@ -288,7 +288,7 @@ "transactionIndex": 0, "gasUsed": "822038", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2718dccfb924333270747711ddeb0823a7d6c338cc058865b84cc9d76974ba81", + "blockHash": "0x3a27a5d65519d8dca90109a01adb59bf173ffa4d53389413c75c4cb2d95e8446", "transactionHash": "0x5683b95314e826648df4758029a91920413fda9c4b7c5d2db6fb69000f16d4a8", "logs": [], "blockNumber": 10, @@ -298,7 +298,7 @@ }, "address": "0xc4905364b78a742ccce7B890A89514061E47068D", "args": [], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"contracts/test/tokens/WETH9.sol\":\"WETH9\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/test/tokens/WETH9.sol\":{\"keccak256\":\"0xe836e93e3411a8154743c003d1b6db6206715da771396b0c33a721d9460282c5\",\"urls\":[\"bzz-raw://74f9355ec14ee91917d4f9e810d23b059143fa3663da1ef65fed6e32b76e542e\",\"dweb:/ipfs/QmcWsXm2NXj7fhvYbghf1UBTr9dMTYqxmeLmDa5WaJ2S4r\"]}},\"version\":1}", "bytecode": "0x60806040526040518060400160405280600d81526020017f57726170706564204574686572000000000000000000000000000000000000008152506000908051906020019061004f9291906100ca565b506040518060400160405280600481526020017f57455448000000000000000000000000000000000000000000000000000000008152506001908051906020019061009b9291906100ca565b506012600260006101000a81548160ff021916908360ff1602179055503480156100c457600080fd5b5061016f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010b57805160ff1916838001178555610139565b82800160010185558215610139579182015b8281111561013857825182559160200191906001019061011d565b5b509050610146919061014a565b5090565b61016c91905b80821115610168576000816000905550600101610150565b5090565b90565b610cad8061017e6000396000f3fe60806040526004361061009c5760003560e01c8063313ce56711610064578063313ce5671461029d57806370a08231146102ce57806395d89b4114610333578063a9059cbb146103c3578063d0e30db014610436578063dd62ed3e146104405761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd146101a457806323b872dd146101cf5780632e1a7d4d14610262575b600080fd5b3480156100ad57600080fd5b506100b66104c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013d57600080fd5b5061018a6004803603604081101561015457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610563565b604051808215151515815260200191505060405180910390f35b3480156101b057600080fd5b506101b9610655565b6040518082815260200191505060405180910390f35b3480156101db57600080fd5b50610248600480360360608110156101f257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061065d565b604051808215151515815260200191505060405180910390f35b34801561026e57600080fd5b5061029b6004803603602081101561028557600080fd5b81019080803590602001909291905050506109a6565b005b3480156102a957600080fd5b506102b2610ad7565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102da57600080fd5b5061031d600480360360208110156102f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aea565b6040518082815260200191505060405180910390f35b34801561033f57600080fd5b50610348610b02565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561038857808201518184015260208101905061036d565b50505050905090810190601f1680156103b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103cf57600080fd5b5061041c600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba0565b604051808215151515815260200191505060405180910390f35b61043e610bb5565b005b34801561044c57600080fd5b506104af6004803603604081101561046357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c52565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055b5780601f106105305761010080835404028352916020019161055b565b820191906000526020600020905b81548152906001019060200180831161053e57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600047905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156106ab57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561078357507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b1561089c5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561081157600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109f257600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a85573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b985780601f10610b6d57610100808354040283529160200191610b98565b820191906000526020600020905b815481529060010190602001808311610b7b57829003601f168201915b505050505081565b6000610bad33848461065d565b905092915050565b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b600460205281600052604060002060205280600052604060002060009150915050548156fea2646970667358221220b1531d4fa8175ba03f5c001ae8e1a56591401c91b92bbc0e6c69d7dbd19ce87f64736f6c63430006020033", "deployedBytecode": "0x60806040526004361061009c5760003560e01c8063313ce56711610064578063313ce5671461029d57806370a08231146102ce57806395d89b4114610333578063a9059cbb146103c3578063d0e30db014610436578063dd62ed3e146104405761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd146101a457806323b872dd146101cf5780632e1a7d4d14610262575b600080fd5b3480156100ad57600080fd5b506100b66104c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013d57600080fd5b5061018a6004803603604081101561015457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610563565b604051808215151515815260200191505060405180910390f35b3480156101b057600080fd5b506101b9610655565b6040518082815260200191505060405180910390f35b3480156101db57600080fd5b50610248600480360360608110156101f257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061065d565b604051808215151515815260200191505060405180910390f35b34801561026e57600080fd5b5061029b6004803603602081101561028557600080fd5b81019080803590602001909291905050506109a6565b005b3480156102a957600080fd5b506102b2610ad7565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102da57600080fd5b5061031d600480360360208110156102f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aea565b6040518082815260200191505060405180910390f35b34801561033f57600080fd5b50610348610b02565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561038857808201518184015260208101905061036d565b50505050905090810190601f1680156103b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103cf57600080fd5b5061041c600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba0565b604051808215151515815260200191505060405180910390f35b61043e610bb5565b005b34801561044c57600080fd5b506104af6004803603604081101561046357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c52565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561055b5780601f106105305761010080835404028352916020019161055b565b820191906000526020600020905b81548152906001019060200180831161053e57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600047905090565b600081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156106ab57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561078357507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b1561089c5781600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561081157600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109f257600080fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a85573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040518082815260200191505060405180910390a250565b600260009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b985780601f10610b6d57610100808354040283529160200191610b98565b820191906000526020600020905b815481529060010190602001808311610b7b57829003601f168201915b505050505081565b6000610bad33848461065d565b905092915050565b34600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a2565b600460205281600052604060002060205280600052604060002060009150915050548156fea2646970667358221220b1531d4fa8175ba03f5c001ae8e1a56591401c91b92bbc0e6c69d7dbd19ce87f64736f6c63430006020033", @@ -311,7 +311,7 @@ "storageLayout": { "storage": [ { - "astId": 17040, + "astId": 9835, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "name", "offset": 0, @@ -319,7 +319,7 @@ "type": "t_string_storage" }, { - "astId": 17043, + "astId": 9838, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "symbol", "offset": 0, @@ -327,7 +327,7 @@ "type": "t_string_storage" }, { - "astId": 17046, + "astId": 9841, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "decimals", "offset": 0, @@ -335,7 +335,7 @@ "type": "t_uint8" }, { - "astId": 17078, + "astId": 9873, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "balanceOf", "offset": 0, @@ -343,7 +343,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 17084, + "astId": 9879, "contract": "contracts/test/tokens/WETH9.sol:WETH9", "label": "allowance", "offset": 0, diff --git a/deployments/localhost_31337/WethConnector.json b/deployments/localhost_31337/WethConnector.json index a37837b5..2082b90a 100644 --- a/deployments/localhost_31337/WethConnector.json +++ b/deployments/localhost_31337/WethConnector.json @@ -370,13 +370,13 @@ "from": "0xc783df8a850f42e7F7e57013759C285caa701eB6", "contractAddress": "0x8B5B7a6055E54a36fF574bbE40cf2eA68d5554b3", "transactionIndex": 0, - "gasUsed": "3122425", + "gasUsed": "3306403", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb0dba9241fc0f683b13961865944a40a6934db0fc654d14830d2fcfb2577418d", - "transactionHash": "0xde9fd61e65f00e00f6a08dd9d7aedcfc0d672bfab6f4a41d5e66d67f50fdcc45", + "blockHash": "0x740172f2b1a493cd5d13c40d04a28b4b528b4002d3d208dd911487dd7326272f", + "transactionHash": "0xa3d8c020d37522df10b0bf184ec86184398cce12ffa7b6b4e1ac1104f9eb9e6f", "logs": [], "blockNumber": 12, - "cumulativeGasUsed": "3122425", + "cumulativeGasUsed": "3306403", "status": 1, "byzantium": true }, @@ -384,132 +384,7 @@ "args": [ "0xc4905364b78a742ccce7B890A89514061E47068D" ], - "solcInputHash": "0xf5105176841be0fb5f0fe4a6cf0ba2762aebc0c9f542a70b8574981b5d9482d3", - "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"WethConnectorClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outUnderlyings\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inStrikes\",\"type\":\"uint256\"}],\"name\":\"WethConnectorExercise\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputOptions\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputRedeems\",\"type\":\"uint256\"}],\"name\":\"WethConnectorMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inRedeems\",\"type\":\"uint256\"}],\"name\":\"WethConnectorRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"WethConnectorUnwind\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"closeQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeCloseForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"exerciseQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExerciseForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExerciseWithETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeMintWithETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeRedeemForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"unwindQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeUnwindForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"details\":\"Since the WethConnector contract is responsible for converting between ethers and WETH, the contract is initialized with the address for WETH.\"},\"safeCloseForETH(address,uint256,address)\":{\"details\":\"Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\",\"params\":{\"closeQuantity\":\"Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address.\"}},\"safeExerciseForETH(address,uint256,address)\":{\"details\":\"Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\",\"params\":{\"exerciseQuantity\":\"Quantity of optionTokens to exercise.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address.\"}},\"safeExerciseWithETH(address,address)\":{\"details\":\"Swaps msg.value of strikeTokens (ethers) to underlyingTokens. Uses the strike ratio as the exchange rate. Strike ratio = base / quote. Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address.\"}},\"safeMintWithETH(address,address)\":{\"details\":\"Mints msg.value quantity of options and \\\"quote\\\" (option parameter) quantity of redeem tokens.\",\"params\":{\"optionToken\":\"The address of the option token to mint.\",\"receiver\":\"The address which receives the minted option and redeem tokens.\"}},\"safeRedeemForETH(address,uint256,address)\":{\"details\":\"Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The strikeTokens (ethers) are sent to the receiver address.\",\"redeemQuantity\":\"The quantity of redeemTokens to burn.\"}},\"safeUnwindForETH(address,uint256,address)\":{\"details\":\"Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. This function is for options with WETH as the underlying asset. The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address.\",\"unwindQuantity\":\"Quantity of underlyingTokens (ethers) to withdraw.\"}}}},\"userdoc\":{\"methods\":{\"safeCloseForETH(address,uint256,address)\":{\"notice\":\"This function is for options with WETH as the underlying asset. WETH underlyingTokens are converted to ethers before being sent to receiver. The redeemTokens to burn is equal to the optionTokens * strike ratio. inputOptions = inputRedeems / strike ratio = outUnderlyings\"},\"safeExerciseForETH(address,uint256,address)\":{\"notice\":\"This function is for options with WETH as the underlying asset. Burns option tokens, pulls strikeTokens, and pushes out ethers.\"},\"safeExerciseWithETH(address,address)\":{\"notice\":\"This function is for options with WETH as the strike asset. Burns option tokens, accepts ethers, and pushes out underlyingTokens.\"},\"safeMintWithETH(address,address)\":{\"notice\":\"This function is for options that have WETH as the underlying asset.\"},\"safeRedeemForETH(address,uint256,address)\":{\"notice\":\"This function is for options that have WETH as the strike asset. Converts WETH to ethers, and withdraws ethers to the receiver address.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/WETH/WethConnector.sol\":\"WethConnector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/connectors/WETH/IWETH.sol\":{\"keccak256\":\"0x63dce39ab69c513fb54459362900e4084a2ad2d164be2d46061afec61b956bfc\",\"urls\":[\"bzz-raw://43a214fb8eb4b26327dea29262c4e29e0f7269aec39ccb7e18bea20cfe7734da\",\"dweb:/ipfs/QmduwCTCBH4nQbXSBpJDhbLuATXLyS44yehfSvy6FTYyby\"]},\"contracts/connectors/WETH/IWethConnector.sol\":{\"keccak256\":\"0x59b34612bacc0cbaf89c320bd3bd3fd7111c4c173a3001a2d16ce194639dead2\",\"urls\":[\"bzz-raw://454a27a471fb727b18fdb5485baa8909ac6b7ed2f761241661f14a782779e79e\",\"dweb:/ipfs/QmRtmmum24bxuCSEs7dEtjUipEyiwpF59aiQX1hZRzdZm7\"]},\"contracts/connectors/WETH/WethConnector.sol\":{\"keccak256\":\"0x4a1d2b6c5a756a1b91725047ba54e96b1c89c1a146a84ba6f3a43840f0e084c9\",\"urls\":[\"bzz-raw://2f84bb6a6be9d61c6a4cb6c787ac39514c01b6b98e5fe058393e20a2c72fe6bf\",\"dweb:/ipfs/QmZa6BTNWTkM9jbTvt8ggsDdzqvNABFo6ZkESgifgSn7GF\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516138073803806138078339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613758806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061258d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612955565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a6130a2565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000349050600061221c8873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214057600080fd5b505afa158015612154573d6000803e3d6000fd5b505050506040513d602081101561216a57600080fd5b810190808051906020019092919050505061220e8a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c457600080fd5b505afa1580156121d8573d6000803e3d6000fd5b505050506040513d60208110156121ee57600080fd5b810190808051906020019092919050505085612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561229c57600080fd5b505afa1580156122b0573d6000803e3d6000fd5b505050506040513d60208110156122c657600080fd5b8101908080519060200190929190505050101561234b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b61235488613210565b6123813389838b73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f1916602001820160405280156123d35781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561245b578082015181840152602081019050612440565b50505050905090810190601f1680156124885780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b505050506040513d60408110156124d257600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555034600081116126a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d602081101561271457600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6127f386613210565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561287457600080fd5b505af1158015612888573d6000803e3d6000fd5b505050506040513d604081101561289e57600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff166129d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612a69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612ab157600080fd5b505afa158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bf957600080fd5b505afa158015612c0d573d6000803e3d6000fd5b505050506040513d6020811015612c2357600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612cb457600080fd5b505afa158015612cc8573d6000803e3d6000fd5b505050506040513d6020811015612cde57600080fd5b81019080805190602001909291905050501015612d63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612d903388888473ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e1157600080fd5b505af1158015612e25573d6000803e3d6000fd5b505050506040513d6020811015612e3b57600080fd5b81019080805190602001909291905050509050612e5886886130a2565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612ef85760009050612f65565b6000828402905082848281612f0957fe5b0414612f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136d86021913960400191505060405180910390fd5b809150505b92915050565b6000612fad83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061337b565b905092915050565b61309c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613441565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561311757600080fd5b505af115801561312b573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461318f576040519150601f19603f3d011682016040523d82523d6000602084013e613194565b606091505b505090508061320b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327a57600080fd5b505af115801561328e573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561333c57600080fd5b505af1158015613350573d6000803e3d6000fd5b505050506040513d602081101561336657600080fd5b81019080805190602001909291905050505050565b60008083118290613427576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156133ec5780820151818401526020810190506133d1565b50505050905090810190601f1680156134195780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161343357fe5b049050809150509392505050565b6134608273ffffffffffffffffffffffffffffffffffffffff1661368c565b6134d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061352157805182526020820191506020810190506020830392506134fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613583576040519150601f19603f3d011682016040523d82523d6000602084013e613588565b606091505b509150915081613600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156136865780806020019051602081101561361f57600080fd5b8101908080519060200190929190505050613685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806136f9602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156136ce57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208f18a6eb2c0fe7d22b220449e16d113334c7e5a71c03a53b229bdab03bf0416564736f6c63430006020033", - "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d69565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e94565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061258d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612955565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561061057600080fd5b505afa158015610624573d6000803e3d6000fd5b505050506040513d602081101561063a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561078e57600080fd5b505afa1580156107a2573d6000803e3d6000fd5b505050506040513d60208110156107b857600080fd5b8101908080519060200190929190505050101561083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006109638973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561088857600080fd5b505afa15801561089c573d6000803e3d6000fd5b505050506040513d60208110156108b257600080fd5b81019080805190602001909291905050506109558b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ac57600080fd5b505afa1580156109c0573d6000803e3d6000fd5b505050506040513d60208110156109d657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a6357600080fd5b505afa158015610a77573d6000803e3d6000fd5b505050506040513d6020811015610a8d57600080fd5b81019080805190602001909291905050501015610b12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b610bbf338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b610bec338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6060811015610c9857600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050610cd3898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508460008111610e80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d602081101561103957600080fd5b8101908080519060200190929190505050106110bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b60006111e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b81019080805190602001909291905050506111d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561118b57600080fd5b505afa15801561119f573d6000803e3d6000fd5b505050506040513d60208110156111b557600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122c57600080fd5b505afa158015611240573d6000803e3d6000fd5b505050506040513d602081101561125657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d602081101561130d57600080fd5b81019080805190602001909291905050501015611392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61143f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d602081101561140857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156114c157600080fd5b505af11580156114d5573d6000803e3d6000fd5b505050506040513d60608110156114eb57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611526898b6130a2565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a3828282975097509750505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555083600081116116d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561171957600080fd5b505afa15801561172d573d6000803e3d6000fd5b505050506040513d602081101561174357600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b810190808051906020019092919050505010156119cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b6000611af18973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1657600080fd5b505afa158015611a2a573d6000803e3d6000fd5b505050506040513d6020811015611a4057600080fd5b8101908080519060200190929190505050611ae38b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d6020811015611ac357600080fd5b81019080805190602001909291905050508b612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b81019080805190602001909291905050501015611c20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b611c4d338a838573ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b611c7a338a8a8c73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f191660200182016040528015611cce5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d56578082015181840152602081019050611d3b565b50505050905090810190601f168015611d835780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b505050506040513d6040811015611dcd57600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050611dfa888a6130a2565b8973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8b85604051808381526020018281526020019250505060405180910390a3818196509650505050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16611f18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111611fa9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff157600080fd5b505afa158015612005573d6000803e3d6000fd5b505050506040513d602081101561201b57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146120f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000349050600061221c8873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214057600080fd5b505afa158015612154573d6000803e3d6000fd5b505050506040513d602081101561216a57600080fd5b810190808051906020019092919050505061220e8a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c457600080fd5b505afa1580156121d8573d6000803e3d6000fd5b505050506040513d60208110156121ee57600080fd5b810190808051906020019092919050505085612ee590919063ffffffff16565b612f6b90919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561229c57600080fd5b505afa1580156122b0573d6000803e3d6000fd5b505050506040513d60208110156122c657600080fd5b8101908080519060200190929190505050101561234b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b61235488613210565b6123813389838b73ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f1916602001820160405280156123d35781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561245b578082015181840152602081019050612440565b50505050905090810190601f1680156124885780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b505050506040513d60408110156124d257600080fd5b81019080805190602001909291908051906020019092919050505080925081935050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16612611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555034600081116126a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ea57600080fd5b505afa1580156126fe573d6000803e3d6000fd5b505050506040513d602081101561271457600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146127ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b6127f386613210565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561287457600080fd5b505af1158015612888573d6000803e3d6000fd5b505050506040513d604081101561289e57600080fd5b810190808051906020019092919080519060200190929190505050915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a38181955095505050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff166129d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111612a69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612ab157600080fd5b505afa158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b81019080805190602001909291905050509050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612bb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bf957600080fd5b505afa158015612c0d573d6000803e3d6000fd5b505050506040513d6020811015612c2357600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612cb457600080fd5b505afa158015612cc8573d6000803e3d6000fd5b505050506040513d6020811015612cde57600080fd5b81019080805190602001909291905050501015612d63576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b612d903388888473ffffffffffffffffffffffffffffffffffffffff16612fb5909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612e1157600080fd5b505af1158015612e25573d6000803e3d6000fd5b505050506040513d6020811015612e3b57600080fd5b81019080805190602001909291905050509050612e5886886130a2565b8773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a38094505050505060016000806101000a81548160ff0219169083151502179055509392505050565b600080831415612ef85760009050612f65565b6000828402905082848281612f0957fe5b0414612f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136d86021913960400191505060405180910390fd5b809150505b92915050565b6000612fad83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061337b565b905092915050565b61309c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613441565b50505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561311757600080fd5b505af115801561312b573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d806000811461318f576040519150601f19603f3d011682016040523d82523d6000602084013e613194565b606091505b505090508061320b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561327a57600080fd5b505af115801561328e573d6000803e3d6000fd5b5050505050600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561333c57600080fd5b505af1158015613350573d6000803e3d6000fd5b505050506040513d602081101561336657600080fd5b81019080805190602001909291905050505050565b60008083118290613427576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156133ec5780820151818401526020810190506133d1565b50505050905090810190601f1680156134195780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161343357fe5b049050809150509392505050565b6134608273ffffffffffffffffffffffffffffffffffffffff1661368c565b6134d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061352157805182526020820191506020810190506020830392506134fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613583576040519150601f19603f3d011682016040523d82523d6000602084013e613588565b606091505b509150915081613600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156136865780806020019051602081101561361f57600080fd5b8101908080519060200190929190505050613685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806136f9602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156136ce57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208f18a6eb2c0fe7d22b220449e16d113334c7e5a71c03a53b229bdab03bf0416564736f6c63430006020033", - "devdoc": { - "methods": { - "constructor": { - "details": "Since the WethConnector contract is responsible for converting between ethers and WETH, the contract is initialized with the address for WETH." - }, - "safeCloseForETH(address,uint256,address)": { - "details": "Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).", - "params": { - "closeQuantity": "Quantity of optionTokens to burn and an input to calculate how many redeems to burn.", - "optionToken": "The address of the option contract.", - "receiver": "The underlyingTokens (ethers) are sent to the receiver address." - } - }, - "safeExerciseForETH(address,uint256,address)": { - "details": "Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. Uses the strike ratio as the exchange rate. Strike ratio = base / quote.", - "params": { - "exerciseQuantity": "Quantity of optionTokens to exercise.", - "optionToken": "The address of the option contract.", - "receiver": "The underlyingTokens (ethers) are sent to the receiver address." - } - }, - "safeExerciseWithETH(address,address)": { - "details": "Swaps msg.value of strikeTokens (ethers) to underlyingTokens. Uses the strike ratio as the exchange rate. Strike ratio = base / quote. Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.", - "params": { - "optionToken": "The address of the option contract.", - "receiver": "The underlyingTokens are sent to the receiver address." - } - }, - "safeMintWithETH(address,address)": { - "details": "Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.", - "params": { - "optionToken": "The address of the option token to mint.", - "receiver": "The address which receives the minted option and redeem tokens." - } - }, - "safeRedeemForETH(address,uint256,address)": { - "details": "Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.", - "params": { - "optionToken": "The address of the option contract.", - "receiver": "The strikeTokens (ethers) are sent to the receiver address.", - "redeemQuantity": "The quantity of redeemTokens to burn." - } - }, - "safeUnwindForETH(address,uint256,address)": { - "details": "Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. This function is for options with WETH as the underlying asset. The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.", - "params": { - "optionToken": "The address of the option contract.", - "receiver": "The underlyingTokens (ethers) are sent to the receiver address.", - "unwindQuantity": "Quantity of underlyingTokens (ethers) to withdraw." - } - } - } - }, - "userdoc": { - "methods": { - "safeCloseForETH(address,uint256,address)": { - "notice": "This function is for options with WETH as the underlying asset. WETH underlyingTokens are converted to ethers before being sent to receiver. The redeemTokens to burn is equal to the optionTokens * strike ratio. inputOptions = inputRedeems / strike ratio = outUnderlyings" - }, - "safeExerciseForETH(address,uint256,address)": { - "notice": "This function is for options with WETH as the underlying asset. Burns option tokens, pulls strikeTokens, and pushes out ethers." - }, - "safeExerciseWithETH(address,address)": { - "notice": "This function is for options with WETH as the strike asset. Burns option tokens, accepts ethers, and pushes out underlyingTokens." - }, - "safeMintWithETH(address,address)": { - "notice": "This function is for options that have WETH as the underlying asset." - }, - "safeRedeemForETH(address,uint256,address)": { - "notice": "This function is for options that have WETH as the strike asset. Converts WETH to ethers, and withdraws ethers to the receiver address." - } - } - }, - "storageLayout": { - "storage": [ - { - "astId": 9429, - "contract": "contracts/connectors/WETH/WethConnector.sol:WethConnector", - "label": "_notEntered", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 11653, - "contract": "contracts/connectors/WETH/WethConnector.sol:WethConnector", - "label": "weth", - "offset": 1, - "slot": "0", - "type": "t_contract(IWETH)11542" - } - ], - "types": { - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(IWETH)11542": { - "encoding": "inplace", - "label": "contract IWETH", - "numberOfBytes": "20" - } - } - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "2833600", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "safeCloseForETH(address,uint256,address)": "infinite", - "safeExerciseForETH(address,uint256,address)": "infinite", - "safeExerciseWithETH(address,address)": "infinite", - "safeMintWithETH(address,address)": "infinite", - "safeRedeemForETH(address,uint256,address)": "infinite", - "safeUnwindForETH(address,uint256,address)": "infinite", - "weth()": "1104" - }, - "internal": { - "_depositEthSendWeth(address)": "infinite", - "_withdrawEthAndSend(address,uint256)": "infinite" - } - } + "solcInputHash": "0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e", + "bytecode": "0x608060405234801561001057600080fd5b50604051613b6c380380613b6c8339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613abd806100af6000396000f3fe6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220259e3277b08f511aa2a9f8d3b4122cfb930908c4bb8de36b22ee6df93d482d3d64736f6c63430006020033", + "deployedBytecode": "0x6080604052600436106100745760003560e01c80636db8ce241161004e5780636db8ce241461026857806380e42f8e146102fe5780638549780b1461037d578063c9c9163e146103fc576100d2565b80633fc8cef3146100d757806350e2f0ba1461012e5780636ba17e7a146101cb576100d2565b366100d257600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100d057fe5b005b600080fd5b3480156100e357600080fd5b506100ec61048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013a57600080fd5b506101a76004803603606081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b1565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101d757600080fd5b50610244600480360360608110156101ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610696565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561027457600080fd5b506102e16004803603606081101561028b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087b565b604051808381526020018281526020019250505060405180910390f35b6103606004803603604081101561031457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a5d565b604051808381526020018281526020019250505060405180910390f35b6103df6004803603604081101561039357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3d565b604051808381526020018281526020019250505060405180910390f35b34801561040857600080fd5b506104756004803603606081101561041f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1d565b6040518082815260200191505060405180910390f35b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006105fb600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b610fee565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff1661071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116107ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006107e0600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61176c565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff166108ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610990576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806109c1600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611e85565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610ae1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610b72576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ba2600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16888861261b565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610cc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610d52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610d82600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612bd2565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610ea0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508260008111610f31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000610f61600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612e58565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b6000806000846000811161106a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561120e57600080fd5b505afa158015611222573d6000803e3d6000fd5b505050506040513d602081101561123857600080fd5b810190808051906020019092919050505010156112bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006113e38973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b81019080805190602001909291905050506113d58b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d60208110156113b557600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142c57600080fd5b505afa158015611440573d6000803e3d6000fd5b505050506040513d602081101561145657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114e357600080fd5b505afa1580156114f7573d6000803e3d6000fd5b505050506040513d602081101561150d57600080fd5b81019080805190602001909291905050501015611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61163f338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d602081101561160857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b61166c338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d606081101561171857600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506117548c8a8c61346b565b82828297509750975050505050509450945094915050565b600080600084600081116117e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d602081101561185a57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161461190e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b15801561195557600080fd5b505afa158015611969573d6000803e3d6000fd5b505050506040513d602081101561197f57600080fd5b810190808051906020019092919050505010611a03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611b298973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6020811015611a7857600080fd5b8101908080519060200190929190505050611b1b8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ad157600080fd5b505afa158015611ae5573d6000803e3d6000fd5b505050506040513d6020811015611afb57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7257600080fd5b505afa158015611b86573d6000803e3d6000fd5b505050506040513d6020811015611b9c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b81019080805190602001909291905050501015611cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611d85338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d2457600080fd5b505afa158015611d38573d6000803e3d6000fd5b505050506040513d6020811015611d4e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d6060811015611e3157600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611e6d8c8a8c61346b565b82828297509750975050505050509450945094915050565b6000808360008111611eff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015611fcc57600080fd5b505afa158015611fe0573d6000803e3d6000fd5b505050506040513d6020811015611ff657600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146120aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561212857600080fd5b505afa15801561213c573d6000803e3d6000fd5b505050506040513d602081101561215257600080fd5b810190808051906020019092919050505010156121d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006122fd8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561222257600080fd5b505afa158015612236573d6000803e3d6000fd5b505050506040513d602081101561224c57600080fd5b81019080805190602001909291905050506122ef8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b505050506040513d60208110156122cf57600080fd5b81019080805190602001909291905050508b6132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561237d57600080fd5b505afa158015612391573d6000803e3d6000fd5b505050506040513d60208110156123a757600080fd5b8101908080519060200190929190505050101561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612459338a838573ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b612486338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156124da5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612562578082015181840152602081019050612547565b50505050905090810190601f16801561258f5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156125af57600080fd5b505af11580156125c3573d6000803e3d6000fd5b505050506040513d60408110156125d957600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506126078b898b61346b565b818196509650505050505094509492505050565b6000803460008111612695576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156126dd57600080fd5b505afa1580156126f1573d6000803e3d6000fd5b505050506040513d602081101561270757600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146127bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b600034905060006128e68873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280a57600080fd5b505afa15801561281e573d6000803e3d6000fd5b505050506040513d602081101561283457600080fd5b81019080805190602001909291905050506128d88a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561288e57600080fd5b505afa1580156128a2573d6000803e3d6000fd5b505050506040513d60208110156128b857600080fd5b8101908080519060200190929190505050856132ae90919063ffffffff16565b61333490919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b81019080805190602001909291905050501015612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612a1f89896135b8565b612a4c3389838b73ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612a9e5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b26578082015181840152602081019050612b0b565b50505050905090810190601f168015612b535780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b505050506040513d6040811015612b9d57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612c4c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9457600080fd5b505afa158015612ca8573d6000803e3d6000fd5b505050506040513d6020811015612cbe57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612d7c87876135b8565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612dfd57600080fd5b505af1158015612e11573d6000803e3d6000fd5b505050506040513d6040811015612e2757600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612ed1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1957600080fd5b505afa158015612f2d573d6000803e3d6000fd5b505050506040513d6020811015612f4357600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303f57600080fd5b505afa158015613053573d6000803e3d6000fd5b505050506040513d602081101561306957600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156130fa57600080fd5b505afa15801561310e573d6000803e3d6000fd5b505050506040513d602081101561312457600080fd5b810190808051906020019092919050505010156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6131d63388888473ffffffffffffffffffffffffffffffffffffffff1661337e909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561325757600080fd5b505af115801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b8101908080519060200190929190505050905061329f89878961346b565b80945050505050949350505050565b6000808314156132c1576000905061332e565b60008284029050828482816132d257fe5b0414613329576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613a3d6021913960400191505060405180910390fd5b809150505b92915050565b600061337683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506136e0565b905092915050565b613465846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506137a6565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156134be57600080fd5b505af11580156134d2573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613536576040519150601f19603f3d011682016040523d82523d6000602084013e61353b565b606091505b50509050806135b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561360057600080fd5b505af1158015613614573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156136a057600080fd5b505af11580156136b4573d6000803e3d6000fd5b505050506040513d60208110156136ca57600080fd5b8101908080519060200190929190505050505050565b6000808311829061378c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613751578082015181840152602081019050613736565b50505050905090810190601f16801561377e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161379857fe5b049050809150509392505050565b6137c58273ffffffffffffffffffffffffffffffffffffffff166139f1565b613837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106138865780518252602082019150602081019050602083039250613863565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138e8576040519150601f19603f3d011682016040523d82523d6000602084013e6138ed565b606091505b509150915081613965576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156139eb5780806020019051602081101561398457600080fd5b81019080805190602001909291905050506139ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613a5e602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613a3357506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220259e3277b08f511aa2a9f8d3b4122cfb930908c4bb8de36b22ee6df93d482d3d64736f6c63430006020033" } \ No newline at end of file diff --git a/deployments/localhost_31337/solcInputs/0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e.json b/deployments/localhost_31337/solcInputs/0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e.json new file mode 100644 index 00000000..a577b4e2 --- /dev/null +++ b/deployments/localhost_31337/solcInputs/0x4f3bc87dc4c0c696cc9dfe9a5d0fdd4ce7a7e622875001d187fa1bd5aee80a9e.json @@ -0,0 +1,174 @@ +{ + "language": "Solidity", + "sources": { + "contracts/connectors/Uniswap/IUniswapConnector02.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\nimport {\r\n IUniswapV2Router02\r\n} from \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\r\nimport {\r\n IUniswapV2Factory\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\r\nimport { ITrader } from \"../../option/interfaces/ITrader.sol\";\r\nimport { IOption, IERC20 } from \"../../option/interfaces/IOption.sol\";\r\n\r\ninterface IUniswapConnector02 {\r\n /// ==== Combo Operations ====\r\n\r\n function mintLongOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool);\r\n\r\n function mintShortOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool);\r\n\r\n /// ==== Flash Open Functions ====\r\n\r\n function openFlashLong(\r\n IOption optionToken,\r\n uint256 amountOptions,\r\n uint256 amountOutMin\r\n ) external returns (bool);\r\n\r\n /// ==== Liquidity Functions ====\r\n\r\n function addLongLiquidityWithUnderlying(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minOptionTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool);\r\n\r\n function addShortLiquidityWithUnderlying(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minShortTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool);\r\n\r\n function removeLongLiquidityThenCloseOptions(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external returns (uint256, uint256);\r\n\r\n function removeShortLiquidityThenCloseOptions(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external returns (uint256, uint256);\r\n\r\n /// ==== Management Functions ====\r\n\r\n function deployUniswapMarket(address optionAddress, address otherToken)\r\n external\r\n returns (address);\r\n\r\n /// ==== View ====\r\n\r\n function getUniswapMarketForTokens(address token0, address token1)\r\n external\r\n view\r\n returns (address);\r\n\r\n function router() external view returns (IUniswapV2Router02);\r\n\r\n function factory() external view returns (IUniswapV2Factory);\r\n\r\n function trader() external view returns (ITrader);\r\n\r\n function getName() external pure returns (string memory);\r\n\r\n function getVersion() external pure returns (uint8);\r\n}\r\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": { + "content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": { + "content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n" + }, + "contracts/option/interfaces/ITrader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IOption } from \"./IOption.sol\";\r\n\r\ninterface ITrader {\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "contracts/option/interfaces/IOption.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IOption is IERC20 {\r\n function mintOptions(address receiver) external returns (uint256, uint256);\r\n\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external returns (uint256, uint256);\r\n\r\n function redeemStrikeTokens(address receiver) external returns (uint256);\r\n\r\n function closeOptions(address receiver)\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function redeemToken() external view returns (address);\r\n\r\n function getStrikeTokenAddress() external view returns (address);\r\n\r\n function getUnderlyingTokenAddress() external view returns (address);\r\n\r\n function getBaseValue() external view returns (uint256);\r\n\r\n function getQuoteValue() external view returns (uint256);\r\n\r\n function getExpiryTime() external view returns (uint256);\r\n\r\n function underlyingCache() external view returns (uint256);\r\n\r\n function strikeCache() external view returns (uint256);\r\n\r\n function factory() external view returns (address);\r\n\r\n function getCacheBalances() external view returns (uint256, uint256);\r\n\r\n function getAssetAddresses()\r\n external\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n );\r\n\r\n function getParameters()\r\n external\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n );\r\n\r\n function initRedeemToken(address _redeemToken) external;\r\n\r\n function updateCacheBalances() external;\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../../GSN/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20MinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/GSN/Context.sol": { + "content": "pragma solidity ^0.6.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "pragma solidity ^0.6.2;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/connectors/Uniswap/UniswapConnector02.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\n///\r\n/// @title Combines Uniswap V2 Protocol functions with Primitive V1.\r\n/// @notice Primitive V1 UniswapConnector02 - @primitivefi/contracts@v0.4.1\r\n/// @author Primitive\r\n///\r\n\r\n/// Uniswap V2 & Primitive V1\r\nimport {\r\n IUniswapV2Callee\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\";\r\nimport {\r\n IUniswapV2Pair\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\";\r\nimport {\r\n IUniswapConnector02,\r\n IUniswapV2Router02,\r\n IUniswapV2Factory,\r\n IOption,\r\n ITrader,\r\n IERC20\r\n} from \"./IUniswapConnector02.sol\";\r\nimport { UniswapConnectorLib02 } from \"./UniswapConnectorLib02.sol\";\r\n/// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract UniswapConnector02 is\r\n IUniswapConnector02,\r\n IUniswapV2Callee,\r\n ReentrancyGuard\r\n{\r\n using SafeERC20 for IERC20; /// Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data\r\n using SafeMath for uint256; /// Reverts on math underflows/overflows\r\n\r\n ITrader public override trader; /// The Primitive contract used to interact with the protocol\r\n IUniswapV2Factory public override factory; /// The Uniswap V2 factory contract to get pair addresses from\r\n IUniswapV2Router02 public override router; /// The Uniswap contract used to interact with the protocol\r\n\r\n event Initialized(address indexed from); /// Emmitted on deployment\r\n event FlashOpened(address indexed from, uint256 quantity, uint256 premium); /// Emmitted on flash opening a long position\r\n\r\n /// ==== Constructor ====\r\n\r\n constructor(\r\n address router_,\r\n address factory_,\r\n address trader_\r\n ) public {\r\n require(address(router) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(factory) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(trader) == address(0x0), \"ERR_INITIALIZED\");\r\n router = IUniswapV2Router02(router_);\r\n factory = IUniswapV2Factory(factory_);\r\n trader = ITrader(trader_);\r\n emit Initialized(msg.sender);\r\n }\r\n\r\n /// ==== Combo Operations ====\r\n\r\n ///\r\n /// @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens.\r\n /// Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.\r\n /// @notice If the first address in the path is not the optionToken address, the tx will fail.\r\n /// underlyingToken -> optionToken -> quoteToken.\r\n /// @param optionToken The address of the Oracle-less Primitive option.\r\n /// @param amountIn The quantity of longOptionTokens to mint and then sell.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n /// @param to The address to send the optionToken proceeds and redeem tokens to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n /// @return bool Whether the transaction was successful or not.\r\n ///\r\n function mintLongOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external override returns (bool) {\r\n bool success = UniswapConnectorLib02.mintLongOptionsThenSwapToTokens(\r\n router,\r\n optionToken,\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n return success;\r\n }\r\n\r\n ///\r\n /// @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens.\r\n /// @notice If the first address in the path is not the shortOptionToken address, the tx will fail.\r\n /// underlyingToken -> shortOptionToken -> quoteToken.\r\n /// IMPORTANT: redeemTokens = shortOptionTokens\r\n /// @param optionToken The address of the Option contract.\r\n /// @param amountIn The quantity of options to mint.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\r\n /// @param to The address to send the shortOptionToken proceeds and longOptionTokens to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n /// @return bool Whether the transaction was successful or not.\r\n ///\r\n function mintShortOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external override returns (bool) {\r\n bool success = UniswapConnectorLib02.mintShortOptionsThenSwapToTokens(\r\n router,\r\n optionToken,\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n return success;\r\n }\r\n\r\n /// ==== Flash Open Functions ====\r\n\r\n ///\r\n /// @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with\r\n /// reserve0 = shortOptionTokens and reserve1 = underlyingTokens.\r\n /// Uses underlyingTokens to mint long (option) + short (redeem) tokens.\r\n /// Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens,\r\n /// AND any remainder quantity of underlyingTokens (paid by msg.sender).\r\n /// @notice If the first address in the path is not the shortOptionToken address, the tx will fail.\r\n /// @param optionAddress The address of the Option contract.\r\n /// @param flashLoanQuantity The quantity of options to mint using borrowed underlyingTokens.\r\n /// @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\r\n /// @param to The address to send the shortOptionToken proceeds and longOptionTokens to.\r\n /// @return success bool Whether the transaction was successful or not.\r\n ///\r\n function flashMintShortOptionsThenSwap(\r\n address pairAddress,\r\n address optionAddress,\r\n uint256 flashLoanQuantity,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to\r\n ) public returns (bool) {\r\n require(msg.sender == address(this), \"ERR_NOT_SELF\");\r\n require(flashLoanQuantity > 0, \"ERR_ZERO\");\r\n /// IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens.\r\n /// We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens\r\n /// and any remainder of underlyingToken.\r\n\r\n address underlyingToken = IOption(optionAddress)\r\n .getUnderlyingTokenAddress();\r\n require(path[1] == underlyingToken, \"ERR_END_PATH_NOT_UNDERLYING\");\r\n\r\n /// Mint longOptionTokens using the underlyingTokens received from UniswapV2 flash swap to this contract.\r\n /// Send underlyingTokens from this contract to the optionToken contract, then call mintOptions.\r\n IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity);\r\n (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress)\r\n .mintOptions(address(this));\r\n\r\n /// Need to return tokens from the flash swap by returning shortOptionTokens and any remainder of underlyingTokens.\r\n {\r\n address underlyingToken_ = underlyingToken;\r\n /// Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of shortOptionTokens.\r\n uint256[] memory amounts = router.getAmountsOut(\r\n outputRedeems,\r\n path\r\n );\r\n\r\n /// The remainder is the flash loan amount - amount paid for from shortOptionTokens.\r\n uint256 remainder; /// underlyingTokens borrowed - underlyingTokens paid back by returning shortOptionTokens.\r\n {\r\n uint256 quantity = flashLoanQuantity; /// quantity of underlying tokens borrowed\r\n uint256 paid = amounts[1]; /// quantity of underlyingTokens paid by shortOptionTokens\r\n /// consider the swap fee\r\n remainder = quantity\r\n .mul(1000)\r\n .add(quantity.mul(3))\r\n .div(1000)\r\n .sub(paid);\r\n }\r\n\r\n /// Pay back the pair in shortOptionTokens\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n pairAddress,\r\n outputRedeems\r\n );\r\n\r\n /// Pull underlyingTokens from the original msg.sender to pay the remainder of the flash swap.\r\n IERC20(underlyingToken_).safeTransferFrom(\r\n to,\r\n pairAddress,\r\n remainder\r\n );\r\n emit FlashOpened(msg.sender, outputOptions, remainder);\r\n }\r\n\r\n /// Send longOptionTokens (option) to the original msg.sender.\r\n IERC20(optionAddress).safeTransfer(to, outputOptions);\r\n return true;\r\n }\r\n\r\n ///\r\n /// @dev Opens a longOptionToken position by minting long + short tokens, then selling the short tokens.\r\n /// @notice IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens.\r\n /// IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid.\r\n /// @param optionToken The option address.\r\n /// @param amountOptions The quantity of longOptionTokens to purchase.\r\n /// @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens.\r\n ///\r\n function openFlashLong(\r\n IOption optionToken,\r\n uint256 amountOptions,\r\n uint256 amountOutMin\r\n ) external override nonReentrant returns (bool) {\r\n address redeemToken = optionToken.redeemToken();\r\n address underlyingToken = optionToken.getUnderlyingTokenAddress();\r\n address pairAddress = factory.getPair(redeemToken, underlyingToken);\r\n\r\n /// Build the path to get the appropriate reserves to borrow from, and then pay back.\r\n /// We are borrowing from reserve1 then paying it back mostly in reserve0.\r\n /// Borrowing underlyingTokens, paying back in shortOptionTokens (normal swap). Pay any remainder in underlyingTokens.\r\n address[] memory path = new address[](2);\r\n path[0] = redeemToken;\r\n path[1] = underlyingToken;\r\n IUniswapV2Pair pair = IUniswapV2Pair(pairAddress);\r\n\r\n bytes4 selector = bytes4(\r\n keccak256(\r\n bytes(\r\n \"flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)\"\r\n )\r\n )\r\n );\r\n bytes memory params = abi.encodeWithSelector(\r\n selector, /// function to call in this contract\r\n pairAddress, /// pair contract we are borrowing from\r\n optionToken, /// option token to mint with flash loaned tokens\r\n amountOptions, /// quantity of underlyingTokens from flash loan to use to mint options\r\n amountOutMin, /// total price paid (in underlyingTokens) for selling shortOptionTokens\r\n path, /// redeemToken -> underlyingToken\r\n msg.sender /// address to pull the remainder loan amount to pay, and send longOptionTokens to.\r\n );\r\n\r\n /// Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address.\r\n /// Then executes `flashMintShortOptionsThenSwap`.\r\n uint256 amount0Out = pair.token0() == underlyingToken\r\n ? amountOptions\r\n : 0;\r\n uint256 amount1Out = pair.token0() == underlyingToken\r\n ? 0\r\n : amountOptions;\r\n\r\n /// Borrow the amountOptions quantity of underlyingTokens and execute the callback function using params.\r\n pair.swap(amount0Out, amount1Out, address(this), params);\r\n return true;\r\n }\r\n\r\n /// ==== Liquidity Functions ====\r\n\r\n ///\r\n /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> optionToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken.\r\n /// @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.\r\n /// @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addLongLiquidityWithUnderlying(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minOptionTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (bool) {\r\n bool success = UniswapConnectorLib02.addLongLiquidityWithUnderlying(\r\n router,\r\n optionAddress,\r\n otherTokenAddress,\r\n quantityOptions,\r\n quantityOtherTokens,\r\n minOptionTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n return success;\r\n }\r\n\r\n ///\r\n /// @dev Adds redeemToken liquidity to a redeem<>token pair by minting shortOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> redeemToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress IMPORTANT: Should be the underlyingToken of option. Address of other reserve asset.\r\n /// @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair.\r\n /// @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addShortLiquidityWithUnderlying(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minShortTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (bool) {\r\n bool success = UniswapConnectorLib02.addShortLiquidityWithUnderlying(\r\n router,\r\n optionAddress,\r\n otherTokenAddress,\r\n quantityOptions,\r\n quantityOtherTokens,\r\n minShortTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n return success;\r\n }\r\n\r\n ///\r\n /// @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n /// @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender.\r\n /// Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address.\r\n /// Sends otherTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n /// UNI-V2 -> optionToken -> underlyingToken.\r\n /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n /// @param otherTokenAddress The address of the other token in the pair with the options.\r\n /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n /// @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity.\r\n /// @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity.\r\n /// @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function removeLongLiquidityThenCloseOptions(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (\r\n uint256 amountOptions,\r\n uint256 amountOtherTokens\r\n ) = UniswapConnectorLib02.removeLongLiquidityThenCloseOptions(\r\n factory,\r\n router,\r\n trader,\r\n optionAddress,\r\n otherTokenAddress,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n return (amountOptions, amountOtherTokens);\r\n }\r\n\r\n ///\r\n /// @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n /// @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender.\r\n /// Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address.\r\n /// Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n /// UNI-V2 -> optionToken -> underlyingToken.\r\n /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n /// @param otherTokenAddress The address of the other token in the option pair.\r\n /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n /// @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity.\r\n /// @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n /// @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function removeShortLiquidityThenCloseOptions(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (\r\n uint256 amountOptions,\r\n uint256 amountOtherTokens\r\n ) = UniswapConnectorLib02.removeShortLiquidityThenCloseOptions(\r\n factory,\r\n router,\r\n trader,\r\n optionAddress,\r\n otherTokenAddress,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n return (amountOptions, amountOtherTokens);\r\n }\r\n\r\n /// ==== Callback Implementation ====\r\n\r\n ///\r\n /// @dev The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data.\r\n /// @param sender The original msg.sender of the UniswapV2Pair.swap() call.\r\n /// @param amount0 The quantity of token0 received to the `to` address in the swap() call.\r\n /// @param amount1 The quantity of token1 received to the `to` address in the swap() call.\r\n /// @param data The payload passed in the `data` parameter of the swap() call.\r\n ///\r\n function uniswapV2Call(\r\n address sender,\r\n uint256 amount0,\r\n uint256 amount1,\r\n bytes calldata data\r\n ) external override {\r\n address token0 = IUniswapV2Pair(msg.sender).token0();\r\n address token1 = IUniswapV2Pair(msg.sender).token1();\r\n assert(msg.sender == factory.getPair(token0, token1)); /// ensure that msg.sender is actually a V2 pair\r\n (bool success, bytes memory returnData) = address(this).call(data);\r\n require(\r\n success &&\r\n (returnData.length == 0 || abi.decode(returnData, (bool))),\r\n \"ERR_UNISWAPV2_CALL_FAIL\"\r\n );\r\n }\r\n\r\n /// ==== Management Functions ====\r\n\r\n /// @dev Creates a UniswapV2Pair by calling `createPair` on the UniswapV2Factory.\r\n function deployUniswapMarket(address optionAddress, address otherToken)\r\n external\r\n override\r\n returns (address)\r\n {\r\n address uniswapPair = factory.createPair(optionAddress, otherToken);\r\n return uniswapPair;\r\n }\r\n\r\n /// ==== View ====\r\n\r\n /// @dev Gets a UniswapV2Pair address for two tokens by calling the UniswapV2Factory.\r\n function getUniswapMarketForTokens(address token0, address token1)\r\n public\r\n override\r\n view\r\n returns (address)\r\n {\r\n address uniswapPair = factory.getPair(token0, token1);\r\n require(uniswapPair != address(0x0), \"ERR_PAIR_DOES_NOT_EXIST\");\r\n return uniswapPair;\r\n }\r\n\r\n /// @dev Gets the name of the contract.\r\n function getName() external override pure returns (string memory) {\r\n return \"PrimitiveV1UniswapConnector02\";\r\n }\r\n\r\n /// @dev Gets the version of the contract.\r\n function getVersion() external override pure returns (uint8) {\r\n return uint8(2);\r\n }\r\n}\r\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Callee {\n function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/connectors/Uniswap/UniswapConnectorLib02.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\n///\r\n/// @title Library for business logic for connecting Uniswap V2 Protocol functions with Primitive V1.\r\n/// @notice Primitive V1 UniswapConnectorLib02 - @primitivefi/contracts@v0.4.1\r\n/// @author Primitive\r\n///\r\n\r\n/// Uniswap\r\nimport {\r\n IUniswapV2Callee\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\";\r\nimport {\r\n IUniswapV2Router02\r\n} from \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\r\nimport {\r\n IUniswapV2Factory\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\r\nimport {\r\n IUniswapV2Pair\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\";\r\n/// Primitive\r\nimport { ITrader, IOption } from \"../../option/interfaces/ITrader.sol\";\r\nimport { TraderLib, IERC20 } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector01, IWETH } from \"../WETH/IWethConnector01.sol\";\r\nimport { WethConnectorLib01 } from \"../WETH/WethConnectorLib01.sol\";\r\n/// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary UniswapConnectorLib02 {\r\n using SafeERC20 for IERC20; /// Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data\r\n using SafeMath for uint256; /// Reverts on math underflows/overflows\r\n\r\n /// ==== Combo Operations ====\r\n\r\n ///\r\n /// @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens.\r\n /// Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.\r\n /// @notice If the first address in the path is not the optionToken address, the tx will fail.\r\n /// underlyingToken -> optionToken -> quoteToken.\r\n /// @param optionToken The address of the Oracle-less Primitive option.\r\n /// @param amountIn The quantity of longOptionTokens to mint and then sell.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n /// @param to The address to send the optionToken proceeds and redeem tokens to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n /// @return bool Whether the transaction was successful or not.\r\n ///\r\n function mintLongOptionsThenSwapToTokens(\r\n IUniswapV2Router02 router,\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n /// Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n /// Mints long + short option tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n /// Swaps longOptionTokens to the token specified at the end of the path, then sends to msg.sender.\r\n /// Reverts if the first address in the path is not the optionToken address.\r\n (, bool success) = _swapExactOptionsForTokens(\r\n router,\r\n address(optionToken),\r\n outputOptions,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n /// Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n /// Send shortOptionTokens (redeem) to the \"to\" address.\r\n IERC20(optionToken.redeemToken()).safeTransfer(to, outputRedeems);\r\n return success;\r\n }\r\n\r\n ///\r\n /// @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens.\r\n /// @notice If the first address in the path is not the shortOptionToken address, the tx will fail.\r\n /// underlyingToken -> shortOptionToken -> quoteToken.\r\n /// IMPORTANT: redeemTokens = shortOptionTokens\r\n /// @param optionToken The address of the Option contract.\r\n /// @param amountIn The quantity of options to mint.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\r\n /// @param to The address to send the shortOptionToken proceeds and longOptionTokens to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n /// @return bool Whether the transaction was successful or not.\r\n ///\r\n function mintShortOptionsThenSwapToTokens(\r\n IUniswapV2Router02 router,\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n /// Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n /// Mints long + short tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n /// Swaps shortOptionTokens to the token specified at the end of the path, then sends to msg.sender.\r\n /// Reverts if the first address in the path is not the shortOptionToken address.\r\n address redeemToken = optionToken.redeemToken();\r\n (, bool success) = _swapExactOptionsForTokens(\r\n router,\r\n redeemToken,\r\n outputRedeems, /// shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n /// Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n /// Send longOptionTokens to the \"to\" address.\r\n IERC20(optionToken).safeTransfer(to, outputOptions); /// longOptionTokens\r\n return success;\r\n }\r\n\r\n /// ==== Liquidity Functions ====\r\n\r\n ///\r\n /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> optionToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken.\r\n /// @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.\r\n /// @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addLongLiquidityWithUnderlying(\r\n IUniswapV2Router02 router,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minOptionTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n /// Pull otherTokens from msg.sender to add to Uniswap V2 Pair.\r\n /// Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(otherTokenAddress).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityOtherTokens\r\n );\r\n\r\n /// Pulls underlyingTokens from msg.sender to this contract.\r\n /// Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n /// Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n IOption(optionAddress),\r\n quantityOptions,\r\n address(this)\r\n );\r\n assert(outputOptions == quantityOptions);\r\n\r\n /// Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(optionAddress).approve(address(router), uint256(-1));\r\n IERC20(otherTokenAddress).approve(address(router), uint256(-1));\r\n\r\n /// Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router.addLiquidity(\r\n optionAddress,\r\n otherTokenAddress,\r\n quantityOptions,\r\n quantityOtherTokens,\r\n minOptionTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n /// Send shortOptionTokens (redeem) from minting option operation to msg.sender.\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n msg.sender,\r\n outputRedeems\r\n );\r\n return true;\r\n }\r\n\r\n ///\r\n /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> optionToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.\r\n /// @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addLongLiquidityWithETHUnderlying(\r\n IWETH weth,\r\n IUniswapV2Router02 router,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOtherTokens,\r\n uint256 minOptionTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n /// Pull otherTokens from msg.sender to add to Uniswap V2 Pair.\r\n /// Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(otherTokenAddress).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityOtherTokens\r\n );\r\n\r\n /// Pulls underlyingTokens from msg.sender to this contract.\r\n /// Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n /// Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = WethConnectorLib01\r\n .safeMintWithETH(weth, IOption(optionAddress), address(this));\r\n assert(outputOptions == msg.value);\r\n\r\n /// Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(optionAddress).approve(address(router), uint256(-1));\r\n IERC20(otherTokenAddress).approve(address(router), uint256(-1));\r\n\r\n /// Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router.addLiquidity(\r\n optionAddress,\r\n otherTokenAddress,\r\n msg.value,\r\n quantityOtherTokens,\r\n minOptionTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n /// Send shortOptionTokens (redeem) from minting option operation to msg.sender.\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n msg.sender,\r\n outputRedeems\r\n );\r\n return true;\r\n }\r\n\r\n ///\r\n /// @dev Adds redeemToken liquidity to a redeem<>quote token pair by minting shortOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> redeemToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken.\r\n /// @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair.\r\n /// @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addShortLiquidityWithUnderlying(\r\n IUniswapV2Router02 router,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minShortTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n /// Pull quote tokens from msg.sender to add to Uniswap V2 Pair.\r\n /// Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(otherTokenAddress).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityOtherTokens\r\n );\r\n\r\n /// Pulls underlyingTokens from msg.sender to this contract.\r\n /// Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n /// Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n IOption(optionAddress),\r\n quantityOptions,\r\n address(this)\r\n );\r\n address redeemToken = IOption(optionAddress).redeemToken();\r\n\r\n /// Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(redeemToken).approve(address(router), uint256(-1));\r\n IERC20(otherTokenAddress).approve(address(router), uint256(-1));\r\n\r\n /// Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router.addLiquidity(\r\n redeemToken,\r\n otherTokenAddress,\r\n outputRedeems,\r\n quantityOtherTokens,\r\n minShortTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n /// Send longOptionTokens from minting option operation to msg.sender.\r\n IERC20(optionAddress).safeTransfer(msg.sender, outputOptions);\r\n return true;\r\n }\r\n\r\n ///\r\n /// @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n /// @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender.\r\n /// Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address.\r\n /// Sends otherTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n /// UNI-V2 -> optionToken -> underlyingToken.\r\n /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n /// @param otherTokenAddress The address of the other token in the pair with the options.\r\n /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n /// @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity.\r\n /// @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity.\r\n /// @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function removeLongLiquidityThenCloseOptions(\r\n IUniswapV2Factory factory,\r\n IUniswapV2Router02 router,\r\n ITrader trader,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256, uint256) {\r\n /// Store in memory for gas savings.\r\n IOption optionToken = IOption(optionAddress);\r\n\r\n {\r\n /// Gets the Uniswap V2 Pair address for optionAddress and otherToken.\r\n /// Transfers the LP tokens for the pair to this contract.\r\n /// Warning: internal call to a non-trusted address `msg.sender`.\r\n address pair = factory.getPair(optionAddress, otherTokenAddress);\r\n IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);\r\n IERC20(pair).approve(address(router), uint256(-1));\r\n }\r\n\r\n /// Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens).\r\n (uint256 amountOptions, uint256 amountOtherTokens) = router\r\n .removeLiquidity(\r\n optionAddress,\r\n otherTokenAddress,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n address(this),\r\n deadline\r\n );\r\n\r\n /// Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options.\r\n {\r\n address redeemToken = optionToken.redeemToken();\r\n IERC20(optionAddress).approve(address(trader), uint256(-1));\r\n IERC20(redeemToken).approve(address(trader), uint256(-1));\r\n\r\n /// Calculate equivalent quantity of redeem (short option) tokens to close the option position.\r\n /// Need to cancel base units and have quote units remaining.\r\n uint256 requiredRedeems = amountOptions\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n /// Pull the required shortOptionTokens from msg.sender to this contract.\r\n IERC20(redeemToken).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n requiredRedeems\r\n );\r\n }\r\n\r\n /// Pushes option and redeem tokens to the option contract and calls \"closeOption\".\r\n /// Receives underlyingTokens and sends them to the \"to\" address.\r\n trader.safeClose(optionToken, amountOptions, to);\r\n\r\n /// Send the otherTokens received from burning liquidity shares to the \"to\" address.\r\n IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens);\r\n return (amountOptions, amountOtherTokens);\r\n }\r\n\r\n ///\r\n /// @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n /// @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender.\r\n /// Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address.\r\n /// Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n /// UNI-V2 -> optionToken -> underlyingToken.\r\n /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n /// @param otherTokenAddress The address of the other token in the option pair.\r\n /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n /// @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity.\r\n /// @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n /// @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function removeShortLiquidityThenCloseOptions(\r\n IUniswapV2Factory factory,\r\n IUniswapV2Router02 router,\r\n ITrader trader,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256, uint256) {\r\n /// Store in memory for gas savings.\r\n address redeemToken = IOption(optionAddress).redeemToken();\r\n\r\n {\r\n /// Gets the Uniswap V2 Pair address for shortOptionToken and otherTokens.\r\n /// Transfers the LP tokens for the pair to this contract.\r\n /// Warning: internal call to a non-trusted address `msg.sender`.\r\n address pair = factory.getPair(redeemToken, otherTokenAddress);\r\n IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);\r\n IERC20(pair).approve(address(router), uint256(-1));\r\n }\r\n\r\n /// Remove liquidity from Uniswap V2 pool to receive pool tokens (shortOptionTokens + otherTokens).\r\n (uint256 amountShortOptions, uint256 amountOtherTokens) = router\r\n .removeLiquidity(\r\n redeemToken,\r\n otherTokenAddress,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n address(this),\r\n deadline\r\n );\r\n\r\n /// Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options.\r\n {\r\n IOption optionToken = IOption(optionAddress);\r\n IERC20(address(optionToken)).approve(address(trader), uint256(-1));\r\n IERC20(redeemToken).approve(address(trader), uint256(-1));\r\n\r\n /// Calculate equivalent quantity of redeem (short option) tokens to close the option position.\r\n /// Need to cancel base units and have quote units remaining.\r\n uint256 requiredLongOptionTokens = amountShortOptions\r\n .mul(optionToken.getBaseValue())\r\n .mul(1 ether)\r\n .div(optionToken.getQuoteValue())\r\n .div(1 ether);\r\n\r\n /// Pull the required longOptionTokens from msg.sender to this contract.\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n requiredLongOptionTokens\r\n );\r\n /// Pushes option and redeem tokens to the option contract and calls \"closeOption\".\r\n /// Receives underlyingTokens and sends them to the \"to\" address.\r\n trader.safeClose(optionToken, requiredLongOptionTokens, to);\r\n }\r\n\r\n /// Send the otherTokens received from burning liquidity shares to the \"to\" address.\r\n IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens);\r\n return (amountShortOptions, amountOtherTokens);\r\n }\r\n\r\n /// ==== Internal Functions ====\r\n\r\n ///\r\n /// @dev Calls the \"swapExactTokensForTokens\" function on the Uniswap V2 Router 02 Contract.\r\n /// @notice Fails early if the address in the beginning of the path is not the token address.\r\n /// @param tokenAddress The address of the token to swap from.\r\n /// @param amountIn The quantity of longOptionTokens to swap with.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the tokens swapped.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pairs.\r\n /// @param to The address to send the token proceeds to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n ///\r\n function _swapExactOptionsForTokens(\r\n IUniswapV2Router02 router,\r\n address tokenAddress,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256[] memory amounts, bool success) {\r\n /// Fails early if the token being swapped from is not the optionToken.\r\n require(path[0] == tokenAddress, \"ERR_PATH_OPTION_START\");\r\n\r\n /// Approve the uniswap router to be able to transfer longOptionTokens from this contract.\r\n IERC20(tokenAddress).approve(address(router), uint256(-1));\r\n /// Call the Uniswap V2 function to swap longOptionTokens to quoteTokens.\r\n (amounts) = router.swapExactTokensForTokens(\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n success = true;\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/TraderLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Trader Library\r\n * @notice Internal functions that can be used to safeTransfer\r\n * tokens into the option contract then call respective option contract functions.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary TraderLib {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n /**\r\n * @dev Conducts important safety checks to safely mint option tokens.\r\n * @param optionToken The address of the option token to mint.\r\n * @param mintQuantity The quantity of option tokens to mint.\r\n * @param receiver The address which receives the minted option tokens.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(mintQuantity > 0, \"ERR_ZERO\");\r\n IERC20(optionToken.getUnderlyingTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n mintQuantity\r\n );\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(exerciseQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.getStrikeTokenAddress()).balanceOf(msg.sender) >=\r\n inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n IERC20(optionToken.getStrikeTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inputRedeems = outputStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) internal returns (uint256) {\r\n require(redeemQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n // There can be the case there is no available strikes to redeem, causing a revert.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(receiver);\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n require(closeQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned. (What we mean by Implicit).\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens are sent to the receiver address and the redeemTokens are burned.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Checks\r\n require(unwindQuantity > 0, \"ERR_ZERO\");\r\n // solhint-disable-next-line not-rely-on-time\r\n require(\r\n optionToken.getExpiryTime() < block.timestamp,\r\n \"ERR_NOT_EXPIRED\"\r\n );\r\n\r\n // Calculate amount of redeems required\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/connectors/WETH/IWethConnector01.sol": { + "content": "/// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { IWETH } from \"./IWETH.sol\";\r\n\r\ninterface IWethConnector01 {\r\n function weth() external view returns (IWETH);\r\n\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function getName() external pure returns (string memory);\r\n\r\n function getVersion() external pure returns (uint8);\r\n}\r\n" + }, + "contracts/connectors/WETH/IWETH.sol": { + "content": "pragma solidity >=0.5.0;\r\n\r\ninterface IWETH {\r\n function deposit() external payable;\r\n\r\n function transfer(address to, uint256 value) external returns (bool);\r\n\r\n function withdraw(uint256) external;\r\n}\r\n" + }, + "contracts/connectors/WETH/WethConnectorLib01.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Weth Connector for bridging ether to WETH Primitive options.\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * Manages operations involving options with WETH as the underlying or strike asset.\r\n * Accepts deposits in ethers and withdraws ethers.\r\n * @author Primitive\r\n */\r\n\r\n// WETH Interface\r\nimport { IWETH } from \"./IWETH.sol\";\r\n// Primitive\r\nimport { IOption, IERC20 } from \"../../option/interfaces/IOption.sol\";\r\n// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary WethConnectorLib01 {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n /**\r\n * @dev Checks the quantity of an operation to make sure its not zero. Fails early.\r\n */\r\n modifier nonZero(uint256 quantity) {\r\n require(quantity > 0, \"ERR_ZERO\");\r\n _;\r\n }\r\n\r\n // ==== Operation Functions ====\r\n\r\n /**\r\n * @dev Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.\r\n * @notice This function is for options that have WETH as the underlying asset.\r\n * @param optionToken The address of the option token to mint.\r\n * @param receiver The address which receives the minted option and redeem tokens.\r\n */\r\n function safeMintWithETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n address receiver\r\n ) internal nonZero(msg.value) returns (uint256, uint256) {\r\n // Check to make sure we are minting a WETH call option.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Convert ethers into WETH, then send WETH to option contract in preparation of calling mintOptions().\r\n _depositEthSendWeth(weth, address(optionToken));\r\n\r\n // Mint the option and redeem tokens.\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\r\n * @notice This function is for options with WETH as the strike asset.\r\n * Burns option tokens, accepts ethers, and pushes out underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExerciseWithETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n address receiver\r\n ) internal nonZero(msg.value) returns (uint256, uint256) {\r\n // Require one of the option's assets to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n uint256 inputStrikes = msg.value;\r\n // Calculate quantity of optionTokens needed to burn.\r\n // An ether put option with strike price $300 has a \"base\" value of 300, and a \"quote\" value of 1.\r\n // To calculate how many options are needed to be burned, we need to cancel out the \"quote\" units.\r\n // The input strike quantity can be multiplied by the strike ratio to cancel out \"quote\" units.\r\n // 1 ether (quote units) * 300 (base units) / 1 (quote units) = 300 inputOptions\r\n uint256 inputOptions = inputStrikes.mul(optionToken.getBaseValue()).div(\r\n optionToken.getQuoteValue()\r\n );\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= inputOptions,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Wrap the ethers into WETH, and send the WETH to the option contract to prepare for calling exerciseOptions().\r\n _depositEthSendWeth(weth, address(optionToken));\r\n\r\n // Send the option tokens required to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n\r\n // Burns the transferred option tokens, stores the strike asset (ether), and pushes underlyingTokens\r\n // to the receiver address.\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n inputOptions,\r\n new bytes(0)\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn.\r\n * Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * Burns option tokens, pulls strikeTokens, and pushes out ethers.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeExerciseForETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) internal nonZero(exerciseQuantity) returns (uint256, uint256) {\r\n // Require one of the option's assets to be WETH.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(underlyingAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fails early if msg.sender does not have enough optionTokens.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fails early if msg.sender does not have enough strikeTokens.\r\n require(\r\n IERC20(strikeAddress).balanceOf(msg.sender) >= inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n\r\n // Send strikeTokens to option contract to prepare for calling exerciseOptions().\r\n IERC20(strikeAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n\r\n // Send the option tokens to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n // Burns the optionTokens sent, stores the strikeTokens sent, and pushes underlyingTokens\r\n // to this contract.\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n address(this),\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n\r\n // Converts the withdrawn WETH to ethers, then sends the ethers to the receiver address.\r\n _withdrawEthAndSend(weth, receiver, exerciseQuantity);\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\r\n * @notice This function is for options that have WETH as the strike asset.\r\n * Converts WETH to ethers, and withdraws ethers to the receiver address.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity The quantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeRedeemForETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) internal nonZero(redeemQuantity) returns (uint256) {\r\n // Require strikeToken to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens.\r\n address redeemAddress = optionToken.redeemToken();\r\n require(\r\n IERC20(redeemAddress).balanceOf(msg.sender) >= redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeemTokens to option contract in preparation for calling redeemStrikeTokens().\r\n IERC20(redeemAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n\r\n // If options have not been exercised, there will be no strikeTokens to redeem, causing a revert.\r\n // Burns the redeem tokens that were sent to the contract, and withdraws the same quantity of WETH.\r\n // Sends the withdrawn WETH to this contract, so that it can be unwrapped prior to being sent to receiver.\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(address(this));\r\n\r\n // Unwrap the redeemed WETH and then send the ethers to the receiver.\r\n _withdrawEthAndSend(weth, receiver, redeemQuantity);\r\n\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\r\n * @notice This function is for options with WETH as the underlying asset.\r\n * WETH underlyingTokens are converted to ethers before being sent to receiver.\r\n * The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeCloseForETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n internal\r\n nonZero(closeQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early is msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem and option tokens in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n // Call the closeOptions() function to burn option and redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them then send the ethers to the receiver.\r\n _withdrawEthAndSend(weth, receiver, closeQuantity);\r\n\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options.\r\n * This function is for options with WETH as the underlying asset.\r\n * The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw.\r\n * @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n */\r\n function safeUnwindForETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n internal\r\n nonZero(unwindQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // If the option is not expired, fail early.\r\n // solhint-disable-next-line not-rely-on-time\r\n require(optionToken.getExpiryTime() < now, \"ERR_NOT_EXPIRED\");\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n // Call the closeOptions() function to burn redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them to ethers then send the ethers to the receiver.\r\n _withdrawEthAndSend(weth, receiver, unwindQuantity);\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n // ==== WETH Operations ====\r\n\r\n /**\r\n * @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to \"to\".\r\n * @param to The address to send WETH ERC-20 tokens to.\r\n */\r\n function _depositEthSendWeth(IWETH weth, address to) internal {\r\n // Deposit the ethers received from msg.value into the WETH contract.\r\n weth.deposit.value(msg.value)();\r\n\r\n // Send WETH.\r\n weth.transfer(to, msg.value);\r\n }\r\n\r\n /**\r\n * @dev Unwraps WETH to withrdaw ethers, which are then sent to the \"to\" address.\r\n * @param to The address to send withdrawn ethers to.\r\n * @param quantity The quantity of WETH to unwrap.\r\n */\r\n function _withdrawEthAndSend(\r\n IWETH weth,\r\n address to,\r\n uint256 quantity\r\n ) internal {\r\n // Withdraw ethers with weth.\r\n weth.withdraw(quantity);\r\n\r\n // Send ether.\r\n (bool success, ) = to.call.value(quantity)(\"\");\r\n\r\n // Revert is call is unsuccessful.\r\n require(success, \"ERR_SENDING_ETHER\");\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\ncontract ReentrancyGuard {\n bool private _notEntered;\n\n constructor () internal {\n // Storing an initial non-zero value makes deployment a bit more\n // expensive, but in exchange the refund on every call to nonReentrant\n // will be lower in amount. Since refunds are capped to a percetange of\n // the total transaction's gas, it is best to keep them low in cases\n // like this one, to increase the likelihood of the full refund coming\n // into effect.\n _notEntered = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _notEntered = false;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _notEntered = true;\n }\n}\n" + }, + "contracts/connectors/WETH/WethConnector01.sol": { + "content": "/// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n///\r\n/// @title Weth Connector for bridging ether to WETH Primitive options.\r\n/// @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n/// Manages operations involving options with WETH as the underlying or strike asset.\r\n/// Accepts deposits in ethers and withdraws ethers.\r\n/// Primitive V1 WethConnector01 - @primitivefi/contracts@v0.4.1\r\n/// @author Primitive\r\n///\r\n\r\n/// Primitive\r\nimport { IWethConnector01, IOption, IWETH } from \"./IWethConnector01.sol\";\r\nimport { WethConnectorLib01, IERC20 } from \"./WethConnectorLib01.sol\";\r\n/// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract WethConnector01 is IWethConnector01, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n IWETH public override weth;\r\n\r\n event WethConnectorMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event WethConnectorExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event WethConnectorRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event WethConnectorClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event WethConnectorUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n ///\r\n /// @dev Checks the quantity of an operation to make sure its not zero. Fails early.\r\n ///\r\n modifier nonZero(uint256 quantity) {\r\n require(quantity > 0, \"ERR_ZERO\");\r\n _;\r\n }\r\n\r\n ///\r\n /// @dev Since the WethConnector contract is responsible for converting between ethers and WETH,\r\n /// the contract is initialized with the address for WETH.\r\n ///\r\n constructor(address payable _weth) public {\r\n weth = IWETH(_weth);\r\n }\r\n\r\n ///\r\n /// @dev If ether is sent to this contract through a normal transaction, it will fail, unless\r\n /// it was the WETH contract who sent it.\r\n ///\r\n receive() external payable {\r\n assert(msg.sender == address(weth));\r\n }\r\n\r\n /// ==== Operation Functions ====\r\n\r\n ///\r\n /// @dev Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.\r\n /// @notice This function is for options that have WETH as the underlying asset.\r\n /// @param optionToken The address of the option token to mint.\r\n /// @param receiver The address which receives the minted option and redeem tokens.\r\n ///\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n (uint256 outputOptions, uint256 outputRedeems) = WethConnectorLib01\r\n .safeMintWithETH(weth, optionToken, receiver);\r\n emit WethConnectorMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n ///\r\n /// @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens.\r\n /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n /// Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\r\n /// @notice This function is for options with WETH as the strike asset.\r\n /// Burns option tokens, accepts ethers, and pushes out underlyingTokens.\r\n /// @param optionToken The address of the option contract.\r\n /// @param receiver The underlyingTokens are sent to the receiver address.\r\n ///\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n (uint256 inputStrikes, uint256 inputOptions) = WethConnectorLib01\r\n .safeExerciseWithETH(weth, optionToken, receiver);\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n ///\r\n /// @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn.\r\n /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n /// @notice This function is for options with WETH as the underlying asset.\r\n /// Burns option tokens, pulls strikeTokens, and pushes out ethers.\r\n /// @param optionToken The address of the option contract.\r\n /// @param exerciseQuantity Quantity of optionTokens to exercise.\r\n /// @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(exerciseQuantity)\r\n returns (uint256, uint256)\r\n {\r\n (uint256 inputStrikes, uint256 inputOptions) = WethConnectorLib01\r\n .safeExerciseForETH(weth, optionToken, exerciseQuantity, receiver);\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n ///\r\n /// @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\r\n /// @notice This function is for options that have WETH as the strike asset.\r\n /// Converts WETH to ethers, and withdraws ethers to the receiver address.\r\n /// @param optionToken The address of the option contract.\r\n /// @param redeemQuantity The quantity of redeemTokens to burn.\r\n /// @param receiver The strikeTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant nonZero(redeemQuantity) returns (uint256) {\r\n uint256 inputRedeems = WethConnectorLib01.safeRedeemForETH(\r\n weth,\r\n optionToken,\r\n redeemQuantity,\r\n receiver\r\n );\r\n\r\n emit WethConnectorRedeem(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n return inputRedeems;\r\n }\r\n\r\n ///\r\n /// @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\r\n /// @notice This function is for options with WETH as the underlying asset.\r\n /// WETH underlyingTokens are converted to ethers before being sent to receiver.\r\n /// The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n /// inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n /// @param optionToken The address of the option contract.\r\n /// @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\r\n /// @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(closeQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inputRedeems,\r\n uint256 inputOptions,\r\n uint256 outUnderlyings\r\n ) = WethConnectorLib01.safeCloseForETH(\r\n weth,\r\n optionToken,\r\n closeQuantity,\r\n receiver\r\n );\r\n emit WethConnectorClose(msg.sender, address(optionToken), inputOptions);\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n ///\r\n /// @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options.\r\n /// This function is for options with WETH as the underlying asset.\r\n /// The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\r\n /// @param optionToken The address of the option contract.\r\n /// @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw.\r\n /// @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(unwindQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inputRedeems,\r\n uint256 inputOptions,\r\n uint256 outUnderlyings\r\n ) = WethConnectorLib01.safeUnwindForETH(\r\n weth,\r\n optionToken,\r\n unwindQuantity,\r\n receiver\r\n );\r\n\r\n emit WethConnectorUnwind(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n //// ==== View ====\r\n\r\n //// @dev Gets the name of the contract.\r\n function getName() external override pure returns (string memory) {\r\n return \"PrimitiveV1WethConnector01\";\r\n }\r\n\r\n //// @dev Gets the version of the contract.\r\n function getVersion() external override pure returns (uint8) {\r\n return uint8(1);\r\n }\r\n}\r\n" + }, + "contracts/option/applications/factories/OptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Factory for deploying option contracts.\r\n * @author Primitive\r\n */\r\n\r\nimport { Option, SafeMath } from \"../../primitives/Option.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { OptionTemplateLib } from \"../../libraries/OptionTemplateLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { IOptionFactory } from \"../../interfaces/IOptionFactory.sol\";\r\n\r\ncontract OptionFactory is IOptionFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override optionTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the bytecode for the Option contract.\r\n */\r\n function deployOptionTemplate() public override {\r\n optionTemplate = OptionTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a create2 clone of the option template contract.\r\n * @param underlyingToken The address of the underlying ERC-20 token.\r\n * @param strikeToken The address of the strike ERC-20 token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp for option expiry.\r\n */\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override onlyOwner returns (address) {\r\n require(optionTemplate != address(0x0), \"ERR_NO_DEPLOYED_TEMPLATE\");\r\n\r\n // Calculates the salt for create2.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n\r\n // Deploys the clone using the template contract and calculated salt.\r\n address optionAddress = CloneLib.create2Clone(\r\n optionTemplate,\r\n uint256(salt)\r\n );\r\n\r\n // Sets the initial state of the option with the parameter arguments.\r\n Option(optionAddress).initialize(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Only the factory can call the initRedeemToken function to set the redeem token address.\r\n * This function is only callable by the Registry contract (the owner).\r\n */\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n Option(optionAddress).initRedeemToken(redeemAddress);\r\n }\r\n\r\n /**\r\n * @dev Calculates the option token's address using the five option parameters.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override view returns (address) {\r\n // Calculates the salt using the parameter arguments and the salt used in the template contract\r\n // create2 deployment.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n address optionAddress = CloneLib.deriveInstanceAddress(\r\n optionTemplate,\r\n salt\r\n );\r\n return optionAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Option.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Vanilla Option Token\r\n * @notice This is a low-level contract that is designed to be interacted with by\r\n * other sophisticated smart contracts which have important safety checks,\r\n * and not by externally owned accounts.\r\n * Incorrect usage through direct interaction from externally owned accounts\r\n * can lead to the loss of funds.\r\n * Use Primitive's Trader.sol contract to interact with this contract safely.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { IFlash } from \"../interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\ncontract Option is IOption, ERC20 {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n struct OptionParameters {\r\n address underlyingToken;\r\n address strikeToken;\r\n uint256 base;\r\n uint256 quote;\r\n uint256 expiry;\r\n }\r\n\r\n OptionParameters public optionParameters;\r\n\r\n // solhint-disable-next-line const-name-snakecase\r\n uint256 public override underlyingCache;\r\n uint256 public override strikeCache;\r\n address public override redeemToken;\r\n address public override factory;\r\n bool private _notEntered;\r\n\r\n string public constant name = \"Primitive V1 Option\";\r\n string public constant symbol = \"PRM\";\r\n uint8 public constant decimals = 18;\r\n\r\n event Mint(address indexed from, uint256 outOptions, uint256 outRedeems);\r\n event Exercise(\r\n address indexed from,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event Redeem(address indexed from, uint256 inRedeems);\r\n event Close(address indexed from, uint256 outUnderlyings);\r\n event UpdatedCacheBalances(uint256 underlyingCache, uint256 strikeCache);\r\n event InitializedRedeem(\r\n address indexed caller,\r\n address indexed redeemToken\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the intial state for the contract. Only called immediately after deployment.\r\n * @param underlyingToken The address of the underlying asset.\r\n * @param strikeToken The address of the strike asset.\r\n * @param base The quantity of underlying tokens per quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per base amount of underlying tokens.\r\n * @param expiry The expiration date for the option.\r\n */\r\n function initialize(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= block.timestamp, \"ERR_EXPIRY\");\r\n factory = msg.sender;\r\n optionParameters = OptionParameters(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n _notEntered = true;\r\n }\r\n\r\n modifier notExpired {\r\n // solhint-disable-next-line not-rely-on-time\r\n require(isNotExpired(), \"ERR_EXPIRED\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Prevents a contract from calling itself, directly or indirectly.\r\n * Calling a `nonReentrant` function from another `nonReentrant`\r\n * function is not supported. It is possible to prevent this from happening\r\n * by making the `nonReentrant` function external, and make it call a\r\n * `private` function that does the actual work.\r\n */\r\n modifier nonReentrant() {\r\n // On the first call to nonReentrant, _notEntered will be true\r\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\r\n\r\n // Any calls to nonReentrant after this point will fail\r\n _notEntered = false;\r\n\r\n _;\r\n\r\n // By storing the original value once again, a refund is triggered (see\r\n // https://eips.ethereum.org/EIPS/eip-2200)\r\n _notEntered = true;\r\n }\r\n\r\n /**\r\n * @dev Called after the option contract is initialized, and a redeem token has been deployed.\r\n * @notice Entangles a redeem token to this option contract permanently.\r\n * @param redeemToken_ The address of the redeem token.\r\n */\r\n function initRedeemToken(address redeemToken_) external override {\r\n require(msg.sender == factory, \"ERR_NOT_OWNER\");\r\n require(redeemToken == address(0x0), \"ERR_REDEEM_INITIALIZED\");\r\n redeemToken = redeemToken_;\r\n emit InitializedRedeem(msg.sender, redeemToken_);\r\n }\r\n\r\n /**\r\n * @dev Updates the cached balances to match the actual current balances.\r\n * Attempting to transfer tokens to this contract directly, in a separate transaction,\r\n * is incorrect and could result in loss of funds. Calling this function will permanently lock any excess\r\n * underlying or strike tokens which were erroneously sent to this contract.\r\n */\r\n function updateCacheBalances() external override nonReentrant {\r\n _updateCacheBalances(\r\n IERC20(optionParameters.underlyingToken).balanceOf(address(this)),\r\n IERC20(optionParameters.strikeToken).balanceOf(address(this))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Sets the cache balances to new values.\r\n */\r\n function _updateCacheBalances(\r\n uint256 underlyingBalance,\r\n uint256 strikeBalance\r\n ) private {\r\n underlyingCache = underlyingBalance;\r\n strikeCache = strikeBalance;\r\n emit UpdatedCacheBalances(underlyingBalance, strikeBalance);\r\n }\r\n\r\n /* === STATE MUTABLE === */\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Mints optionTokens at a 1:1 ratio to underlyingToken deposits. Also mints Redeem tokens at a base:quote ratio.\r\n * @notice inUnderlyings = outOptionTokens. inUnderlying / strike ratio = outRedeemTokens.\r\n * @param receiver The newly minted tokens are sent to the receiver address.\r\n */\r\n function mintOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n notExpired\r\n returns (uint256, uint256)\r\n {\r\n // Save on gas because this variable is used twice.\r\n uint256 underlyingBalance = IERC20(optionParameters.underlyingToken)\r\n .balanceOf(address(this));\r\n\r\n // Mint optionTokens equal to the difference between current and cached balance of underlyingTokens.\r\n uint256 inUnderlyings = underlyingBalance.sub(underlyingCache);\r\n\r\n // Calculate the quantity of redeemTokens to mint.\r\n uint256 outRedeems = inUnderlyings.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n require(outRedeems > 0, \"ERR_ZERO\");\r\n\r\n // Mint the optionTokens and redeemTokens.\r\n IRedeem(redeemToken).mint(receiver, outRedeems);\r\n _mint(receiver, inUnderlyings);\r\n\r\n // Update the underlyingCache.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Mint(msg.sender, inUnderlyings, outRedeems);\r\n return (inUnderlyings, outRedeems);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Sends out underlyingTokens then checks to make sure they are returned or paid for.\r\n * This function enables flash exercises and flash loans. Only smart contracts who implement\r\n * their own IFlash interface should be calling this function to initiate a flash exercise/loan.\r\n * @notice If the underlyingTokens are returned, only the fee has to be paid.\r\n * @param receiver The outUnderlyings are sent to the receiver address.\r\n * @param outUnderlyings Quantity of underlyingTokens to safeTransfer to receiver optimistically.\r\n * @param data Passing in any abritrary data will trigger the flash exercise callback function.\r\n */\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override nonReentrant notExpired returns (uint256, uint256) {\r\n // Store the cached balances and token addresses in memory.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n //(uint256 _underlyingCache, uint256 _strikeCache) = getCacheBalances();\r\n\r\n // Require outUnderlyings > 0 and balance of underlyings >= outUnderlyings.\r\n require(outUnderlyings > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(underlyingToken).balanceOf(address(this)) >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Optimistically safeTransfer out underlyingTokens.\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n if (data.length > 0)\r\n IFlash(receiver).primitiveFlash(msg.sender, outUnderlyings, data);\r\n\r\n // Store in memory for gas savings.\r\n uint256 strikeBalance = IERC20(optionParameters.strikeToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n\r\n // Calculate the differences.\r\n uint256 inStrikes = strikeBalance.sub(strikeCache);\r\n uint256 inUnderlyings = underlyingBalance.sub(\r\n underlyingCache.sub(outUnderlyings)\r\n ); // will be > 0 if underlyingTokens are returned.\r\n\r\n // Either underlyingTokens or strikeTokens must be sent into the contract.\r\n require(inStrikes > 0 || inUnderlyings > 0, \"ERR_ZERO\");\r\n\r\n // Calculate the remaining amount of underlyingToken that needs to be paid for.\r\n uint256 remainder = inUnderlyings > outUnderlyings\r\n ? 0\r\n : outUnderlyings.sub(inUnderlyings);\r\n\r\n // Calculate the expected payment of strikeTokens.\r\n uint256 payment = remainder.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n\r\n // Assumes the cached optionToken balance is 0, which is what it should be.\r\n uint256 inOptions = balanceOf(address(this));\r\n\r\n // Enforce the invariants.\r\n require(inStrikes >= payment, \"ERR_STRIKES_INPUT\");\r\n require(inOptions >= remainder, \"ERR_OPTIONS_INPUT\");\r\n\r\n // Burn the optionTokens at a 1:1 ratio to outUnderlyings.\r\n _burn(address(this), inOptions);\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeBalance);\r\n emit Exercise(msg.sender, outUnderlyings, inStrikes);\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Burns redeemTokens to withdraw strikeTokens at a ratio of 1:1.\r\n * @notice inRedeemTokens = outStrikeTokens. Only callable when strikeTokens are in the contract.\r\n * @param receiver The inRedeems quantity of strikeTokens are sent to the receiver address.\r\n */\r\n function redeemStrikeTokens(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (uint256)\r\n {\r\n address strikeToken = optionParameters.strikeToken;\r\n address _redeemToken = redeemToken;\r\n uint256 strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // Difference between redeemTokens balance and cache.\r\n require(inRedeems > 0, \"ERR_ZERO\");\r\n require(strikeBalance >= inRedeems, \"ERR_BAL_STRIKE\");\r\n\r\n // Burn redeemTokens in the contract. Send strikeTokens to receiver.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(strikeToken).safeTransfer(receiver, inRedeems);\r\n\r\n // Current balances.\r\n strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingCache, strikeBalance);\r\n emit Redeem(msg.sender, inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * If the option has expired, burn redeem tokens to withdraw underlying tokens.\r\n * If the option is not expired, burn option and redeem tokens to withdraw underlying tokens.\r\n * @notice inRedeemTokens / strike ratio = outUnderlyingTokens && inOptionTokens >= outUnderlyingTokens.\r\n * @param receiver The outUnderlyingTokens are sent to the receiver address.\r\n */\r\n function closeOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Stores addresses and balances locally for gas savings.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n address _redeemToken = redeemToken;\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 optionBalance = balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // The quantity of underlyingToken to send out it still determined by the quantity of inRedeems.\r\n // inRedeems is in units of strikeTokens, which is converted to underlyingTokens\r\n // by multiplying inRedeems by the strike ratio, which is base / quote.\r\n // This outUnderlyings quantity is checked against inOptions.\r\n // inOptions must be greater than or equal to outUnderlyings (1 option burned per 1 underlying purchased).\r\n // optionBalance must be greater than or equal to outUnderlyings.\r\n // Neither inRedeems or inOptions can be zero.\r\n uint256 outUnderlyings = inRedeems.mul(optionParameters.base).div(\r\n optionParameters.quote\r\n );\r\n\r\n // Assumes the cached balance is 0 so inOptions = balance of optionToken.\r\n // If optionToken is expired, optionToken does not need to be sent in. Only redeemToken.\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 inOptions = isNotExpired() ? optionBalance : outUnderlyings;\r\n require(inRedeems > 0 && inOptions > 0, \"ERR_ZERO\");\r\n require(\r\n inOptions >= outUnderlyings && underlyingBalance >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Burn optionTokens. optionTokens are only sent into contract when not expired.\r\n // solhint-disable-next-line not-rely-on-time\r\n if (isNotExpired()) {\r\n _burn(address(this), inOptions);\r\n }\r\n\r\n // Send underlyingTokens to user.\r\n // Burn redeemTokens held in the contract.\r\n // User does not receive extra underlyingTokens if there was extra optionTokens in the contract.\r\n // User receives outUnderlyings proportional to inRedeems.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n\r\n // Current balances of underlyingToken and redeemToken.\r\n underlyingBalance = IERC20(underlyingToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Close(msg.sender, outUnderlyings);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /* === VIEW === */\r\n\r\n /**\r\n * @dev Returns the previously saved balances of underlying and strike tokens.\r\n */\r\n function getCacheBalances()\r\n public\r\n override\r\n view\r\n returns (uint256, uint256)\r\n {\r\n return (underlyingCache, strikeCache);\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying, strike, and redeem token addresses.\r\n */\r\n function getAssetAddresses()\r\n public\r\n override\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n )\r\n {\r\n return (\r\n optionParameters.underlyingToken,\r\n optionParameters.strikeToken,\r\n redeemToken\r\n );\r\n }\r\n\r\n /**\r\n * @dev Returns the strike token address.\r\n */\r\n function getStrikeTokenAddress() public override view returns (address) {\r\n return optionParameters.strikeToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying token address.\r\n */\r\n function getUnderlyingTokenAddress()\r\n public\r\n override\r\n view\r\n returns (address)\r\n {\r\n return optionParameters.underlyingToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the base value option parameter.\r\n */\r\n function getBaseValue() public override view returns (uint256) {\r\n return optionParameters.base;\r\n }\r\n\r\n /**\r\n * @dev Returns the quote value option parameter.\r\n */\r\n function getQuoteValue() public override view returns (uint256) {\r\n return optionParameters.quote;\r\n }\r\n\r\n /**\r\n * @dev Returns the expiry timestamp option parameter.\r\n */\r\n function getExpiryTime() public override view returns (uint256) {\r\n return optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the option parameters and redeem token address.\r\n */\r\n function getParameters()\r\n public\r\n override\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n )\r\n {\r\n OptionParameters memory _optionParameters = optionParameters;\r\n _underlyingToken = _optionParameters.underlyingToken;\r\n _strikeToken = _optionParameters.strikeToken;\r\n _redeemToken = redeemToken;\r\n _base = _optionParameters.base;\r\n _quote = _optionParameters.quote;\r\n _expiry = _optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Internal function to check if the option is expired.\r\n */\r\n function isNotExpired() internal view returns (bool) {\r\n return optionParameters.expiry >= block.timestamp;\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IRedeem is IERC20 {\r\n function optionToken() external view returns (address);\r\n\r\n function factory() external view returns (address);\r\n\r\n function mint(address user, uint256 amount) external;\r\n\r\n function burn(address user, uint256 amount) external;\r\n\r\n function initialize(address _factory, address _optionToken) external;\r\n}\r\n" + }, + "contracts/option/interfaces/IFlash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IFlash {\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external;\r\n}\r\n" + }, + "contracts/option/primitives/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @dev Modifies name, symbol, and decimals by deleting them. Implemented as constants in parent contract.\r\n */\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\n/**\r\n * @dev Implementation of the {IERC20} interface.\r\n *\r\n * This implementation is agnostic to the way tokens are created. This means\r\n * that a supply mechanism has to be added in a derived contract using {_mint}.\r\n * For a generic mechanism see {ERC20PresetMinterPauser}.\r\n *\r\n * TIP: For a detailed writeup see our guide\r\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\r\n * to implement supply mechanisms].\r\n *\r\n * We have followed general OpenZeppelin guidelines: functions revert instead\r\n * of returning `false` on failure. This behavior is nonetheless conventional\r\n * and does not conflict with the expectations of ERC20 applications.\r\n *\r\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\r\n * This allows applications to reconstruct the allowance for all accounts just\r\n * by listening to said events. Other implementations of the EIP may not emit\r\n * these events, as it isn't required by the specification.\r\n *\r\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\r\n * functions have been added to mitigate the well-known issues around setting\r\n * allowances. See {IERC20-approve}.\r\n */\r\ncontract ERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n /**\r\n * @dev See {IERC20-totalSupply}.\r\n */\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-balanceOf}.\r\n */\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transfer}.\r\n *\r\n * Requirements:\r\n *\r\n * - `recipient` cannot be the zero address.\r\n * - the caller must have a balance of at least `amount`.\r\n */\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-allowance}.\r\n */\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-approve}.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transferFrom}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance. This is not\r\n * required by the EIP. See the note at the beginning of {ERC20};\r\n *\r\n * Requirements:\r\n * - `sender` and `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n * - the caller must have allowance for ``sender``'s tokens of at least\r\n * `amount`.\r\n */\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override returns (bool) {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically increases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n * - `spender` must have allowance for the caller of at least\r\n * `subtractedValue`.\r\n */\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Moves tokens `amount` from `sender` to `recipient`.\r\n *\r\n * This is internal function is equivalent to {transfer}, and can be used to\r\n * e.g. implement automatic token fees, slashing mechanisms, etc.\r\n *\r\n * Emits a {Transfer} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `sender` cannot be the zero address.\r\n * - `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n */\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\r\n * the total supply.\r\n *\r\n * Emits a {Transfer} event with `from` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `to` cannot be the zero address.\r\n */\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n /**\r\n * @dev Destroys `amount` tokens from `account`, reducing the\r\n * total supply.\r\n *\r\n * Emits a {Transfer} event with `to` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `account` cannot be the zero address.\r\n * - `account` must have at least `amount` tokens.\r\n */\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n /**\r\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\r\n *\r\n * This is internal function is equivalent to `approve`, and can be used to\r\n * e.g. set automatic allowances for certain subsystems, etc.\r\n *\r\n * Emits an {Approval} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `owner` cannot be the zero address.\r\n * - `spender` cannot be the zero address.\r\n */\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n /**\r\n * @dev Sets {decimals} to a value other than the default one of 18.\r\n *\r\n * WARNING: This function should only be called from the constructor. Most\r\n * applications that interact with token contracts will not expect\r\n * {decimals} to ever change, and may work incorrectly if it does.\r\n */\r\n /* function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n } */\r\n\r\n // ======= WARNING: ADDED FUNCTIONS =========\r\n\r\n /* function _setupName(string memory name_) internal {\r\n _name = name_;\r\n }\r\n\r\n function _setupSymbol(string memory symbol_) internal {\r\n _symbol = symbol_;\r\n } */\r\n\r\n // ======= END ADDED FUNCTIONS =========\r\n\r\n /**\r\n * @dev Hook that is called before any transfer of tokens. This includes\r\n * minting and burning.\r\n *\r\n * Calling conditions:\r\n *\r\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\r\n * will be to transferred to `to`.\r\n * - when `from` is zero, `amount` tokens will be minted for `to`.\r\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\r\n * - `from` and `to` are never both zero.\r\n *\r\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r\n */\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {}\r\n}\r\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "contracts/option/libraries/OptionTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Option } from \"../primitives/Option.sol\";\r\n\r\nlibrary OptionTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _OPTION_SALT = 0x56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd87; // keccak(\"primitive-option\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function OPTION_SALT() internal pure returns (bytes32) {\r\n return _OPTION_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Option.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Option).creationCode;\r\n implementationAddress = Create2.deploy(0, _OPTION_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Create2.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address) {\n address addr;\n require(address(this).balance >= amount, \"Create2: insufficient balance\");\n require(bytecode.length != 0, \"Create2: bytecode length is zero\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), \"Create2: Failed on deploy\");\n return addr;\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address) {\n bytes32 _data = keccak256(\n abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)\n );\n return address(bytes20(_data << 96));\n }\n}\n" + }, + "contracts/option/applications/NullCloneConstructor.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ncontract NullCloneConstructor {\r\n // solhint-disable-next-line no-empty-blocks\r\n function cloneConstructor(bytes memory consData) public {\r\n // blank\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/CloneLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @title Create2 Clone Factory Library\r\n * @author Alan Lu, Gnosis.\r\n * Raymond Pulver IV.\r\n */\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\n\r\nlibrary CloneLib {\r\n /**\r\n * @dev Calls internal creation computation function.\r\n */\r\n function computeCreationCode(address target)\r\n internal\r\n view\r\n returns (bytes memory clone)\r\n {\r\n clone = computeCreationCode(address(this), target);\r\n }\r\n\r\n /**\r\n * @dev Computes the Clone's creation code.\r\n */\r\n function computeCreationCode(address deployer, address target)\r\n internal\r\n pure\r\n returns (bytes memory clone)\r\n {\r\n bytes memory consData = abi.encodeWithSignature(\r\n \"cloneConstructor(bytes)\",\r\n new bytes(0)\r\n );\r\n clone = new bytes(99 + consData.length);\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n mstore(\r\n add(clone, 0x20),\r\n 0x3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe\r\n )\r\n mstore(\r\n add(clone, 0x2d),\r\n mul(deployer, 0x01000000000000000000000000)\r\n )\r\n mstore(\r\n add(clone, 0x41),\r\n 0x5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be\r\n )\r\n mstore(add(clone, 0x60), mul(target, 0x01000000000000000000000000))\r\n mstore(\r\n add(clone, 116),\r\n 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000\r\n )\r\n }\r\n for (uint256 i = 0; i < consData.length; i++) {\r\n clone[i + 99] = consData[i];\r\n }\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(address target, bytes32 salt)\r\n internal\r\n view\r\n returns (address)\r\n {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(target))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(\r\n address from,\r\n address target,\r\n bytes32 salt\r\n ) internal pure returns (address) {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(from, target)),\r\n from\r\n );\r\n }\r\n\r\n /**\r\n * @dev Computs creation code, and then instantiates it with create2.\r\n */\r\n function create2Clone(address target, uint256 saltNonce)\r\n internal\r\n returns (address result)\r\n {\r\n bytes memory clone = computeCreationCode(target);\r\n bytes32 salt = bytes32(saltNonce);\r\n\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n let len := mload(clone)\r\n let data := add(clone, 0x20)\r\n result := create2(0, data, len, salt)\r\n }\r\n\r\n require(result != address(0), \"ERR_CREATE2_FAIL\");\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IOptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IOptionFactory {\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external;\r\n\r\n function deployOptionTemplate() external;\r\n\r\n function optionTemplate() external returns (address);\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n}\r\n" + }, + "contracts/option/applications/factories/RedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Factory Contract for Redeem Tokens.\r\n * @notice Uses cloning technology on a deployed template contract.\r\n * @author Primitive\r\n */\r\n\r\nimport { Redeem, SafeMath } from \"../../primitives/Redeem.sol\";\r\nimport { RedeemTemplateLib } from \"../../libraries/RedeemTemplateLib.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { IRedeemFactory } from \"../../interfaces/IRedeemFactory.sol\";\r\n\r\ncontract RedeemFactory is IRedeemFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override redeemTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the full bytecode of the Redeem contract to be used as a template for clones.\r\n */\r\n function deployRedeemTemplate() public override {\r\n redeemTemplate = RedeemTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a cloned instance of the template Redeem contract.\r\n * @param optionToken The address of the option token which this redeem clone will be paired with.\r\n * @return redeemAddress The address of the deployed Redeem token clone.\r\n */\r\n function deployClone(address optionToken)\r\n external\r\n override\r\n onlyOwner\r\n returns (address)\r\n {\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n RedeemTemplateLib.REDEEM_SALT(),\r\n owner(),\r\n optionToken\r\n )\r\n );\r\n address redeemAddress = CloneLib.create2Clone(\r\n redeemTemplate,\r\n uint256(salt)\r\n );\r\n Redeem(redeemAddress).initialize(owner(), optionToken);\r\n return redeemAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Redeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Redeem Token\r\n * @notice A token that is redeemable for it's paird option token's assets.\r\n * @author Primitive\r\n */\r\n\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Redeem is IRedeem, ERC20 {\r\n using SafeMath for uint256;\r\n\r\n address public override factory;\r\n address public override optionToken;\r\n\r\n string public constant name = \"Primitive V1 Redeem\";\r\n string public constant symbol = \"RDM\";\r\n uint8 public constant decimals = 18;\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the initial state for the redeem token. Called only once and immediately after deployment.\r\n * @param factory_ The address of the factory contract which handles the deployment.\r\n * @param optionToken_ The address of the option token which this redeem token will be paired with.\r\n */\r\n function initialize(address factory_, address optionToken_)\r\n public\r\n override\r\n {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n factory = factory_;\r\n optionToken = optionToken_;\r\n }\r\n\r\n /**\r\n * @dev Mints redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to mint redeem tokens to.\r\n * @param amount The quantity of redeem tokens to mint.\r\n */\r\n function mint(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _mint(to, amount);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to burn redeem tokens from.\r\n * @param amount The quantity of redeem tokens to burn.\r\n */\r\n function burn(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _burn(to, amount);\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/RedeemTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Redeem } from \"../primitives/Redeem.sol\";\r\n\r\nlibrary RedeemTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _REDEEM_SALT = 0xe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e2; // keccak(\"primitive-redeem\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function REDEEM_SALT() internal pure returns (bytes32) {\r\n return _REDEEM_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Redeem.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Redeem).creationCode;\r\n implementationAddress = Create2.deploy(0, _REDEEM_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRedeemFactory {\r\n function deployClone(address optionToken) external returns (address);\r\n\r\n function deployRedeemTemplate() external;\r\n\r\n function redeemTemplate() external returns (address);\r\n}\r\n" + }, + "contracts/option/applications/Registry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Registry Contract for Deployed Options.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../interfaces/IRegistry.sol\";\r\nimport { IOptionFactory } from \"../interfaces/IOptionFactory.sol\";\r\nimport { IRedeemFactory } from \"../interfaces/IRedeemFactory.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { Pausable } from \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Registry is IRegistry, Ownable, Pausable, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address public override optionFactory;\r\n address public override redeemFactory;\r\n\r\n mapping(address => bool) private verifiedTokens;\r\n mapping(uint256 => bool) private verifiedExpiries;\r\n address[] public allOptionClones;\r\n\r\n event UpdatedOptionFactory(address indexed optionFactory_);\r\n event UpdatedRedeemFactory(address indexed redeemFactory_);\r\n event VerifiedToken(address indexed token);\r\n event VerifiedExpiry(uint256 expiry);\r\n event UnverifiedToken(address indexed token);\r\n event UnverifiedExpiry(uint256 expiry);\r\n event DeployedOptionClone(\r\n address indexed from,\r\n address indexed optionAddress,\r\n address indexed redeemAddress\r\n );\r\n\r\n constructor() public {\r\n transferOwnership(msg.sender);\r\n }\r\n\r\n /**\r\n * @dev Pauses the deployOption function.\r\n */\r\n function pauseDeployments() external override onlyOwner {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @dev Unpauses the deployOption function.\r\n */\r\n function unpauseDeployments() external override onlyOwner {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @dev Sets the option factory contract to use for deploying clones.\r\n * @param optionFactory_ The address of the option factory.\r\n */\r\n function setOptionFactory(address optionFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n optionFactory = optionFactory_;\r\n emit UpdatedOptionFactory(optionFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the redeem factory contract to use for deploying clones.\r\n * @param redeemFactory_ The address of the redeem factory.\r\n */\r\n function setRedeemFactory(address redeemFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n redeemFactory = redeemFactory_;\r\n emit UpdatedRedeemFactory(redeemFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets an ERC-20 token verification status to true.\r\n * @notice A \"verified\" token is a standard ERC-20 token that we have tested with the option contract.\r\n * An example of an \"unverified\" token is a non-standard ERC-20 token which has not been tested.\r\n */\r\n function verifyToken(address tokenAddress) external override onlyOwner {\r\n require(tokenAddress != address(0x0), \"ERR_ZERO_ADDRESS\");\r\n verifiedTokens[tokenAddress] = true;\r\n emit VerifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets a verified token's verification status to false.\r\n */\r\n function unverifyToken(address tokenAddress) external override onlyOwner {\r\n verifiedTokens[tokenAddress] = false;\r\n emit UnverifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to true.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function verifyExpiry(uint256 expiry) external override onlyOwner {\r\n require(expiry >= now, \"ERR_EXPIRED_TIMESTAMP\");\r\n verifiedExpiries[expiry] = true;\r\n emit VerifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to false.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function unverifyExpiry(uint256 expiry) external override onlyOwner {\r\n verifiedExpiries[expiry] = false;\r\n emit UnverifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Deploys an option contract clone with create2.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the deployed option clone.\r\n */\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override nonReentrant whenNotPaused returns (address) {\r\n // Validation checks for option parameters.\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= now, \"ERR_EXPIRY\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(\r\n underlyingToken != address(0x0) && strikeToken != address(0x0),\r\n \"ERR_ZERO_ADDRESS\"\r\n );\r\n\r\n // Deploy option and redeem contract clones.\r\n address optionAddress = IOptionFactory(optionFactory).deployClone(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n address redeemAddress = IRedeemFactory(redeemFactory).deployClone(\r\n optionAddress\r\n );\r\n\r\n // Add the clone to the allOptionClones address array.\r\n allOptionClones.push(optionAddress);\r\n\r\n // Initialize the new option contract's paired redeem token.\r\n IOptionFactory(optionFactory).initRedeemToken(\r\n optionAddress,\r\n redeemAddress\r\n );\r\n emit DeployedOptionClone(msg.sender, optionAddress, redeemAddress);\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Calculates the option address deployed with create2 using the parameter arguments.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = IOptionFactory(optionFactory)\r\n .calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Checks an option address to see if it has verified assets and expiry time.\r\n * @param optionAddress The address of the option token.\r\n * @return bool If the option has verified underlying and strike tokens, and expiry time.\r\n */\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n override\r\n view\r\n returns (bool)\r\n {\r\n IOption option = IOption(optionAddress);\r\n address underlyingToken = option.getUnderlyingTokenAddress();\r\n address strikeToken = option.getStrikeTokenAddress();\r\n uint256 expiry = option.getExpiryTime();\r\n bool verifiedUnderlying = isVerifiedToken(underlyingToken);\r\n bool verifiedStrike = isVerifiedToken(strikeToken);\r\n bool verifiedExpiry = isVerifiedExpiry(expiry);\r\n return verifiedUnderlying && verifiedStrike && verifiedExpiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the length of the allOptionClones address array.\r\n */\r\n function getAllOptionClonesLength() public view returns (uint256) {\r\n return allOptionClones.length;\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedTokens private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedToken(address tokenAddress) public view returns (bool) {\r\n return verifiedTokens[tokenAddress];\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedExpiries private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedExpiry(uint256 expiry) public view returns (bool) {\r\n return verifiedExpiries[expiry];\r\n }\r\n\r\n /**\r\n * @dev Gets the option address and returns address zero if not yet deployed.\r\n * @notice Will calculate the option address using the parameter arguments.\r\n * Checks the code size of the address to see if the contract has been deployed yet.\r\n * If contract has not been deployed, returns address zero.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n uint32 size = checkCodeSize(optionAddress);\r\n if (size > 0) {\r\n return optionAddress;\r\n } else {\r\n return address(0x0);\r\n }\r\n }\r\n\r\n /**\r\n * @dev Checks the code size of a target address and returns the uint32 size.\r\n * @param target The address to check code size.\r\n */\r\n function checkCodeSize(address target) private view returns (uint32) {\r\n uint32 size;\r\n assembly {\r\n size := extcodesize(target)\r\n }\r\n return size;\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRegistry {\r\n function pauseDeployments() external;\r\n\r\n function unpauseDeployments() external;\r\n\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function setOptionFactory(address optionFactory_) external;\r\n\r\n function setRedeemFactory(address redeemFactory_) external;\r\n\r\n function optionFactory() external returns (address);\r\n\r\n function redeemFactory() external returns (address);\r\n\r\n function verifyToken(address tokenAddress) external;\r\n\r\n function verifyExpiry(uint256 expiry) external;\r\n\r\n function unverifyToken(address tokenAddress) external;\r\n\r\n function unverifyExpiry(uint256 expiry) external;\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n view\r\n returns (bool);\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Pausable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\ncontract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor () internal {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n */\n modifier whenNotPaused() {\n require(!_paused, \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n */\n modifier whenPaused() {\n require(_paused, \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "contracts/option/extensions/Trader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Trader\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { ITrader } from \"../interfaces/ITrader.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { TraderLib } from \"../libraries/TraderLib.sol\";\r\n\r\ncontract Trader is ITrader, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address payable public weth;\r\n\r\n event TraderMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event TraderExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event TraderRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event TraderClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event TraderUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n constructor(address payable _weth) public {\r\n weth = _weth;\r\n }\r\n\r\n /**\r\n * @dev Mint options at a 1:1 ratio with deposited underlying tokens.\r\n * @notice Also mints redeems at a strike ratio to the deposited underlyings.\r\n * Warning: Calls msg.sender with safeTransferFrom.\r\n * @param optionToken The address of the option contract.\r\n * @param mintQuantity Quantity of options to mint and underlyingToken to deposit.\r\n * @param receiver The newly minted options and redeems are sent to the receiver address.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n mintQuantity,\r\n receiver\r\n );\r\n emit TraderMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 inStrikes, uint256 inOptions) = TraderLib.safeExercise(\r\n optionToken,\r\n exerciseQuantity,\r\n receiver\r\n );\r\n emit TraderExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inStrikes\r\n );\r\n\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inRedeems = outStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256) {\r\n uint256 inRedeems = TraderLib.safeRedeem(\r\n optionToken,\r\n redeemQuantity,\r\n receiver\r\n );\r\n emit TraderRedeem(msg.sender, address(optionToken), inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inOptions = inRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeClose(optionToken, closeQuantity, receiver);\r\n emit TraderClose(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens and redeemTokens are sent to the receiver address.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeUnwind(optionToken, unwindQuantity, receiver);\r\n emit TraderUnwind(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "contracts/test/Flash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Test Flash Exercise contract\r\n * @author Primitive\r\n */\r\n\r\n/**\r\n * A flash exercise is initiated by the exerciseOptions() function in the Option.sol contract.\r\n * Warning: Only correctly implemented wrapper smart contracts can safely execute these flash features.\r\n * Underlying tokens will be sent to the msg.sender of the exerciseOptions() call first.\r\n * The msg.sender should be a smart contract that implements the IFlash interface, which has a single\r\n * function: primitiveFlash().\r\n * The callback function primitiveFlash() can be triggered by passing in any arbritrary data to the\r\n * exerciseOptions() function. If the length of the data is greater than 0, it triggers the callback.\r\n * The implemented primitiveFlash() callback is where customized operations can be undertaken using the\r\n * underlying tokens received from the flash exercise.\r\n * After the callback function (whether its called or not), the exerciseOptions() function checks to see\r\n * if it has been paid the correct amount of strike and option tokens (an actual exercise of the option),\r\n * or if it has received the same quantity of underlying tokens back (a flash loan).\r\n */\r\n\r\nimport { IOption } from \"../option/interfaces/IOption.sol\";\r\nimport { IFlash } from \"../option/interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\n\r\ncontract Flash is IFlash {\r\n using SafeMath for uint256;\r\n\r\n address public optionToken;\r\n\r\n event FlashExercise(address indexed from);\r\n\r\n constructor(address _optionToken) public {\r\n optionToken = _optionToken;\r\n }\r\n\r\n function goodFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(1)\r\n );\r\n }\r\n\r\n function badFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n // bytes(2) will cause our implemented flash exercise to fail\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(2)\r\n );\r\n }\r\n\r\n /**\r\n * @dev An implemented primitiveFlash callback function that matches the interface in Option.sol.\r\n * @notice Calling the exerciseOptions() function in the Option contract will trigger this callback function.\r\n * @param receiver The account which receives the underlying tokens.\r\n * @param outUnderlyings The quantity of underlying tokens received as a flash loan.\r\n * @param data Any data that will be passed as an argument to the original exerciseOptions() call.\r\n */\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override {\r\n // Get the underlying token address.\r\n address underlyingToken = IOption(optionToken)\r\n .getUnderlyingTokenAddress();\r\n // In our test case we pass in the data param with bytes(1).\r\n bool good = keccak256(abi.encodePacked(data)) ==\r\n keccak256(abi.encodePacked(new bytes(1)));\r\n // If the flash exercise went through, we return the loaned underlyings.\r\n if (good) {\r\n IERC20(underlyingToken).transfer(optionToken, outUnderlyings);\r\n }\r\n emit FlashExercise(receiver);\r\n }\r\n}\r\n" + }, + "contracts/test/OptionTest.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Option test contract.\r\n * @author Primitive\r\n */\r\n\r\nimport \"../option/primitives/Option.sol\";\r\n\r\ncontract OptionTest is Option {\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public Option() {}\r\n\r\n function setExpiry(uint256 expiry) public {\r\n optionParameters.expiry = expiry;\r\n }\r\n\r\n function setRedeemToken(address redeem) public {\r\n redeemToken = redeem;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/BadERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\ninterface IERC20 {\r\n function totalSupply() external view returns (uint256);\r\n\r\n function balanceOf(address account) external view returns (uint256);\r\n\r\n function transfer(address recipient, uint256 amount) external;\r\n\r\n function allowance(address owner, address spender)\r\n external\r\n view\r\n returns (uint256);\r\n\r\n function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) external;\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\ncontract BadERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n string private _name;\r\n string private _symbol;\r\n uint8 private _decimals;\r\n\r\n constructor(string memory name, string memory symbol) public {\r\n _name = name;\r\n _symbol = symbol;\r\n _decimals = 18;\r\n }\r\n\r\n function name() public view returns (string memory) {\r\n return _name;\r\n }\r\n\r\n function symbol() public view returns (string memory) {\r\n return _symbol;\r\n }\r\n\r\n function decimals() public view returns (uint8) {\r\n return _decimals;\r\n }\r\n\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n }\r\n\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n function mint(address account, uint256 amount) public {\r\n _mint(account, amount);\r\n }\r\n\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n }\r\n\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n }\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {\r\n // do nothing\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract TestERC20 is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/USDC.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract USDC is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/WETH9.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\n// Copyright (C) 2015, 2016, 2017 Dapphub\r\n\r\n// This program is free software: you can redistribute it and/or modify\r\n// it under the terms of the GNU General Public License as published by\r\n// the Free Software Foundation, either version 3 of the License, or\r\n// (at your option) any later version.\r\n\r\n// This program is distributed in the hope that it will be useful,\r\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n// GNU General Public License for more details.\r\n\r\n// You should have received a copy of the GNU General Public License\r\n// along with this program. If not, see .\r\n\r\npragma solidity ^0.6.2;\r\n\r\ncontract WETH9 {\r\n string public name = \"Wrapped Ether\";\r\n string public symbol = \"WETH\";\r\n uint8 public decimals = 18;\r\n\r\n event Approval(address indexed src, address indexed guy, uint256 wad);\r\n event Transfer(address indexed src, address indexed dst, uint256 wad);\r\n event Deposit(address indexed dst, uint256 wad);\r\n event Withdrawal(address indexed src, uint256 wad);\r\n\r\n mapping(address => uint256) public balanceOf;\r\n mapping(address => mapping(address => uint256)) public allowance;\r\n\r\n /* function() external payable {\r\n deposit();\r\n } */\r\n function deposit() public payable {\r\n balanceOf[msg.sender] += msg.value;\r\n emit Deposit(msg.sender, msg.value);\r\n }\r\n\r\n function withdraw(uint256 wad) public {\r\n require(balanceOf[msg.sender] >= wad);\r\n balanceOf[msg.sender] -= wad;\r\n msg.sender.transfer(wad);\r\n emit Withdrawal(msg.sender, wad);\r\n }\r\n\r\n function totalSupply() public view returns (uint256) {\r\n return address(this).balance;\r\n }\r\n\r\n function approve(address guy, uint256 wad) public returns (bool) {\r\n allowance[msg.sender][guy] = wad;\r\n emit Approval(msg.sender, guy, wad);\r\n return true;\r\n }\r\n\r\n function transfer(address dst, uint256 wad) public returns (bool) {\r\n return transferFrom(msg.sender, dst, wad);\r\n }\r\n\r\n function transferFrom(\r\n address src,\r\n address dst,\r\n uint256 wad\r\n ) public returns (bool) {\r\n require(balanceOf[src] >= wad);\r\n\r\n if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) {\r\n require(allowance[src][msg.sender] >= wad);\r\n allowance[src][msg.sender] -= wad;\r\n }\r\n\r\n balanceOf[src] -= wad;\r\n balanceOf[dst] += wad;\r\n\r\n emit Transfer(src, dst, wad);\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/*\r\n GNU GENERAL PUBLIC LICENSE\r\n Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. \r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n Preamble\r\n\r\n The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works. By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users. We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors. You can apply it to\r\nyour programs, too.\r\n\r\n When we speak of free software, we are referring to freedom, not\r\nprice. Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights. Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received. You must make sure that they, too, receive\r\nor can get the source code. And you must show them these terms so they\r\nknow their rights.\r\n\r\n Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software. For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so. This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software. The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable. Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts. If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary. To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n TERMS AND CONDITIONS\r\n\r\n 0. Definitions.\r\n\r\n \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n \"The Program\" refers to any copyrightable work licensed under this\r\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy. The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy. Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies. Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License. If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n 1. Source Code.\r\n\r\n The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it. \"Object code\" means any non-source\r\nform of a work.\r\n\r\n A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form. A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities. However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work. For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n 2. Basic Permissions.\r\n\r\n All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met. This License explicitly affirms your unlimited\r\npermission to run the unmodified Program. The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work. This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force. You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright. Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below. Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n 4. Conveying Verbatim Copies.\r\n\r\n You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n 5. Conveying Modified Source Versions.\r\n\r\n You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n a) The work must carry prominent notices stating that you modified\r\n it, and giving a relevant date.\r\n\r\n b) The work must carry prominent notices stating that it is\r\n released under this License and any conditions added under section\r\n 7. This requirement modifies the requirement in section 4 to\r\n \"keep intact all notices\".\r\n\r\n c) You must license the entire work, as a whole, under this\r\n License to anyone who comes into possession of a copy. This\r\n License will therefore apply, along with any applicable section 7\r\n additional terms, to the whole of the work, and all its parts,\r\n regardless of how they are packaged. This License gives no\r\n permission to license the work in any other way, but it does not\r\n invalidate such permission if you have separately received it.\r\n\r\n d) If the work has interactive user interfaces, each must display\r\n Appropriate Legal Notices; however, if the Program has interactive\r\n interfaces that do not display Appropriate Legal Notices, your\r\n work need not make them do so.\r\n\r\n A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit. Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n 6. Conveying Non-Source Forms.\r\n\r\n You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n a) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by the\r\n Corresponding Source fixed on a durable physical medium\r\n customarily used for software interchange.\r\n\r\n b) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by a\r\n written offer, valid for at least three years and valid for as\r\n long as you offer spare parts or customer support for that product\r\n model, to give anyone who possesses the object code either (1) a\r\n copy of the Corresponding Source for all the software in the\r\n product that is covered by this License, on a durable physical\r\n medium customarily used for software interchange, for a price no\r\n more than your reasonable cost of physically performing this\r\n conveying of source, or (2) access to copy the\r\n Corresponding Source from a network server at no charge.\r\n\r\n c) Convey individual copies of the object code with a copy of the\r\n written offer to provide the Corresponding Source. This\r\n alternative is allowed only occasionally and noncommercially, and\r\n only if you received the object code with such an offer, in accord\r\n with subsection 6b.\r\n\r\n d) Convey the object code by offering access from a designated\r\n place (gratis or for a charge), and offer equivalent access to the\r\n Corresponding Source in the same way through the same place at no\r\n further charge. You need not require recipients to copy the\r\n Corresponding Source along with the object code. If the place to\r\n copy the object code is a network server, the Corresponding Source\r\n may be on a different server (operated by you or a third party)\r\n that supports equivalent copying facilities, provided you maintain\r\n clear directions next to the object code saying where to find the\r\n Corresponding Source. Regardless of what server hosts the\r\n Corresponding Source, you remain obligated to ensure that it is\r\n available for as long as needed to satisfy these requirements.\r\n\r\n e) Convey the object code using peer-to-peer transmission, provided\r\n you inform other peers where the object code and Corresponding\r\n Source of the work are being offered to the general public at no\r\n charge under subsection 6d.\r\n\r\n A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling. In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage. For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product. A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source. The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information. But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed. Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n 7. Additional Terms.\r\n\r\n \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law. If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit. (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.) You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n a) Disclaiming warranty or limiting liability differently from the\r\n terms of sections 15 and 16 of this License; or\r\n\r\n b) Requiring preservation of specified reasonable legal notices or\r\n author attributions in that material or in the Appropriate Legal\r\n Notices displayed by works containing it; or\r\n\r\n c) Prohibiting misrepresentation of the origin of that material, or\r\n requiring that modified versions of such material be marked in\r\n reasonable ways as different from the original version; or\r\n\r\n d) Limiting the use for publicity purposes of names of licensors or\r\n authors of the material; or\r\n\r\n e) Declining to grant rights under trademark law for use of some\r\n trade names, trademarks, or service marks; or\r\n\r\n f) Requiring indemnification of licensors and authors of that\r\n material by anyone who conveys the material (or modified versions of\r\n it) with contractual assumptions of liability to the recipient, for\r\n any liability that these contractual assumptions directly impose on\r\n those licensors and authors.\r\n\r\n All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10. If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term. If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n 8. Termination.\r\n\r\n You may not propagate or modify a covered work except as expressly\r\nprovided under this License. Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License. If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n 9. Acceptance Not Required for Having Copies.\r\n\r\n You are not required to accept this License in order to receive or\r\nrun a copy of the Program. Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance. However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work. These actions infringe copyright if you do\r\nnot accept this License. Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n 10. Automatic Licensing of Downstream Recipients.\r\n\r\n Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License. You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations. If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License. For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n 11. Patents.\r\n\r\n A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based. The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version. For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement). To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients. \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License. You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n 12. No Surrender of Others' Freedom.\r\n\r\n If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License. If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all. For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n 13. Use with the GNU Affero General Public License.\r\n\r\n Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work. The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n 14. Revised Versions of this License.\r\n\r\n The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time. Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n Each version is given a distinguishing version number. If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation. If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n Later license versions may give you additional or different\r\npermissions. However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n 15. Disclaimer of Warranty.\r\n\r\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n 16. Limitation of Liability.\r\n\r\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n 17. Interpretation of Sections 15 and 16.\r\n\r\n If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n END OF TERMS AND CONDITIONS\r\n\r\n How to Apply These Terms to Your New Programs\r\n\r\n If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n To do so, attach the following notices to the program. It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n \r\n Copyright (C) \r\n\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU General Public License as published by\r\n the Free Software Foundation, either version 3 of the License, or\r\n (at your option) any later version.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n GNU General Public License for more details.\r\n\r\n You should have received a copy of the GNU General Public License\r\n along with this program. If not, see .\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n Copyright (C) \r\n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n This is free software, and you are welcome to redistribute it\r\n under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License. Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n.\r\n\r\n The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs. If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library. If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License. But first, please read\r\n.\r\n\r\n*/\r\n" + } + }, + "settings": { + "metadata": { + "useLiteralContent": false + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "id", + "ast" + ] + } + } + } +} \ No newline at end of file From 7dc7a0e6a21b7b4226208d72cd8fde81100b0e5c Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 18:40:37 -0700 Subject: [PATCH 17/20] Improved tests for minting, and add liquidity. --- artifacts/UniswapConnector02.json | 4 +- artifacts/UniswapConnectorLib02.json | 4 +- artifacts/WethConnector01.json | 4 +- artifacts/WethConnectorLib01.json | 4 +- .../Uniswap/UniswapConnectorLib02.sol | 2 +- deploy/4_deloy_weth_connector.js | 4 +- test/lib/setup.js | 6 +- test/lib/utils.js | 6 + test/{test_flash.js => test_flash.spec.js} | 0 test/{test_option.js => test_option.spec.js} | 0 test/{test_trader.js => test_trader.spec.js} | 0 ...onnector.js => test_uni_connector.spec.js} | 279 +++++++++++++++--- ...st_uni_flash.js => test_uni_flash.spec.js} | 0 ...nnector.js => test_weth_connector.spec.js} | 0 14 files changed, 252 insertions(+), 61 deletions(-) rename test/{test_flash.js => test_flash.spec.js} (100%) rename test/{test_option.js => test_option.spec.js} (100%) rename test/{test_trader.js => test_trader.spec.js} (100%) rename test/{test_uni_connector.js => test_uni_connector.spec.js} (73%) rename test/{test_uni_flash.js => test_uni_flash.spec.js} (100%) rename test/{test_weth_connector.js => test_weth_connector.spec.js} (100%) diff --git a/artifacts/UniswapConnector02.json b/artifacts/UniswapConnector02.json index 49d257c3..61ecfcfe 100644 --- a/artifacts/UniswapConnector02.json +++ b/artifacts/UniswapConnector02.json @@ -579,8 +579,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50604051620053dc380380620053dc833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050614ffe80620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a2954fdd90c6910a5e29b837422d1dd174bb7e5ebbdbc408aa14f498f7c5932b64736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a2954fdd90c6910a5e29b837422d1dd174bb7e5ebbdbc408aa14f498f7c5932b64736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620053dc380380620053dc833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050614ffe80620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122001a0894ea095495335a17ebbd5ff41b7025267cd78633c68d6344be6eca5b36764736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122001a0894ea095495335a17ebbd5ff41b7025267cd78633c68d6344be6eca5b36764736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/UniswapConnectorLib02.json b/artifacts/UniswapConnectorLib02.json index 6e4a4cb8..76787e87 100644 --- a/artifacts/UniswapConnectorLib02.json +++ b/artifacts/UniswapConnectorLib02.json @@ -1,8 +1,8 @@ { "contractName": "UniswapConnectorLib02", "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bf614cc7bcb1a2b76d32de932923f9d82c7c41089638ba6f313e96634dbacbbe64736f6c63430006020033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bf614cc7bcb1a2b76d32de932923f9d82c7c41089638ba6f313e96634dbacbbe64736f6c63430006020033", + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122089b4f5b941bb664b70ec41fcef9baf311b92dff65dba143dbe2527cd7269e76f64736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122089b4f5b941bb664b70ec41fcef9baf311b92dff65dba143dbe2527cd7269e76f64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/WethConnector01.json b/artifacts/WethConnector01.json index 01aac67e..785240ac 100644 --- a/artifacts/WethConnector01.json +++ b/artifacts/WethConnector01.json @@ -392,8 +392,8 @@ "type": "receive" } ], - "bytecode": "0x608060405234801561001057600080fd5b50604051613c89380380613c898339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613bda806100af6000396000f3fe60806040526004361061008a5760003560e01c80636ba17e7a116100595780636ba17e7a146102a25780636db8ce241461033f57806380e42f8e146103d55780638549780b14610454578063c9c9163e146104d3576100e8565b80630d8e6e2c146100ed57806317d7de7c1461011e5780633fc8cef3146101ae57806350e2f0ba14610205576100e8565b366100e857600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100e657fe5b005b600080fd5b3480156100f957600080fd5b50610102610562565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b5061013361056b565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610173578082015181840152602081019050610158565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ba57600080fd5b506101c36105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021157600080fd5b5061027e6004803603606081101561022857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102ae57600080fd5b5061031b600480360360608110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b3565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561034b57600080fd5b506103b86004803603606081101561036257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610998565b604051808381526020018281526020019250505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7a565b604051808381526020018281526020019250505060405180910390f35b6104b66004803603604081101561046a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b604051808381526020018281526020019250505060405180910390f35b3480156104df57600080fd5b5061054c600480360360608110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3a565b6040518082815260200191505060405180910390f35b60006001905090565b60606040518060400160405280601a81526020017f5072696d6974697665563157657468436f6e6e6563746f723031000000000000815250905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806000610718600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61110b565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006108fd600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b611889565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16610a1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ade600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611fa2565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610bfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610c8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610cbf600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612738565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610e9f600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612cef565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550826000811161104e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600061107e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612f75565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008460008111611187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156111cf57600080fd5b505afa1580156111e3573d6000803e3d6000fd5b505050506040513d60208110156111f957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b810190808051906020019092919050505010156113da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006115008973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b81019080805190602001909291905050506114f28b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a857600080fd5b505afa1580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154957600080fd5b505afa15801561155d573d6000803e3d6000fd5b505050506040513d602081101561157357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561160057600080fd5b505afa158015611614573d6000803e3d6000fd5b505050506040513d602081101561162a57600080fd5b810190808051906020019092919050505010156116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61175c338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116fb57600080fd5b505afa15801561170f573d6000803e3d6000fd5b505050506040513d602081101561172557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b611789338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d606081101561183557600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506118718c8a8c613588565b82828297509750975050505050509450945094915050565b60008060008460008111611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b810190808051906020019092919050505010611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611c468973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6b57600080fd5b505afa158015611b7f573d6000803e3d6000fd5b505050506040513d6020811015611b9557600080fd5b8101908080519060200190929190505050611c388b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bee57600080fd5b505afa158015611c02573d6000803e3d6000fd5b505050506040513d6020811015611c1857600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d4657600080fd5b505afa158015611d5a573d6000803e3d6000fd5b505050506040513d6020811015611d7057600080fd5b81019080805190602001909291905050501015611df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611ea2338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e4157600080fd5b505afa158015611e55573d6000803e3d6000fd5b505050506040513d6020811015611e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611f2457600080fd5b505af1158015611f38573d6000803e3d6000fd5b505050506040513d6060811015611f4e57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611f8a8c8a8c613588565b82828297509750975050505050509450945094915050565b600080836000811161201c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561206457600080fd5b505afa158015612078573d6000803e3d6000fd5b505050506040513d602081101561208e57600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561224557600080fd5b505afa158015612259573d6000803e3d6000fd5b505050506040513d602081101561226f57600080fd5b810190808051906020019092919050505010156122f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b600061241a8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561233f57600080fd5b505afa158015612353573d6000803e3d6000fd5b505050506040513d602081101561236957600080fd5b810190808051906020019092919050505061240c8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123c257600080fd5b505afa1580156123d6573d6000803e3d6000fd5b505050506040513d60208110156123ec57600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561249a57600080fd5b505afa1580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b81019080805190602001909291905050501015612549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612576338a838573ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6125a3338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156125f75781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561267f578082015181840152602081019050612664565b50505050905090810190601f1680156126ac5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156126cc57600080fd5b505af11580156126e0573d6000803e3d6000fd5b505050506040513d60408110156126f657600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506127248b898b613588565b818196509650505050505094509492505050565b60008034600081116127b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156127fa57600080fd5b505afa15801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60003490506000612a038873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561292757600080fd5b505afa15801561293b573d6000803e3d6000fd5b505050506040513d602081101561295157600080fd5b81019080805190602001909291905050506129f58a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ab57600080fd5b505afa1580156129bf573d6000803e3d6000fd5b505050506040513d60208110156129d557600080fd5b8101908080519060200190929190505050856133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a8357600080fd5b505afa158015612a97573d6000803e3d6000fd5b505050506040513d6020811015612aad57600080fd5b81019080805190602001909291905050501015612b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612b3c89896136d5565b612b693389838b73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612bbb5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c43578082015181840152602081019050612c28565b50505050905090810190601f168015612c705780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612c9057600080fd5b505af1158015612ca4573d6000803e3d6000fd5b505050506040513d6040811015612cba57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612d69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d6020811015612ddb57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612e9987876136d5565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1a57600080fd5b505af1158015612f2e573d6000803e3d6000fd5b505050506040513d6040811015612f4457600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561303657600080fd5b505afa15801561304a573d6000803e3d6000fd5b505050506040513d602081101561306057600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315c57600080fd5b505afa158015613170573d6000803e3d6000fd5b505050506040513d602081101561318657600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561321757600080fd5b505afa15801561322b573d6000803e3d6000fd5b505050506040513d602081101561324157600080fd5b810190808051906020019092919050505010156132c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6132f33388888473ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505090506133bc898789613588565b80945050505050949350505050565b6000808314156133de576000905061344b565b60008284029050828482816133ef57fe5b0414613446576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613b5a6021913960400191505060405180910390fd5b809150505b92915050565b600061349383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506137fd565b905092915050565b613582846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506138c3565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135db57600080fd5b505af11580156135ef573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613653576040519150601f19603f3d011682016040523d82523d6000602084013e613658565b606091505b50509050806136cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561371d57600080fd5b505af1158015613731573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b505050506040513d60208110156137e757600080fd5b8101908080519060200190929190505050505050565b600080831182906138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561386e578082015181840152602081019050613853565b50505050905090810190601f16801561389b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138b557fe5b049050809150509392505050565b6138e28273ffffffffffffffffffffffffffffffffffffffff16613b0e565b613954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106139a35780518252602082019150602081019050602083039250613980565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a05576040519150601f19603f3d011682016040523d82523d6000602084013e613a0a565b606091505b509150915081613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115613b0857808060200190516020811015613aa157600080fd5b8101908080519060200190929190505050613b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613b7b602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613b5057506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206c30d054d8c296b4f1365fb04c5a3c5d5ebcaadb63abc0129128ccc0a91a2b3864736f6c63430006020033", - "deployedBytecode": "0x60806040526004361061008a5760003560e01c80636ba17e7a116100595780636ba17e7a146102a25780636db8ce241461033f57806380e42f8e146103d55780638549780b14610454578063c9c9163e146104d3576100e8565b80630d8e6e2c146100ed57806317d7de7c1461011e5780633fc8cef3146101ae57806350e2f0ba14610205576100e8565b366100e857600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100e657fe5b005b600080fd5b3480156100f957600080fd5b50610102610562565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b5061013361056b565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610173578082015181840152602081019050610158565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ba57600080fd5b506101c36105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021157600080fd5b5061027e6004803603606081101561022857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102ae57600080fd5b5061031b600480360360608110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b3565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561034b57600080fd5b506103b86004803603606081101561036257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610998565b604051808381526020018281526020019250505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7a565b604051808381526020018281526020019250505060405180910390f35b6104b66004803603604081101561046a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b604051808381526020018281526020019250505060405180910390f35b3480156104df57600080fd5b5061054c600480360360608110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3a565b6040518082815260200191505060405180910390f35b60006001905090565b60606040518060400160405280601a81526020017f5072696d6974697665563157657468436f6e6e6563746f723031000000000000815250905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806000610718600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61110b565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006108fd600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b611889565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16610a1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ade600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611fa2565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610bfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610c8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610cbf600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612738565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610e9f600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612cef565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550826000811161104e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600061107e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612f75565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008460008111611187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156111cf57600080fd5b505afa1580156111e3573d6000803e3d6000fd5b505050506040513d60208110156111f957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b810190808051906020019092919050505010156113da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006115008973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b81019080805190602001909291905050506114f28b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a857600080fd5b505afa1580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154957600080fd5b505afa15801561155d573d6000803e3d6000fd5b505050506040513d602081101561157357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561160057600080fd5b505afa158015611614573d6000803e3d6000fd5b505050506040513d602081101561162a57600080fd5b810190808051906020019092919050505010156116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61175c338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116fb57600080fd5b505afa15801561170f573d6000803e3d6000fd5b505050506040513d602081101561172557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b611789338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d606081101561183557600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506118718c8a8c613588565b82828297509750975050505050509450945094915050565b60008060008460008111611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b810190808051906020019092919050505010611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611c468973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6b57600080fd5b505afa158015611b7f573d6000803e3d6000fd5b505050506040513d6020811015611b9557600080fd5b8101908080519060200190929190505050611c388b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bee57600080fd5b505afa158015611c02573d6000803e3d6000fd5b505050506040513d6020811015611c1857600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d4657600080fd5b505afa158015611d5a573d6000803e3d6000fd5b505050506040513d6020811015611d7057600080fd5b81019080805190602001909291905050501015611df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611ea2338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e4157600080fd5b505afa158015611e55573d6000803e3d6000fd5b505050506040513d6020811015611e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611f2457600080fd5b505af1158015611f38573d6000803e3d6000fd5b505050506040513d6060811015611f4e57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611f8a8c8a8c613588565b82828297509750975050505050509450945094915050565b600080836000811161201c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561206457600080fd5b505afa158015612078573d6000803e3d6000fd5b505050506040513d602081101561208e57600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561224557600080fd5b505afa158015612259573d6000803e3d6000fd5b505050506040513d602081101561226f57600080fd5b810190808051906020019092919050505010156122f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b600061241a8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561233f57600080fd5b505afa158015612353573d6000803e3d6000fd5b505050506040513d602081101561236957600080fd5b810190808051906020019092919050505061240c8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123c257600080fd5b505afa1580156123d6573d6000803e3d6000fd5b505050506040513d60208110156123ec57600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561249a57600080fd5b505afa1580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b81019080805190602001909291905050501015612549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612576338a838573ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6125a3338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156125f75781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561267f578082015181840152602081019050612664565b50505050905090810190601f1680156126ac5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156126cc57600080fd5b505af11580156126e0573d6000803e3d6000fd5b505050506040513d60408110156126f657600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506127248b898b613588565b818196509650505050505094509492505050565b60008034600081116127b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156127fa57600080fd5b505afa15801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60003490506000612a038873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561292757600080fd5b505afa15801561293b573d6000803e3d6000fd5b505050506040513d602081101561295157600080fd5b81019080805190602001909291905050506129f58a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ab57600080fd5b505afa1580156129bf573d6000803e3d6000fd5b505050506040513d60208110156129d557600080fd5b8101908080519060200190929190505050856133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a8357600080fd5b505afa158015612a97573d6000803e3d6000fd5b505050506040513d6020811015612aad57600080fd5b81019080805190602001909291905050501015612b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612b3c89896136d5565b612b693389838b73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612bbb5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c43578082015181840152602081019050612c28565b50505050905090810190601f168015612c705780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612c9057600080fd5b505af1158015612ca4573d6000803e3d6000fd5b505050506040513d6040811015612cba57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612d69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d6020811015612ddb57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612e9987876136d5565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1a57600080fd5b505af1158015612f2e573d6000803e3d6000fd5b505050506040513d6040811015612f4457600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561303657600080fd5b505afa15801561304a573d6000803e3d6000fd5b505050506040513d602081101561306057600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315c57600080fd5b505afa158015613170573d6000803e3d6000fd5b505050506040513d602081101561318657600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561321757600080fd5b505afa15801561322b573d6000803e3d6000fd5b505050506040513d602081101561324157600080fd5b810190808051906020019092919050505010156132c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6132f33388888473ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505090506133bc898789613588565b80945050505050949350505050565b6000808314156133de576000905061344b565b60008284029050828482816133ef57fe5b0414613446576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613b5a6021913960400191505060405180910390fd5b809150505b92915050565b600061349383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506137fd565b905092915050565b613582846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506138c3565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135db57600080fd5b505af11580156135ef573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613653576040519150601f19603f3d011682016040523d82523d6000602084013e613658565b606091505b50509050806136cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561371d57600080fd5b505af1158015613731573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b505050506040513d60208110156137e757600080fd5b8101908080519060200190929190505050505050565b600080831182906138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561386e578082015181840152602081019050613853565b50505050905090810190601f16801561389b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138b557fe5b049050809150509392505050565b6138e28273ffffffffffffffffffffffffffffffffffffffff16613b0e565b613954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106139a35780518252602082019150602081019050602083039250613980565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a05576040519150601f19603f3d011682016040523d82523d6000602084013e613a0a565b606091505b509150915081613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115613b0857808060200190516020811015613aa157600080fd5b8101908080519060200190929190505050613b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613b7b602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613b5057506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206c30d054d8c296b4f1365fb04c5a3c5d5ebcaadb63abc0129128ccc0a91a2b3864736f6c63430006020033", + "bytecode": "0x608060405234801561001057600080fd5b50604051613c89380380613c898339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613bda806100af6000396000f3fe60806040526004361061008a5760003560e01c80636ba17e7a116100595780636ba17e7a146102a25780636db8ce241461033f57806380e42f8e146103d55780638549780b14610454578063c9c9163e146104d3576100e8565b80630d8e6e2c146100ed57806317d7de7c1461011e5780633fc8cef3146101ae57806350e2f0ba14610205576100e8565b366100e857600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100e657fe5b005b600080fd5b3480156100f957600080fd5b50610102610562565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b5061013361056b565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610173578082015181840152602081019050610158565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ba57600080fd5b506101c36105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021157600080fd5b5061027e6004803603606081101561022857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102ae57600080fd5b5061031b600480360360608110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b3565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561034b57600080fd5b506103b86004803603606081101561036257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610998565b604051808381526020018281526020019250505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7a565b604051808381526020018281526020019250505060405180910390f35b6104b66004803603604081101561046a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b604051808381526020018281526020019250505060405180910390f35b3480156104df57600080fd5b5061054c600480360360608110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3a565b6040518082815260200191505060405180910390f35b60006001905090565b60606040518060400160405280601a81526020017f5072696d6974697665563157657468436f6e6e6563746f723031000000000000815250905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806000610718600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61110b565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006108fd600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b611889565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16610a1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ade600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611fa2565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610bfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610c8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610cbf600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612738565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610e9f600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612cef565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550826000811161104e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600061107e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612f75565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008460008111611187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156111cf57600080fd5b505afa1580156111e3573d6000803e3d6000fd5b505050506040513d60208110156111f957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b810190808051906020019092919050505010156113da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006115008973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b81019080805190602001909291905050506114f28b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a857600080fd5b505afa1580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154957600080fd5b505afa15801561155d573d6000803e3d6000fd5b505050506040513d602081101561157357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561160057600080fd5b505afa158015611614573d6000803e3d6000fd5b505050506040513d602081101561162a57600080fd5b810190808051906020019092919050505010156116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61175c338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116fb57600080fd5b505afa15801561170f573d6000803e3d6000fd5b505050506040513d602081101561172557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b611789338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d606081101561183557600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506118718c8a8c613588565b82828297509750975050505050509450945094915050565b60008060008460008111611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b810190808051906020019092919050505010611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611c468973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6b57600080fd5b505afa158015611b7f573d6000803e3d6000fd5b505050506040513d6020811015611b9557600080fd5b8101908080519060200190929190505050611c388b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bee57600080fd5b505afa158015611c02573d6000803e3d6000fd5b505050506040513d6020811015611c1857600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d4657600080fd5b505afa158015611d5a573d6000803e3d6000fd5b505050506040513d6020811015611d7057600080fd5b81019080805190602001909291905050501015611df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611ea2338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e4157600080fd5b505afa158015611e55573d6000803e3d6000fd5b505050506040513d6020811015611e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611f2457600080fd5b505af1158015611f38573d6000803e3d6000fd5b505050506040513d6060811015611f4e57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611f8a8c8a8c613588565b82828297509750975050505050509450945094915050565b600080836000811161201c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561206457600080fd5b505afa158015612078573d6000803e3d6000fd5b505050506040513d602081101561208e57600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561224557600080fd5b505afa158015612259573d6000803e3d6000fd5b505050506040513d602081101561226f57600080fd5b810190808051906020019092919050505010156122f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b600061241a8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561233f57600080fd5b505afa158015612353573d6000803e3d6000fd5b505050506040513d602081101561236957600080fd5b810190808051906020019092919050505061240c8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123c257600080fd5b505afa1580156123d6573d6000803e3d6000fd5b505050506040513d60208110156123ec57600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561249a57600080fd5b505afa1580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b81019080805190602001909291905050501015612549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612576338a838573ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6125a3338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156125f75781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561267f578082015181840152602081019050612664565b50505050905090810190601f1680156126ac5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156126cc57600080fd5b505af11580156126e0573d6000803e3d6000fd5b505050506040513d60408110156126f657600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506127248b898b613588565b818196509650505050505094509492505050565b60008034600081116127b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156127fa57600080fd5b505afa15801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60003490506000612a038873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561292757600080fd5b505afa15801561293b573d6000803e3d6000fd5b505050506040513d602081101561295157600080fd5b81019080805190602001909291905050506129f58a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ab57600080fd5b505afa1580156129bf573d6000803e3d6000fd5b505050506040513d60208110156129d557600080fd5b8101908080519060200190929190505050856133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a8357600080fd5b505afa158015612a97573d6000803e3d6000fd5b505050506040513d6020811015612aad57600080fd5b81019080805190602001909291905050501015612b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612b3c89896136d5565b612b693389838b73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612bbb5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c43578082015181840152602081019050612c28565b50505050905090810190601f168015612c705780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612c9057600080fd5b505af1158015612ca4573d6000803e3d6000fd5b505050506040513d6040811015612cba57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612d69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d6020811015612ddb57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612e9987876136d5565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1a57600080fd5b505af1158015612f2e573d6000803e3d6000fd5b505050506040513d6040811015612f4457600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561303657600080fd5b505afa15801561304a573d6000803e3d6000fd5b505050506040513d602081101561306057600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315c57600080fd5b505afa158015613170573d6000803e3d6000fd5b505050506040513d602081101561318657600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561321757600080fd5b505afa15801561322b573d6000803e3d6000fd5b505050506040513d602081101561324157600080fd5b810190808051906020019092919050505010156132c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6132f33388888473ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505090506133bc898789613588565b80945050505050949350505050565b6000808314156133de576000905061344b565b60008284029050828482816133ef57fe5b0414613446576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613b5a6021913960400191505060405180910390fd5b809150505b92915050565b600061349383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506137fd565b905092915050565b613582846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506138c3565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135db57600080fd5b505af11580156135ef573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613653576040519150601f19603f3d011682016040523d82523d6000602084013e613658565b606091505b50509050806136cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561371d57600080fd5b505af1158015613731573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b505050506040513d60208110156137e757600080fd5b8101908080519060200190929190505050505050565b600080831182906138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561386e578082015181840152602081019050613853565b50505050905090810190601f16801561389b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138b557fe5b049050809150509392505050565b6138e28273ffffffffffffffffffffffffffffffffffffffff16613b0e565b613954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106139a35780518252602082019150602081019050602083039250613980565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a05576040519150601f19603f3d011682016040523d82523d6000602084013e613a0a565b606091505b509150915081613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115613b0857808060200190516020811015613aa157600080fd5b8101908080519060200190929190505050613b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613b7b602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613b5057506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220009854dfdae5b6ac72c66f966ed76aebbb8d090af514b1f61b96058c67d9246764736f6c63430006020033", + "deployedBytecode": "0x60806040526004361061008a5760003560e01c80636ba17e7a116100595780636ba17e7a146102a25780636db8ce241461033f57806380e42f8e146103d55780638549780b14610454578063c9c9163e146104d3576100e8565b80630d8e6e2c146100ed57806317d7de7c1461011e5780633fc8cef3146101ae57806350e2f0ba14610205576100e8565b366100e857600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100e657fe5b005b600080fd5b3480156100f957600080fd5b50610102610562565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b5061013361056b565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610173578082015181840152602081019050610158565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ba57600080fd5b506101c36105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021157600080fd5b5061027e6004803603606081101561022857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102ae57600080fd5b5061031b600480360360608110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b3565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561034b57600080fd5b506103b86004803603606081101561036257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610998565b604051808381526020018281526020019250505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7a565b604051808381526020018281526020019250505060405180910390f35b6104b66004803603604081101561046a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b604051808381526020018281526020019250505060405180910390f35b3480156104df57600080fd5b5061054c600480360360608110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3a565b6040518082815260200191505060405180910390f35b60006001905090565b60606040518060400160405280601a81526020017f5072696d6974697665563157657468436f6e6e6563746f723031000000000000815250905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806000610718600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61110b565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006108fd600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b611889565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16610a1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ade600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611fa2565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610bfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610c8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610cbf600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612738565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610e9f600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612cef565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550826000811161104e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600061107e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612f75565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008460008111611187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156111cf57600080fd5b505afa1580156111e3573d6000803e3d6000fd5b505050506040513d60208110156111f957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b810190808051906020019092919050505010156113da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006115008973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b81019080805190602001909291905050506114f28b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a857600080fd5b505afa1580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154957600080fd5b505afa15801561155d573d6000803e3d6000fd5b505050506040513d602081101561157357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561160057600080fd5b505afa158015611614573d6000803e3d6000fd5b505050506040513d602081101561162a57600080fd5b810190808051906020019092919050505010156116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61175c338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116fb57600080fd5b505afa15801561170f573d6000803e3d6000fd5b505050506040513d602081101561172557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b611789338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d606081101561183557600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506118718c8a8c613588565b82828297509750975050505050509450945094915050565b60008060008460008111611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b810190808051906020019092919050505010611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611c468973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6b57600080fd5b505afa158015611b7f573d6000803e3d6000fd5b505050506040513d6020811015611b9557600080fd5b8101908080519060200190929190505050611c388b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bee57600080fd5b505afa158015611c02573d6000803e3d6000fd5b505050506040513d6020811015611c1857600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d4657600080fd5b505afa158015611d5a573d6000803e3d6000fd5b505050506040513d6020811015611d7057600080fd5b81019080805190602001909291905050501015611df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611ea2338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e4157600080fd5b505afa158015611e55573d6000803e3d6000fd5b505050506040513d6020811015611e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611f2457600080fd5b505af1158015611f38573d6000803e3d6000fd5b505050506040513d6060811015611f4e57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611f8a8c8a8c613588565b82828297509750975050505050509450945094915050565b600080836000811161201c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561206457600080fd5b505afa158015612078573d6000803e3d6000fd5b505050506040513d602081101561208e57600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561224557600080fd5b505afa158015612259573d6000803e3d6000fd5b505050506040513d602081101561226f57600080fd5b810190808051906020019092919050505010156122f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b600061241a8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561233f57600080fd5b505afa158015612353573d6000803e3d6000fd5b505050506040513d602081101561236957600080fd5b810190808051906020019092919050505061240c8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123c257600080fd5b505afa1580156123d6573d6000803e3d6000fd5b505050506040513d60208110156123ec57600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561249a57600080fd5b505afa1580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b81019080805190602001909291905050501015612549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612576338a838573ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6125a3338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156125f75781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561267f578082015181840152602081019050612664565b50505050905090810190601f1680156126ac5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156126cc57600080fd5b505af11580156126e0573d6000803e3d6000fd5b505050506040513d60408110156126f657600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506127248b898b613588565b818196509650505050505094509492505050565b60008034600081116127b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156127fa57600080fd5b505afa15801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60003490506000612a038873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561292757600080fd5b505afa15801561293b573d6000803e3d6000fd5b505050506040513d602081101561295157600080fd5b81019080805190602001909291905050506129f58a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ab57600080fd5b505afa1580156129bf573d6000803e3d6000fd5b505050506040513d60208110156129d557600080fd5b8101908080519060200190929190505050856133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a8357600080fd5b505afa158015612a97573d6000803e3d6000fd5b505050506040513d6020811015612aad57600080fd5b81019080805190602001909291905050501015612b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612b3c89896136d5565b612b693389838b73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612bbb5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c43578082015181840152602081019050612c28565b50505050905090810190601f168015612c705780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612c9057600080fd5b505af1158015612ca4573d6000803e3d6000fd5b505050506040513d6040811015612cba57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612d69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d6020811015612ddb57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612e9987876136d5565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1a57600080fd5b505af1158015612f2e573d6000803e3d6000fd5b505050506040513d6040811015612f4457600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561303657600080fd5b505afa15801561304a573d6000803e3d6000fd5b505050506040513d602081101561306057600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315c57600080fd5b505afa158015613170573d6000803e3d6000fd5b505050506040513d602081101561318657600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561321757600080fd5b505afa15801561322b573d6000803e3d6000fd5b505050506040513d602081101561324157600080fd5b810190808051906020019092919050505010156132c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6132f33388888473ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505090506133bc898789613588565b80945050505050949350505050565b6000808314156133de576000905061344b565b60008284029050828482816133ef57fe5b0414613446576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613b5a6021913960400191505060405180910390fd5b809150505b92915050565b600061349383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506137fd565b905092915050565b613582846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506138c3565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135db57600080fd5b505af11580156135ef573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613653576040519150601f19603f3d011682016040523d82523d6000602084013e613658565b606091505b50509050806136cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561371d57600080fd5b505af1158015613731573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b505050506040513d60208110156137e757600080fd5b8101908080519060200190929190505050505050565b600080831182906138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561386e578082015181840152602081019050613853565b50505050905090810190601f16801561389b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138b557fe5b049050809150509392505050565b6138e28273ffffffffffffffffffffffffffffffffffffffff16613b0e565b613954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106139a35780518252602082019150602081019050602083039250613980565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a05576040519150601f19603f3d011682016040523d82523d6000602084013e613a0a565b606091505b509150915081613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115613b0857808060200190516020811015613aa157600080fd5b8101908080519060200190929190505050613b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613b7b602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613b5057506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220009854dfdae5b6ac72c66f966ed76aebbb8d090af514b1f61b96058c67d9246764736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/WethConnectorLib01.json b/artifacts/WethConnectorLib01.json index 04e8ac8c..6b5f305f 100644 --- a/artifacts/WethConnectorLib01.json +++ b/artifacts/WethConnectorLib01.json @@ -1,8 +1,8 @@ { "contractName": "WethConnectorLib01", "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122051339644bc5e55da545c8eccc8e5f8cca0d38c1f419608c24a11bdc0364f7e8264736f6c63430006020033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122051339644bc5e55da545c8eccc8e5f8cca0d38c1f419608c24a11bdc0364f7e8264736f6c63430006020033", + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122063d629fba3135146b902f04a815f32ada11aa28e7f095d6d347fc093b5df8bee64736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122063d629fba3135146b902f04a815f32ada11aa28e7f095d6d347fc093b5df8bee64736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnectorLib02.sol b/contracts/connectors/Uniswap/UniswapConnectorLib02.sol index 3dbdae39..4fa6677c 100644 --- a/contracts/connectors/Uniswap/UniswapConnectorLib02.sol +++ b/contracts/connectors/Uniswap/UniswapConnectorLib02.sol @@ -143,7 +143,7 @@ library UniswapConnectorLib02 { /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken. /// @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens. /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair. - /// @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with. + /// @param minOptionTokens IMPORTANT: MUST BE EQUAL TO QUANTITYOPTIONS. The minimum quantity of longOptionTokens expected to provide liquidity with. /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with. /// @param to The address that receives UNI-V2 shares. /// @param deadline The timestamp to expire a pending transaction. diff --git a/deploy/4_deloy_weth_connector.js b/deploy/4_deloy_weth_connector.js index 90ba06c0..9c204d7c 100644 --- a/deploy/4_deloy_weth_connector.js +++ b/deploy/4_deloy_weth_connector.js @@ -20,9 +20,9 @@ module.exports = async ({ getNamedAccounts, deployments }) => { } else { wethAddress = Weth.networks[chain.toString()].address; } - const ethTrader = await deploy("WethConnector", { + const ethTrader = await deploy("WethConnector01", { from: deployer, - contractName: "WethConnector", + contractName: "WethConnector01", args: [wethAddress], }); let deployed = [ethTrader]; diff --git a/test/lib/setup.js b/test/lib/setup.js index 3d425ba8..a8fcf996 100644 --- a/test/lib/setup.js +++ b/test/lib/setup.js @@ -12,8 +12,8 @@ const Registry = require("../../artifacts/Registry"); const Flash = require("../../artifacts/Flash"); const Weth = require("../../artifacts/WETH9"); const Trader = require("../../artifacts/Trader"); -const WethConnector = require("../../artifacts/WethConnector"); -const UniswapConnector02 = require("../../artifacts/UniswapConnector02.json"); +const WethConnector = require("../../artifacts/WethConnector01"); +const UniswapConnector = require("../../artifacts/UniswapConnector02.json"); const OptionTemplateLib = require("../../artifacts/OptionTemplateLib"); const RedeemTemplateLib = require("../../artifacts/RedeemTemplateLib"); @@ -360,7 +360,7 @@ const approveToken = async (token, signer, spender) => { * @dev Gets the UniswapConnector instance. */ const newUniswapConnector = async (signer, params) => { - const connector = await deployContract(signer, UniswapConnector02, params, { + const connector = await deployContract(signer, UniswapConnector, params, { gasLimit: 6000000, }); return connector; diff --git a/test/lib/utils.js b/test/lib/utils.js index 0f6be795..5abaa84f 100644 --- a/test/lib/utils.js +++ b/test/lib/utils.js @@ -118,7 +118,13 @@ const getTokenBalances = async (Primitive, address) => { return tokenBalances; }; +const sortTokens = (tokenA, tokenB) => { + let tokens = tokenA < tokenB ? [tokenA, tokenB] : [tokenB, tokenA]; + return tokens; +}; + module.exports = { + sortTokens, assertBNEqual, verifyOptionInvariants, getTokenBalances, diff --git a/test/test_flash.js b/test/test_flash.spec.js similarity index 100% rename from test/test_flash.js rename to test/test_flash.spec.js diff --git a/test/test_option.js b/test/test_option.spec.js similarity index 100% rename from test/test_option.js rename to test/test_option.spec.js diff --git a/test/test_trader.js b/test/test_trader.spec.js similarity index 100% rename from test/test_trader.js rename to test/test_trader.spec.js diff --git a/test/test_uni_connector.js b/test/test_uni_connector.spec.js similarity index 73% rename from test/test_uni_connector.js rename to test/test_uni_connector.spec.js index 6e1f92c8..216c8af6 100644 --- a/test/test_uni_connector.js +++ b/test/test_uni_connector.spec.js @@ -10,6 +10,63 @@ const { assertBNEqual } = utils; const { ONE_ETHER, MILLION_ETHER } = constants.VALUES; const UniswapV2Pair = require("@uniswap/v2-core/build/UniswapV2Pair.json"); const batchApproval = require("./lib/batchApproval"); +const { sortTokens } = require("./lib/utils"); + +const _addLiquidity = async ( + router, + reserves, + amountADesired, + amountBDesired, + amountAMin, + amountBMin +) => { + let amount = []; + let amountA, amountB; + let amountBOptimal = await router.quote( + amountADesired, + reserves[0], + reserves[1] + ); + if (amountBOptimal <= amountBDesired) { + assert.equal( + amountBOptimal >= amountBMin, + true, + `${formatEther(amountBOptimal)} !>= ${formatEther(amountBMin)}` + ); + + [amountA, amountB] = [amountADesired, amountBOptimal]; + } else { + let amountAOptimal = await router.quote( + amountBDesired, + reserves[1], + reserves[0] + ); + + assert.equal( + amountAOptimal >= amountAMin, + true, + `${formatEther(amountAOptimal)} !>= ${formatEther(amountAMin)}` + ); + [amountA, amountB] = [amountAOptimal, amountBDesired]; + } + + return [amountA, amountB]; +}; + +const getReserves = async (signer, factory, tokenA, tokenB) => { + let tokens = sortTokens(tokenA, tokenB); + let token0 = tokens[0]; + let pair = new ethers.Contract( + await factory.getPair(tokenA, tokenB), + UniswapV2Pair.abi, + signer + ); + let [_reserve0, _reserve1] = await pair.getReserves(); + + let reserves = + tokenA == token0 ? [_reserve0, _reserve1] : [_reserve1, _reserve0]; + return reserves; +}; describe("UniswapConnector", () => { // ACCOUNTS @@ -20,6 +77,7 @@ describe("UniswapConnector", () => { let base, quote, expiry; let Primitive, registry; let uniswapFactory, uniswapRouter, uniswapConnector; + let premium; before(async () => { let signers = await setup.newWallets(); @@ -93,6 +151,7 @@ describe("UniswapConnector", () => { const totalWethForPair = parseEther("1000"); const totalDaiForPair = parseEther("100000"); const totalRedeemForPair = parseEther("100000"); + premium = 10; // MINT 2,010 WETH await weth.deposit({ from: Alice, value: parseEther("2500") }); @@ -169,20 +228,11 @@ describe("UniswapConnector", () => { let quoteBalanceBefore = await quoteToken.balanceOf(Alice); let optionBalanceBefore = await optionToken.balanceOf(pair); - /* Function ABI - function mintLongOptionsThenSwapToTokens( - IOption optionToken, - uint256 amountIn, - uint256 amountOutMin, - address[] calldata path, - address to, - uint256 deadline - ) external returns (bool) { - */ let optionTokenAddress = optionToken.address; let amountIn = ONE_ETHER; - let amountOutMin = 0; let path = [optionTokenAddress, quoteToken.address]; // path[0] MUST be the optionToken address. + let amounts = await uniswapRouter.getAmountsOut(amountIn, path); + let amountOutMin = amounts[path.length - 1]; let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; @@ -214,7 +264,11 @@ describe("UniswapConnector", () => { .toString(); assertBNEqual(underlyingChange, amountIn.mul(-1)); - /* expect(+(quoteChange.toString())).to.be.greaterThan(amountOutMin); */ + assert.equal( + quoteChange >= amountOutMin, + true, + `quoteDelta ${quoteChange} != amountOutMin ${amountOutMin}` + ); assertBNEqual(optionChange, amountIn); }); }); @@ -233,29 +287,19 @@ describe("UniswapConnector", () => { ); let quoteBalanceBefore = await quoteToken.balanceOf(Alice); let redeemBalanceBefore = await redeemToken.balanceOf(pair); - - /* Function ABI - function mintShortOptionsThenSwapToTokens( - IOption optionToken, - uint256 amountIn, - uint256 amountOutMin, - address[] calldata path, - address to, - uint256 deadline - ) external returns (bool) { - */ let optionTokenAddress = optionToken.address; - let amountIn = ONE_ETHER; - let amountOut = amountIn.mul(quote).div(base); - let amountOutMin = 0; + let optionsToMint = ONE_ETHER; + let amountIn = optionsToMint.mul(quote).div(base); let path = [redeemToken.address, quoteToken.address]; // path[0] MUST be the optionToken address. + let amounts = await uniswapRouter.getAmountsOut(amountIn, path); + let amountOutMin = amounts[path.length - 1]; let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; // Call the function await uniswapConnector.mintShortOptionsThenSwapToTokens( optionTokenAddress, - amountIn, + optionsToMint, amountOutMin, path, to, @@ -279,43 +323,184 @@ describe("UniswapConnector", () => { .sub(redeemBalanceBefore) .toString(); - assertBNEqual(underlyingChange, amountIn.mul(-1)); - /* expect(+(quoteChange.toString())).to.be.greaterThan(amountOutMin); */ + assertBNEqual(underlyingChange, optionsToMint.mul(-1)); assertBNEqual(redeemChange, "0"); + assert.equal( + quoteChange >= amountOutMin, + true, + `quoteDelta ${formatEther( + quoteChange + )} != amountOutMin ${formatEther(amountOutMin)}` + ); }); }); describe("addLongLiquidityWithUnderlying", () => { it("use underlyings to mint options, then provide options and quote tokens as liquidity", async () => { - /* Function ABI - function addLongLiquidityWithUnderlying( - address optionAddress, - uint256 quantityOptions, - uint256 quantityQuoteTokens, - uint256 minQuantityOptions, - uint256 minQuantityQuoteTokens, - address to, - uint256 deadline - ) public nonReentrant returns (bool) { - */ + console.log( + `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` + ); + + console.log( + `Quote balance: ${formatEther( + await quoteToken.balanceOf(Alice) + )}` + ); + console.log( + `Redeem balance: ${formatEther( + await redeemToken.balanceOf(Alice) + )}` + ); + console.log( + `Option balance: ${formatEther( + await optionToken.balanceOf(Alice) + )}` + ); + console.log( + `Option balance of connector: ${formatEther( + await optionToken.balanceOf(uniswapConnector.address) + )}` + ); + + let underlyingBalanceBefore = await underlyingToken.balanceOf( + Alice + ); + let quoteBalanceBefore = await quoteToken.balanceOf(Alice); let optionAddress = optionToken.address; let quantityOptions = ONE_ETHER; - let quantityQuoteTokens = ONE_ETHER; - let minQuantityOptions = 0; - let minQuantityQuoteTokens = 0; + let quantityQuoteTokens = quantityOptions.mul(quote).div(base); + let amountADesired = quantityOptions; + let amountBDesired = quantityQuoteTokens; + let amountAMin = amountADesired; + let amountBMin = 0; let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; + + let sortedTokens = utils.sortTokens( + optionToken.address, + quoteToken.address + ); + let pairAddress = await uniswapFactory.getPair( + sortedTokens[0], + sortedTokens[1] + ); + let pair = new ethers.Contract( + pairAddress, + UniswapV2Pair.abi, + Admin + ); + + let [reserveA, reserveB] = await getReserves( + Admin, + uniswapFactory, + optionToken.address, + quoteToken.address + ); + reserves = [reserveA, reserveB]; + + let amountBOptimal = await uniswapRouter.quote( + amountADesired, + reserves[0], + reserves[1] + ); + + console.log(formatEther(reserves[1]), formatEther(reserves[0])); + let amountAOptimal = await uniswapRouter.quote( + amountBDesired, + reserves[1], + reserves[0] + ); + + [, amountBMin] = await _addLiquidity( + uniswapRouter, + reserves, + amountADesired, + amountBDesired, + amountAOptimal, + amountBOptimal + ); + //amountAMin = amounts[0].mul(995).div(1000).toString(); + //amountBMin = amounts[1].mul(995).div(1000).toString(); + console.log( + `${formatEther(amountAMin)}, ${formatEther( + amountAOptimal + )}, ${formatEther(amountBOptimal)},${formatEther(amountBMin)}` + ); await uniswapConnector.addLongLiquidityWithUnderlying( optionAddress, quoteToken.address, - quantityOptions, - quantityQuoteTokens, - minQuantityOptions, - minQuantityQuoteTokens, + amountADesired, + amountBDesired, + amountAMin, + amountBMin.mul(95).div(100), to, deadline ); + + let underlyingBalanceAfter = await underlyingToken.balanceOf(Alice); + let quoteBalanceAfter = await quoteToken.balanceOf(Alice); + + // Used underlyings to mint options (Alice) + let underlyingChange = underlyingBalanceAfter.sub( + underlyingBalanceBefore + ); + + // Purchased quoteTokens with our options (Alice) + let quoteChange = quoteBalanceAfter.sub(quoteBalanceBefore); + + assertBNEqual(underlyingChange.toString(), amountADesired.mul(-1)); + assertBNEqual(quoteChange.toString(), amountBDesired.mul(-1)); + assert.equal( + underlyingChange.mul(-1) <= amountAMin, + true, + `underlyingDelta ${formatEther( + underlyingChange + )} != amountAMin ${formatEther(amountAMin)}` + ); + assert.equal( + quoteChange.mul(-1) >= amountBMin, + true, + `quoteDelta ${formatEther( + quoteChange + )} != amountBMin ${formatEther(amountBMin)}` + ); + + console.log( + `Underlying: ${formatEther( + underlyingChange + )}, Quote: ${formatEther(quoteChange)}, amounts0 ${formatEther( + amountAMin + )}, amounts1 ${formatEther(amountBMin)}` + ); + + console.log( + `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` + ); + + console.log( + `Quote balance: ${formatEther( + await quoteToken.balanceOf(Alice) + )}` + ); + + console.log( + `Redeem balance: ${formatEther( + await redeemToken.balanceOf(Alice) + )}` + ); + + console.log( + `Option balance: ${formatEther( + await optionToken.balanceOf(Alice) + )}` + ); + + console.log( + `Option balance of connector: ${formatEther( + await optionToken.balanceOf(uniswapConnector.address) + )}` + ); }); }); diff --git a/test/test_uni_flash.js b/test/test_uni_flash.spec.js similarity index 100% rename from test/test_uni_flash.js rename to test/test_uni_flash.spec.js diff --git a/test/test_weth_connector.js b/test/test_weth_connector.spec.js similarity index 100% rename from test/test_weth_connector.js rename to test/test_weth_connector.spec.js From 573f3b469df1d039dcbc52a48e0cc91bae4ad488 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 20:20:46 -0700 Subject: [PATCH 18/20] Finished test suite for UniswapConnector02. --- artifacts/UniswapConnector02.json | 4 +- artifacts/UniswapConnectorLib02.json | 4 +- .../connectors/Uniswap/UniswapConnector02.sol | 4 +- .../Uniswap/UniswapConnectorLib02.sol | 12 +- test/test_uni_connector.spec.js | 400 +++++++++++------- 5 files changed, 259 insertions(+), 165 deletions(-) diff --git a/artifacts/UniswapConnector02.json b/artifacts/UniswapConnector02.json index 61ecfcfe..489b551c 100644 --- a/artifacts/UniswapConnector02.json +++ b/artifacts/UniswapConnector02.json @@ -579,8 +579,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b50604051620053dc380380620053dc833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a2505050614ffe80620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122001a0894ea095495335a17ebbd5ff41b7025267cd78633c68d6344be6eca5b36764736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611314565b604051808215151515815260200191505060405180910390f35b6107186119e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a0c565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611b57565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612320565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061241e565b604051808215151515815260200191505060405180910390f35b610a576124a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61268a565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612ab9565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b600080611303600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050898961333a565b905080915050979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000851161142d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561147557600080fd5b505afa158015611489573d6000803e3d6000fd5b505050506040513d602081101561149f57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff16846001815181106114d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61159287878373ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505050506040513d604081101561163d57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156116fb5780820151818401526020810190506116e0565b50505050905001935050505060006040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561175d57600080fd5b810190808051604051939291908464010000000082111561177d57600080fd5b8382019150602082018581111561179357600080fd5b82518660208202830111640100000000821117156117b057600080fd5b8083526020830192505050908051906020019060200280838360005b838110156117e75780820151818401526020810190506117cc565b5050505090500160405250505090506000808b905060008360018151811061180b57fe5b60200260200101519050611875816118676103e861185961183660038861354f90919063ffffffff16565b61184b6103e88961354f90919063ffffffff16565b6135d590919063ffffffff16565b61365d90919063ffffffff16565b6136a790919063ffffffff16565b925050506119248d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c457600080fd5b505afa1580156118d8573d6000803e3d6000fd5b505050506040513d60208110156118ee57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b611951888e838673ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a25050506119d585838b73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611b25600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e6137de565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611bda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3c57600080fd5b505afa158015611c50573d6000803e3d6000fd5b505050506040513d6020811015611c6657600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d6020811015611ceb57600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611e425781602001602082028038833980820191505090505b5090508381600081518110611e5357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611e9b57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008290506000604051806080016040528060508152602001614f4f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b83811015611fef578082015181840152602081019050611fd4565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156120bd57600080fd5b505afa1580156120d1573d6000803e3d6000fd5b505050506040513d60208110156120e757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461211a57600061211c565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217d57600080fd5b505afa158015612191573d6000803e3d6000fd5b505050506040513d60208110156121a757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d9578b6121dc565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561228b578082015181840152602081019050612270565b50505050905090810190601f1680156122b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166123a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006123f2600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61402b565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b600080612493600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614457565b905080915050979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156125a057600080fd5b505afa1580156125b4573d6000803e3d6000fd5b505050506040513d60208110156125ca57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006126b93330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806126c78b8a306145ae565b915091508882146126d457fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561277b57600080fd5b505af115801561278f573d6000803e3d6000fd5b505050506040513d60208110156127a557600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561285e57600080fd5b505af1158015612872573d6000803e3d6000fd5b505050506040513d602081101561288857600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156129a957600080fd5b505af11580156129bd573d6000803e3d6000fd5b505050506040513d60608110156129d357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612aa633828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a4657600080fd5b505afa158015612a5a573d6000803e3d6000fd5b505050506040513d6020811015612a7057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b0457600080fd5b505afa158015612b18573d6000803e3d6000fd5b505050506040513d6020811015612b2e57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612bf457600080fd5b505afa158015612c08573d6000803e3d6000fd5b505050506040513d6020811015612c1e57600080fd5b81019080805190602001909291905050509050612c5e33308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612d0557600080fd5b505af1158015612d19573d6000803e3d6000fd5b505050506040513d6020811015612d2f57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b505050506040513d6040811015612e7557600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f4057600080fd5b505af1158015612f54573d6000803e3d6000fd5b505050506040513d6020811015612f6a57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b505050506040513d602081101561304d57600080fd5b81019080805190602001909291905050505060006131b9670de0b6b3a76400006131ab8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130b557600080fd5b505afa1580156130c9573d6000803e3d6000fd5b505050506040513d60208110156130df57600080fd5b810190808051906020019092919050505061319d670de0b6b3a764000061318f8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561314557600080fd5b505afa158015613159573d6000803e3d6000fd5b505050506040513d602081101561316f57600080fd5b81019080805190602001909291905050508b61354f90919063ffffffff16565b61354f90919063ffffffff16565b61365d90919063ffffffff16565b61365d90919063ffffffff16565b90506131e83330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156132a357600080fd5b505af11580156132b7573d6000803e3d6000fd5b505050506040513d60608110156132cd57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061332287828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061334a8989306145ae565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561339657600080fd5b505afa1580156133aa573d6000803e3d6000fd5b505050506040513d60208110156133c057600080fd5b8101908080519060200190929190505050905060006133e48c83858c8c8c8c6147ae565b9150508061345a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61348587858d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b80945050505050979650505050505050565b61354a8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b505050565b60008083141561356257600090506135cf565b600082840290508284828161357357fe5b04146135ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614f2e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061369f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d5c565b905092915050565b60006136e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614e22565b905092915050565b6137d8846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614b11565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d60208110156138c357600080fd5b8101908080519060200190929190505050905061390333308b8473ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156139aa57600080fd5b505af11580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613af057600080fd5b505af1158015613b04573d6000803e3d6000fd5b505050506040513d6040811015613b1a57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b8157600080fd5b505afa158015613b95573d6000803e3d6000fd5b505050506040513d6020811015613bab57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6557600080fd5b505af1158015613c79573d6000803e3d6000fd5b505050506040513d6020811015613c8f57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613d4857600080fd5b505af1158015613d5c573d6000803e3d6000fd5b505050506040513d6020811015613d7257600080fd5b8101908080519060200190929190505050506000613eaa8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b8101908080519060200190929190505050613e9c8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e5257600080fd5b505afa158015613e66573d6000803e3d6000fd5b505050506040513d6020811015613e7c57600080fd5b81019080805190602001909291905050508761354f90919063ffffffff16565b61365d90919063ffffffff16565b9050613ed93330838573ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6060811015613fc057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061401387828d73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061405a3330888b73ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000806140688b8a306145ae565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140b457600080fd5b505afa1580156140c8573d6000803e3d6000fd5b505050506040513d60208110156140de57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561419857600080fd5b505af11580156141ac573d6000803e3d6000fd5b505050506040513d60208110156141c257600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561427b57600080fd5b505af115801561428f573d6000803e3d6000fd5b505050506040513d60208110156142a557600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b1580156143c657600080fd5b505af11580156143da573d6000803e3d6000fd5b505050506040513d60608110156143f057600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061444333848e73ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b600193505050509998505050505050505050565b60008060006144678989306145ae565b91509150600061447c8b8b858b8b8b8b6147ae565b915050806144f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61459d86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166134979092919063ffffffff16565b809350505050979650505050505050565b60008060008411614627576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6146d43386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561467357600080fd5b505afa158015614687573d6000803e3d6000fd5b505050506040513d602081101561469d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136f1909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561475557600080fd5b505af1158015614769573d6000803e3d6000fd5b505050506040513d604081101561477f57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff16856000815181106147d657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614867576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561490e57600080fd5b505af1158015614922573d6000803e3d6000fd5b505050506040513d602081101561493857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614a015780820151818401526020810190506149e6565b505050509050019650505050505050600060405180830381600087803b158015614a2a57600080fd5b505af1158015614a3e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614a6857600080fd5b8101908080516040519392919084640100000000821115614a8857600080fd5b83820191506020820185811115614a9e57600080fd5b8251866020820283011164010000000082111715614abb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614af2578082015181840152602081019050614ad7565b5050505090500160405250505091506001905097509795505050505050565b614b308273ffffffffffffffffffffffffffffffffffffffff16614ee2565b614ba2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614bf15780518252602082019150602081019050602083039250614bce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614c53576040519150601f19603f3d011682016040523d82523d6000602084013e614c58565b606091505b509150915081614cd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115614d5657808060200190516020811015614cef57600080fd5b8101908080519060200190929190505050614d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614f9f602a913960400191505060405180910390fd5b5b50505050565b60008083118290614e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614dcd578082015181840152602081019050614db2565b50505050905090810190601f168015614dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614e1457fe5b049050809150509392505050565b6000838311158290614ecf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614e94578082015181840152602081019050614e79565b50505050905090810190601f168015614ec15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015614f2457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122001a0894ea095495335a17ebbd5ff41b7025267cd78633c68d6344be6eca5b36764736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200570c3803806200570c833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a250505061532e80620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b604051808215151515815260200191505060405180910390f35b610718611a9c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ac2565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611c0d565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506123d6565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506124d4565b604051808215151515815260200191505060405180910390f35b610a57612610565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612636565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b6127f6565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612d07565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061139f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989613588565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561152b57600080fd5b505afa15801561153f573d6000803e3d6000fd5b505050506040513d602081101561155557600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061158c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61164887878373ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156116c957600080fd5b505af11580156116dd573d6000803e3d6000fd5b505050506040513d60408110156116f357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156117b1578082015181840152602081019050611796565b50505050905001935050505060006040518083038186803b1580156117d557600080fd5b505afa1580156117e9573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561181357600080fd5b810190808051604051939291908464010000000082111561183357600080fd5b8382019150602082018581111561184957600080fd5b825186602082028301116401000000008211171561186657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561189d578082015181840152602081019050611882565b5050505090500160405250505090506000808b90506000836001815181106118c157fe5b6020026020010151905061192b8161191d6103e861190f6118ec60038861379d90919063ffffffff16565b6119016103e88961379d90919063ffffffff16565b61382390919063ffffffff16565b6138ab90919063ffffffff16565b6138f590919063ffffffff16565b925050506119da8d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561197a57600080fd5b505afa15801561198e573d6000803e3d6000fd5b505050506040513d60208110156119a457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b611a07888e838673ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a2505050611a8b85838b73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611b46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611bdb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613a2c565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611c90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cf257600080fd5b505afa158015611d06573d6000803e3d6000fd5b505050506040513d6020811015611d1c57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7757600080fd5b505afa158015611d8b573d6000803e3d6000fd5b505050506040513d6020811015611da157600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611e8957600080fd5b505afa158015611e9d573d6000803e3d6000fd5b505050506040513d6020811015611eb357600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611ef85781602001602082028038833980820191505090505b5090508381600081518110611f0957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611f5157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000829050600060405180608001604052806050815260200161527f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156120a557808201518184015260208101905061208a565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217357600080fd5b505afa158015612187573d6000803e3d6000fd5b505050506040513d602081101561219d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d05760006121d2565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561223357600080fd5b505afa158015612247573d6000803e3d6000fd5b505050506040513d602081101561225d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461228f578b612292565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612341578082015181840152602081019050612326565b50505050905090810190601f16801561236e5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561239057600080fd5b505af11580156123a4573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff16612459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006124a8600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614279565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60008060009054906101000a900460ff16612557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006125e5600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614787565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561270c57600080fd5b505afa158015612720573d6000803e3d6000fd5b505050506040513d602081101561273657600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006128253330888b73ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000806128338b8a306148de565b9150915088821461284057fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156128e757600080fd5b505af11580156128fb573d6000803e3d6000fd5b505050506040513d602081101561291157600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156129ca57600080fd5b505af11580156129de573d6000803e3d6000fd5b505050506040513d60208110156129f457600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612b1557600080fd5b505af1158015612b29573d6000803e3d6000fd5b505050506040513d6060811015612b3f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612c1233828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bb257600080fd5b505afa158015612bc6573d6000803e3d6000fd5b505050506040513d6020811015612bdc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b612cf4338b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612c9357600080fd5b505afa158015612ca7573d6000803e3d6000fd5b505050506040513d6020811015612cbd57600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5257600080fd5b505afa158015612d66573d6000803e3d6000fd5b505050506040513d6020811015612d7c57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612e4257600080fd5b505afa158015612e56573d6000803e3d6000fd5b505050506040513d6020811015612e6c57600080fd5b81019080805190602001909291905050509050612eac33308b8473ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f5357600080fd5b505af1158015612f67573d6000803e3d6000fd5b505050506040513d6020811015612f7d57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561309957600080fd5b505af11580156130ad573d6000803e3d6000fd5b505050506040513d60408110156130c357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561318e57600080fd5b505af11580156131a2573d6000803e3d6000fd5b505050506040513d60208110156131b857600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561327157600080fd5b505af1158015613285573d6000803e3d6000fd5b505050506040513d602081101561329b57600080fd5b8101908080519060200190929190505050506000613407670de0b6b3a76400006133f98473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330357600080fd5b505afa158015613317573d6000803e3d6000fd5b505050506040513d602081101561332d57600080fd5b81019080805190602001909291905050506133eb670de0b6b3a76400006133dd8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561339357600080fd5b505afa1580156133a7573d6000803e3d6000fd5b505050506040513d60208110156133bd57600080fd5b81019080805190602001909291905050508b61379d90919063ffffffff16565b61379d90919063ffffffff16565b6138ab90919063ffffffff16565b6138ab90919063ffffffff16565b90506134363330838573ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156134f157600080fd5b505af1158015613505573d6000803e3d6000fd5b505050506040513d606081101561351b57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061357087828d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b60008060006135988989306148de565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156135e457600080fd5b505afa1580156135f8573d6000803e3d6000fd5b505050506040513d602081101561360e57600080fd5b8101908080519060200190929190505050905060006136328c83858c8c8c8c614ade565b915050806136a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6136d387858d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b80945050505050979650505050505050565b6137988363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614e41565b505050565b6000808314156137b0576000905061381d565b60008284029050828482816137c157fe5b0414613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061525e6021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156138a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006138ed83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061508c565b905092915050565b600061393783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615152565b905092915050565b613a26846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614e41565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613ae757600080fd5b505afa158015613afb573d6000803e3d6000fd5b505050506040513d6020811015613b1157600080fd5b81019080805190602001909291905050509050613b5133308b8473ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bf857600080fd5b505af1158015613c0c573d6000803e3d6000fd5b505050506040513d6020811015613c2257600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613d3e57600080fd5b505af1158015613d52573d6000803e3d6000fd5b505050506040513d6040811015613d6857600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613eb357600080fd5b505af1158015613ec7573d6000803e3d6000fd5b505050506040513d6020811015613edd57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6020811015613fc057600080fd5b81019080805190602001909291905050505060006140f88573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561401d57600080fd5b505afa158015614031573d6000803e3d6000fd5b505050506040513d602081101561404757600080fd5b81019080805190602001909291905050506140ea8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140a057600080fd5b505afa1580156140b4573d6000803e3d6000fd5b505050506040513d60208110156140ca57600080fd5b81019080805190602001909291905050508761379d90919063ffffffff16565b6138ab90919063ffffffff16565b90506141273330838573ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156141e457600080fd5b505af11580156141f8573d6000803e3d6000fd5b505050506040513d606081101561420e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061426187828d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b60006142a83330888b73ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000806142b68b8a306148de565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561430257600080fd5b505afa158015614316573d6000803e3d6000fd5b505050506040513d602081101561432c57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156143e657600080fd5b505af11580156143fa573d6000803e3d6000fd5b505050506040513d602081101561441057600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156144c957600080fd5b505af11580156144dd573d6000803e3d6000fd5b505050506040513d60208110156144f357600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561461457600080fd5b505af1158015614628573d6000803e3d6000fd5b505050506040513d606081101561463e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061469133848e73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b614773338c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561471257600080fd5b505afa158015614726573d6000803e3d6000fd5b505050506040513d602081101561473c57600080fd5b81019080805190602001909291905050508d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b600193505050509998505050505050505050565b60008060006147978989306148de565b9150915060006147ac8b8b858b8b8b8b614ade565b91505080614822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6148cd86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561486d57600080fd5b505afa158015614881573d6000803e3d6000fd5b505050506040513d602081101561489757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b809350505050979650505050505050565b60008060008411614957576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a043386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156149a357600080fd5b505afa1580156149b7573d6000803e3d6000fd5b505050506040513d60208110156149cd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614a8557600080fd5b505af1158015614a99573d6000803e3d6000fd5b505050506040513d6040811015614aaf57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b0657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614b97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614c3e57600080fd5b505af1158015614c52573d6000803e3d6000fd5b505050506040513d6020811015614c6857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614d31578082015181840152602081019050614d16565b505050509050019650505050505050600060405180830381600087803b158015614d5a57600080fd5b505af1158015614d6e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614d9857600080fd5b8101908080516040519392919084640100000000821115614db857600080fd5b83820191506020820185811115614dce57600080fd5b8251866020820283011164010000000082111715614deb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614e22578082015181840152602081019050614e07565b5050505090500160405250505091506001905097509795505050505050565b614e608273ffffffffffffffffffffffffffffffffffffffff16615212565b614ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614f215780518252602082019150602081019050602083039250614efe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614f83576040519150601f19603f3d011682016040523d82523d6000602084013e614f88565b606091505b509150915081615000576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156150865780806020019051602081101561501f57600080fd5b8101908080519060200190929190505050615085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806152cf602a913960400191505060405180910390fd5b5b50505050565b60008083118290615138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156150fd5780820151818401526020810190506150e2565b50505050905090810190601f16801561512a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161514457fe5b049050809150509392505050565b60008383111582906151ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156151c45780820151818401526020810190506151a9565b50505050905090810190601f1680156151f15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561525457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212203800194f3ba8fa672e6d1487a4e395f79886c2c75d6ca95a3567fcf8aa9f347664736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b604051808215151515815260200191505060405180910390f35b610718611a9c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ac2565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611c0d565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506123d6565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506124d4565b604051808215151515815260200191505060405180910390f35b610a57612610565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612636565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b6127f6565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612d07565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061139f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989613588565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561152b57600080fd5b505afa15801561153f573d6000803e3d6000fd5b505050506040513d602081101561155557600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061158c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61164887878373ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156116c957600080fd5b505af11580156116dd573d6000803e3d6000fd5b505050506040513d60408110156116f357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156117b1578082015181840152602081019050611796565b50505050905001935050505060006040518083038186803b1580156117d557600080fd5b505afa1580156117e9573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561181357600080fd5b810190808051604051939291908464010000000082111561183357600080fd5b8382019150602082018581111561184957600080fd5b825186602082028301116401000000008211171561186657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561189d578082015181840152602081019050611882565b5050505090500160405250505090506000808b90506000836001815181106118c157fe5b6020026020010151905061192b8161191d6103e861190f6118ec60038861379d90919063ffffffff16565b6119016103e88961379d90919063ffffffff16565b61382390919063ffffffff16565b6138ab90919063ffffffff16565b6138f590919063ffffffff16565b925050506119da8d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561197a57600080fd5b505afa15801561198e573d6000803e3d6000fd5b505050506040513d60208110156119a457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b611a07888e838673ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a2505050611a8b85838b73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611b46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611bdb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613a2c565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611c90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cf257600080fd5b505afa158015611d06573d6000803e3d6000fd5b505050506040513d6020811015611d1c57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7757600080fd5b505afa158015611d8b573d6000803e3d6000fd5b505050506040513d6020811015611da157600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611e8957600080fd5b505afa158015611e9d573d6000803e3d6000fd5b505050506040513d6020811015611eb357600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611ef85781602001602082028038833980820191505090505b5090508381600081518110611f0957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611f5157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000829050600060405180608001604052806050815260200161527f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156120a557808201518184015260208101905061208a565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217357600080fd5b505afa158015612187573d6000803e3d6000fd5b505050506040513d602081101561219d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d05760006121d2565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561223357600080fd5b505afa158015612247573d6000803e3d6000fd5b505050506040513d602081101561225d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461228f578b612292565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612341578082015181840152602081019050612326565b50505050905090810190601f16801561236e5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561239057600080fd5b505af11580156123a4573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff16612459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006124a8600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614279565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60008060009054906101000a900460ff16612557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006125e5600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614787565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561270c57600080fd5b505afa158015612720573d6000803e3d6000fd5b505050506040513d602081101561273657600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006128253330888b73ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000806128338b8a306148de565b9150915088821461284057fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156128e757600080fd5b505af11580156128fb573d6000803e3d6000fd5b505050506040513d602081101561291157600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156129ca57600080fd5b505af11580156129de573d6000803e3d6000fd5b505050506040513d60208110156129f457600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612b1557600080fd5b505af1158015612b29573d6000803e3d6000fd5b505050506040513d6060811015612b3f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612c1233828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bb257600080fd5b505afa158015612bc6573d6000803e3d6000fd5b505050506040513d6020811015612bdc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b612cf4338b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612c9357600080fd5b505afa158015612ca7573d6000803e3d6000fd5b505050506040513d6020811015612cbd57600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5257600080fd5b505afa158015612d66573d6000803e3d6000fd5b505050506040513d6020811015612d7c57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612e4257600080fd5b505afa158015612e56573d6000803e3d6000fd5b505050506040513d6020811015612e6c57600080fd5b81019080805190602001909291905050509050612eac33308b8473ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f5357600080fd5b505af1158015612f67573d6000803e3d6000fd5b505050506040513d6020811015612f7d57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561309957600080fd5b505af11580156130ad573d6000803e3d6000fd5b505050506040513d60408110156130c357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561318e57600080fd5b505af11580156131a2573d6000803e3d6000fd5b505050506040513d60208110156131b857600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561327157600080fd5b505af1158015613285573d6000803e3d6000fd5b505050506040513d602081101561329b57600080fd5b8101908080519060200190929190505050506000613407670de0b6b3a76400006133f98473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330357600080fd5b505afa158015613317573d6000803e3d6000fd5b505050506040513d602081101561332d57600080fd5b81019080805190602001909291905050506133eb670de0b6b3a76400006133dd8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561339357600080fd5b505afa1580156133a7573d6000803e3d6000fd5b505050506040513d60208110156133bd57600080fd5b81019080805190602001909291905050508b61379d90919063ffffffff16565b61379d90919063ffffffff16565b6138ab90919063ffffffff16565b6138ab90919063ffffffff16565b90506134363330838573ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156134f157600080fd5b505af1158015613505573d6000803e3d6000fd5b505050506040513d606081101561351b57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061357087828d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b60008060006135988989306148de565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156135e457600080fd5b505afa1580156135f8573d6000803e3d6000fd5b505050506040513d602081101561360e57600080fd5b8101908080519060200190929190505050905060006136328c83858c8c8c8c614ade565b915050806136a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6136d387858d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b80945050505050979650505050505050565b6137988363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614e41565b505050565b6000808314156137b0576000905061381d565b60008284029050828482816137c157fe5b0414613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061525e6021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156138a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006138ed83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061508c565b905092915050565b600061393783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615152565b905092915050565b613a26846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614e41565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613ae757600080fd5b505afa158015613afb573d6000803e3d6000fd5b505050506040513d6020811015613b1157600080fd5b81019080805190602001909291905050509050613b5133308b8473ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bf857600080fd5b505af1158015613c0c573d6000803e3d6000fd5b505050506040513d6020811015613c2257600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613d3e57600080fd5b505af1158015613d52573d6000803e3d6000fd5b505050506040513d6040811015613d6857600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613eb357600080fd5b505af1158015613ec7573d6000803e3d6000fd5b505050506040513d6020811015613edd57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6020811015613fc057600080fd5b81019080805190602001909291905050505060006140f88573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561401d57600080fd5b505afa158015614031573d6000803e3d6000fd5b505050506040513d602081101561404757600080fd5b81019080805190602001909291905050506140ea8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140a057600080fd5b505afa1580156140b4573d6000803e3d6000fd5b505050506040513d60208110156140ca57600080fd5b81019080805190602001909291905050508761379d90919063ffffffff16565b6138ab90919063ffffffff16565b90506141273330838573ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156141e457600080fd5b505af11580156141f8573d6000803e3d6000fd5b505050506040513d606081101561420e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061426187828d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b60006142a83330888b73ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000806142b68b8a306148de565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561430257600080fd5b505afa158015614316573d6000803e3d6000fd5b505050506040513d602081101561432c57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156143e657600080fd5b505af11580156143fa573d6000803e3d6000fd5b505050506040513d602081101561441057600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156144c957600080fd5b505af11580156144dd573d6000803e3d6000fd5b505050506040513d60208110156144f357600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561461457600080fd5b505af1158015614628573d6000803e3d6000fd5b505050506040513d606081101561463e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061469133848e73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b614773338c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561471257600080fd5b505afa158015614726573d6000803e3d6000fd5b505050506040513d602081101561473c57600080fd5b81019080805190602001909291905050508d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b600193505050509998505050505050505050565b60008060006147978989306148de565b9150915060006147ac8b8b858b8b8b8b614ade565b91505080614822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6148cd86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561486d57600080fd5b505afa158015614881573d6000803e3d6000fd5b505050506040513d602081101561489757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b809350505050979650505050505050565b60008060008411614957576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a043386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156149a357600080fd5b505afa1580156149b7573d6000803e3d6000fd5b505050506040513d60208110156149cd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614a8557600080fd5b505af1158015614a99573d6000803e3d6000fd5b505050506040513d6040811015614aaf57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b0657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614b97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614c3e57600080fd5b505af1158015614c52573d6000803e3d6000fd5b505050506040513d6020811015614c6857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614d31578082015181840152602081019050614d16565b505050509050019650505050505050600060405180830381600087803b158015614d5a57600080fd5b505af1158015614d6e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614d9857600080fd5b8101908080516040519392919084640100000000821115614db857600080fd5b83820191506020820185811115614dce57600080fd5b8251866020820283011164010000000082111715614deb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614e22578082015181840152602081019050614e07565b5050505090500160405250505091506001905097509795505050505050565b614e608273ffffffffffffffffffffffffffffffffffffffff16615212565b614ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614f215780518252602082019150602081019050602083039250614efe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614f83576040519150601f19603f3d011682016040523d82523d6000602084013e614f88565b606091505b509150915081615000576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156150865780806020019051602081101561501f57600080fd5b8101908080519060200190929190505050615085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806152cf602a913960400191505060405180910390fd5b5b50505050565b60008083118290615138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156150fd5780820151818401526020810190506150e2565b50505050905090810190601f16801561512a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161514457fe5b049050809150509392505050565b60008383111582906151ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156151c45780820151818401526020810190506151a9565b50505050905090810190601f1680156151f15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561525457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212203800194f3ba8fa672e6d1487a4e395f79886c2c75d6ca95a3567fcf8aa9f347664736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/artifacts/UniswapConnectorLib02.json b/artifacts/UniswapConnectorLib02.json index 76787e87..50711920 100644 --- a/artifacts/UniswapConnectorLib02.json +++ b/artifacts/UniswapConnectorLib02.json @@ -1,8 +1,8 @@ { "contractName": "UniswapConnectorLib02", "abi": [], - "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122089b4f5b941bb664b70ec41fcef9baf311b92dff65dba143dbe2527cd7269e76f64736f6c63430006020033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122089b4f5b941bb664b70ec41fcef9baf311b92dff65dba143dbe2527cd7269e76f64736f6c63430006020033", + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220faa88e0dccc68a00cfb195649eac53156aed1316c46deb5e1fde05b6dc30ffe964736f6c63430006020033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220faa88e0dccc68a00cfb195649eac53156aed1316c46deb5e1fde05b6dc30ffe964736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnector02.sol b/contracts/connectors/Uniswap/UniswapConnector02.sol index d319f953..9ae66210 100644 --- a/contracts/connectors/Uniswap/UniswapConnector02.sol +++ b/contracts/connectors/Uniswap/UniswapConnector02.sol @@ -82,7 +82,7 @@ contract UniswapConnector02 is address[] calldata path, address to, uint256 deadline - ) external override returns (bool) { + ) external override nonReentrant returns (bool) { bool success = UniswapConnectorLib02.mintLongOptionsThenSwapToTokens( router, optionToken, @@ -115,7 +115,7 @@ contract UniswapConnector02 is address[] calldata path, address to, uint256 deadline - ) external override returns (bool) { + ) external override nonReentrant returns (bool) { bool success = UniswapConnectorLib02.mintShortOptionsThenSwapToTokens( router, optionToken, diff --git a/contracts/connectors/Uniswap/UniswapConnectorLib02.sol b/contracts/connectors/Uniswap/UniswapConnectorLib02.sol index 4fa6677c..23e6a316 100644 --- a/contracts/connectors/Uniswap/UniswapConnectorLib02.sol +++ b/contracts/connectors/Uniswap/UniswapConnectorLib02.sol @@ -198,6 +198,10 @@ library UniswapConnectorLib02 { msg.sender, outputRedeems ); + IERC20(otherTokenAddress).safeTransfer( + msg.sender, + IERC20(otherTokenAddress).balanceOf(address(this)) + ); return true; } @@ -264,7 +268,7 @@ library UniswapConnectorLib02 { } /// - /// @dev Adds redeemToken liquidity to a redeem<>quote token pair by minting shortOptionTokens with underlyingTokens. + /// @dev Adds redeemToken liquidity to a redeem<>otherToken pair by minting shortOptionTokens with underlyingTokens. /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the "to" address. /// underlyingToken -> redeemToken -> UNI-V2. /// @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for. @@ -287,7 +291,7 @@ library UniswapConnectorLib02 { address to, uint256 deadline ) internal returns (bool) { - // Pull quote tokens from msg.sender to add to Uniswap V2 Pair. + // Pull otherTokens from msg.sender to add to Uniswap V2 Pair. // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted. IERC20(otherTokenAddress).safeTransferFrom( msg.sender, @@ -323,6 +327,10 @@ library UniswapConnectorLib02 { // Send longOptionTokens from minting option operation to msg.sender. IERC20(optionAddress).safeTransfer(msg.sender, outputOptions); + IERC20(otherTokenAddress).safeTransfer( + msg.sender, + IERC20(otherTokenAddress).balanceOf(address(this)) + ); return true; } diff --git a/test/test_uni_connector.spec.js b/test/test_uni_connector.spec.js index 216c8af6..e9434498 100644 --- a/test/test_uni_connector.spec.js +++ b/test/test_uni_connector.spec.js @@ -79,6 +79,24 @@ describe("UniswapConnector", () => { let uniswapFactory, uniswapRouter, uniswapConnector; let premium; + assertInvariant = async () => { + assertBNEqual( + await optionToken.balanceOf(uniswapConnector.address), + "0" + ); + assertBNEqual( + await redeemToken.balanceOf(uniswapConnector.address), + "0" + ); + assertBNEqual(await weth.balanceOf(uniswapConnector.address), "0"); + assertBNEqual(await dai.balanceOf(uniswapConnector.address), "0"); + console.log("Asserted Invariant"); + }; + + afterEach(async () => { + await assertInvariant(); + }); + before(async () => { let signers = await setup.newWallets(); @@ -144,9 +162,10 @@ describe("UniswapConnector", () => { // option <> dai: 1:10 ($10 option) 1,000 options and 10,000 dai (1,000 weth) // weth <> dai: 1:100 ($100 weth) 1,000 weth and 100,000 dai // redeem <> dai: 1:1 ($1 redeem) 100,000 redeems and 100,000 dai + // redeem <> weth: 100:1 ($1 redeem) 100,000 redeems and 1,000 weth - const totalOptions = parseEther("1000"); - const daiForOptionsPair = parseEther("100000"); + const totalOptions = parseEther("2000"); + const daiForOptionsPair = parseEther("10000"); const totalDai = parseEther("210000"); const totalWethForPair = parseEther("1000"); const totalDaiForPair = parseEther("100000"); @@ -154,7 +173,7 @@ describe("UniswapConnector", () => { premium = 10; // MINT 2,010 WETH - await weth.deposit({ from: Alice, value: parseEther("2500") }); + await weth.deposit({ from: Alice, value: parseEther("5000") }); // MINT 1,000 OPTIONS await trader.safeMint(optionToken.address, totalOptions, Alice); @@ -172,7 +191,7 @@ describe("UniswapConnector", () => { await uniswapRouter.addLiquidity( optionToken.address, dai.address, - totalOptions, + parseEther("1000"), daiForOptionsPair, 0, 0, @@ -204,6 +223,18 @@ describe("UniswapConnector", () => { deadline ); + // Add liquidity to redeem <> weth pair + await uniswapRouter.addLiquidity( + redeemToken.address, + weth.address, + totalRedeemForPair, + totalRedeemForPair.mul(base).div(quote), + 0, + 0, + Alice, + deadline + ); + // Get the pair instance to approve it to the uniswapConnector let pairAddress = await uniswapFactory.getPair( optionToken.address, @@ -332,36 +363,15 @@ describe("UniswapConnector", () => { quoteChange )} != amountOutMin ${formatEther(amountOutMin)}` ); + assertBNEqual( + await optionToken.balanceOf(uniswapConnector.address), + "0" + ); }); }); describe("addLongLiquidityWithUnderlying", () => { it("use underlyings to mint options, then provide options and quote tokens as liquidity", async () => { - console.log( - `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` - ); - - console.log( - `Quote balance: ${formatEther( - await quoteToken.balanceOf(Alice) - )}` - ); - console.log( - `Redeem balance: ${formatEther( - await redeemToken.balanceOf(Alice) - )}` - ); - console.log( - `Option balance: ${formatEther( - await optionToken.balanceOf(Alice) - )}` - ); - console.log( - `Option balance of connector: ${formatEther( - await optionToken.balanceOf(uniswapConnector.address) - )}` - ); - let underlyingBalanceBefore = await underlyingToken.balanceOf( Alice ); @@ -369,7 +379,7 @@ describe("UniswapConnector", () => { let optionAddress = optionToken.address; let quantityOptions = ONE_ETHER; - let quantityQuoteTokens = quantityOptions.mul(quote).div(base); + let quantityQuoteTokens = quantityOptions.mul(premium); let amountADesired = quantityOptions; let amountBDesired = quantityQuoteTokens; let amountAMin = amountADesired; @@ -377,20 +387,6 @@ describe("UniswapConnector", () => { let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; - let sortedTokens = utils.sortTokens( - optionToken.address, - quoteToken.address - ); - let pairAddress = await uniswapFactory.getPair( - sortedTokens[0], - sortedTokens[1] - ); - let pair = new ethers.Contract( - pairAddress, - UniswapV2Pair.abi, - Admin - ); - let [reserveA, reserveB] = await getReserves( Admin, uniswapFactory, @@ -405,7 +401,6 @@ describe("UniswapConnector", () => { reserves[1] ); - console.log(formatEther(reserves[1]), formatEther(reserves[0])); let amountAOptimal = await uniswapRouter.quote( amountBDesired, reserves[1], @@ -420,13 +415,7 @@ describe("UniswapConnector", () => { amountAOptimal, amountBOptimal ); - //amountAMin = amounts[0].mul(995).div(1000).toString(); - //amountBMin = amounts[1].mul(995).div(1000).toString(); - console.log( - `${formatEther(amountAMin)}, ${formatEther( - amountAOptimal - )}, ${formatEther(amountBOptimal)},${formatEther(amountBMin)}` - ); + await uniswapConnector.addLongLiquidityWithUnderlying( optionAddress, quoteToken.address, @@ -450,7 +439,11 @@ describe("UniswapConnector", () => { let quoteChange = quoteBalanceAfter.sub(quoteBalanceBefore); assertBNEqual(underlyingChange.toString(), amountADesired.mul(-1)); - assertBNEqual(quoteChange.toString(), amountBDesired.mul(-1)); + assert.equal( + quoteChange >= amountBDesired.mul(-1), + true, + `${formatEther(quoteChange)} !<= ${formatEther(amountBDesired)}` + ); assert.equal( underlyingChange.mul(-1) <= amountAMin, true, @@ -465,97 +458,110 @@ describe("UniswapConnector", () => { quoteChange )} != amountBMin ${formatEther(amountBMin)}` ); + }); + }); - console.log( - `Underlying: ${formatEther( - underlyingChange - )}, Quote: ${formatEther(quoteChange)}, amounts0 ${formatEther( - amountAMin - )}, amounts1 ${formatEther(amountBMin)}` + describe("addShortLiquidityWithUnderlying", () => { + it("use underlyings to mint options, then provide short options and underlying tokens as liquidity", async () => { + let underlyingBalanceBefore = await underlyingToken.balanceOf( + Alice ); + let quoteBalanceBefore = await quoteToken.balanceOf(Alice); + let redeemBalanceBefore = await redeemToken.balanceOf(Alice); + let optionBalanceBefore = await optionToken.balanceOf(Alice); - console.log( - `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` - ); + let optionAddress = optionToken.address; + let amountADesired = ONE_ETHER; // amount of options to mint 1:100 + let amountBDesired = amountADesired.mul(105).div(100); // amount of otherTokens to provide = 1.05:1 redem:weth + let amountAMin = amountADesired; + let amountBMin = 0; + let to = Alice; + let deadline = Math.floor(Date.now() / 1000) + 60 * 20; - console.log( - `Quote balance: ${formatEther( - await quoteToken.balanceOf(Alice) - )}` - ); + let path = [redeemToken.address, underlyingToken.address]; - console.log( - `Redeem balance: ${formatEther( - await redeemToken.balanceOf(Alice) - )}` + let [reserveA, reserveB] = await getReserves( + Admin, + uniswapFactory, + path[0], + path[1] ); + reserves = [reserveA, reserveB]; - console.log( - `Option balance: ${formatEther( - await optionToken.balanceOf(Alice) - )}` + let amountBOptimal = await uniswapRouter.quote( + amountADesired, + reserves[0], + reserves[1] ); - console.log( - `Option balance of connector: ${formatEther( - await optionToken.balanceOf(uniswapConnector.address) - )}` + let amountAOptimal = await uniswapRouter.quote( + amountBDesired, + reserves[1], + reserves[0] ); - }); - }); - describe("addShortLiquidityWithUnderlying", () => { - it("use underlyings to mint options, then provide options and quote tokens as liquidity", async () => { - /* Function ABI - function addShortLiquidityWithUnderlying( - address optionAddress, - uint256 quantityOptions, - uint256 quantityQuoteTokens, - uint256 minQuantityOptions, - uint256 minQuantityQuoteTokens, - address to, - uint256 deadline - ) public nonReentrant returns (bool) { - */ + [, amountBMin] = await _addLiquidity( + uniswapRouter, + reserves, + amountADesired, + amountBDesired, + amountAOptimal, + amountBOptimal + ); - let optionAddress = optionToken.address; - let quantityOptions = ONE_ETHER; - let quantityQuoteTokens = ONE_ETHER; - let minQuantityOptions = 0; - let minQuantityQuoteTokens = 0; - let to = Alice; - let deadline = Math.floor(Date.now() / 1000) + 60 * 20; await uniswapConnector.addShortLiquidityWithUnderlying( optionAddress, - weth.address, - quantityOptions, - quantityQuoteTokens, - minQuantityOptions, - minQuantityQuoteTokens, + underlyingToken.address, + amountADesired, + amountBDesired, + amountAMin, + amountBMin, to, deadline ); + + let underlyingBalanceAfter = await underlyingToken.balanceOf(Alice); + let quoteBalanceAfter = await quoteToken.balanceOf(Alice); + let redeemBalanceAfter = await redeemToken.balanceOf(Alice); + let optionBalanceAfter = await optionToken.balanceOf(Alice); + + // Used underlyings to mint options (Alice) + let underlyingChange = underlyingBalanceAfter.sub( + underlyingBalanceBefore + ); + // Purchased quoteTokens with our options (Alice) + let quoteChange = quoteBalanceAfter.sub(quoteBalanceBefore); + // Sold options for quoteTokens to the pair, pair has more options (Pair) + let optionChange = optionBalanceAfter.sub(optionBalanceBefore); + let redeemChange = redeemBalanceAfter.sub(redeemBalanceBefore); + + assertBNEqual(optionChange.toString(), amountADesired); // kept options + assertBNEqual(redeemChange.toString(), "0"); // kept options + assert.equal( + quoteChange.toString() == "0", + true, + `quoteDelta ${formatEther( + quoteChange + )} != amountBMin ${formatEther(amountBMin)}` + ); }); }); describe("removeLongLiquidityThenCloseOptions", () => { it("burns UNI-V2 lp shares, then closes the withdrawn optionTokens", async () => { - /* Function ABI - function removeLongLiquidityThenCloseOptions( - address optionAddress, - uint256 liquidity, - uint256 amountAMin, - uint256 amountBMin, - address to, - uint256 deadline - ) public nonReentrant returns (uint256, uint256) { - */ + let underlyingBalanceBefore = await underlyingToken.balanceOf( + Alice + ); + let quoteBalanceBefore = await quoteToken.balanceOf(Alice); + let redeemBalanceBefore = await redeemToken.balanceOf(Alice); + let optionBalanceBefore = await optionToken.balanceOf(Alice); let optionAddress = optionToken.address; let liquidity = ONE_ETHER; + let path = [optionToken.address, quoteToken.address]; let pairAddress = await uniswapConnector.getUniswapMarketForTokens( - optionToken.address, - quoteToken.address + path[0], + path[1] ); let pair = new ethers.Contract( pairAddress, @@ -575,10 +581,20 @@ describe("UniswapConnector", () => { true, "err pair not deployed" ); - let amountAMin = 0; - let amountBMin = 0; + + let totalSupply = await pair.totalSupply(); + let amount0 = liquidity + .mul(await optionToken.balanceOf(pairAddress)) + .div(totalSupply); + let amount1 = liquidity + .mul(await quoteToken.balanceOf(pairAddress)) + .div(totalSupply); + + let amountAMin = amount0; + let amountBMin = amount1; let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; + await uniswapConnector.removeLongLiquidityThenCloseOptions( optionAddress, quoteToken.address, @@ -588,27 +604,47 @@ describe("UniswapConnector", () => { to, deadline ); + + let underlyingBalanceAfter = await underlyingToken.balanceOf(Alice); + let quoteBalanceAfter = await quoteToken.balanceOf(Alice); + let redeemBalanceAfter = await redeemToken.balanceOf(Alice); + let optionBalanceAfter = await optionToken.balanceOf(Alice); + + // Used underlyings to mint options (Alice) + let underlyingChange = underlyingBalanceAfter.sub( + underlyingBalanceBefore + ); + // Purchased quoteTokens with our options (Alice) + let quoteChange = quoteBalanceAfter.sub(quoteBalanceBefore); + // Sold options for quoteTokens to the pair, pair has more options (Pair) + let optionChange = optionBalanceAfter.sub(optionBalanceBefore); + let redeemChange = redeemBalanceAfter.sub(redeemBalanceBefore); + + assertBNEqual(underlyingChange.toString(), amountAMin); + assertBNEqual(optionChange.toString(), "0"); + assertBNEqual(quoteChange.toString(), amountBMin); + assertBNEqual( + redeemChange.mul(-1).toString(), + amountAMin.mul(quote).div(base) + ); }); }); describe("removeShortLiquidityThenCloseOptions", () => { - it("burns UNI-V2 lp shares, then closes the withdrawn optionTokens", async () => { - /* Function ABI - function removeShortLiquidityThenCloseOptions( - address optionAddress, - uint256 liquidity, - uint256 amountAMin, - uint256 amountBMin, - address to, - uint256 deadline - ) public nonReentrant returns (uint256, uint256) { - */ + it("burns UNI-V2 lp shares, then closes the withdrawn shortTokens", async () => { + let underlyingBalanceBefore = await underlyingToken.balanceOf( + Alice + ); + let quoteBalanceBefore = await quoteToken.balanceOf(Alice); + let redeemBalanceBefore = await redeemToken.balanceOf(Alice); + let optionBalanceBefore = await optionToken.balanceOf(Alice); let optionAddress = optionToken.address; let liquidity = ONE_ETHER; + let path = [redeemToken.address, weth.address]; let pairAddress = await uniswapConnector.getUniswapMarketForTokens( - redeemToken.address, - weth.address + path[0], + path[1] ); let pair = new ethers.Contract( pairAddress, @@ -628,10 +664,20 @@ describe("UniswapConnector", () => { true, "err pair not deployed" ); - let amountAMin = 0; - let amountBMin = 0; + + let totalSupply = await pair.totalSupply(); + let amount0 = liquidity + .mul(await redeemToken.balanceOf(pairAddress)) + .div(totalSupply); + let amount1 = liquidity + .mul(await weth.balanceOf(pairAddress)) + .div(totalSupply); + + let amountAMin = amount0; + let amountBMin = amount1; let to = Alice; let deadline = Math.floor(Date.now() / 1000) + 60 * 20; + await uniswapConnector.removeShortLiquidityThenCloseOptions( optionAddress, weth.address, @@ -641,6 +687,32 @@ describe("UniswapConnector", () => { to, deadline ); + + let underlyingBalanceAfter = await underlyingToken.balanceOf(Alice); + let quoteBalanceAfter = await quoteToken.balanceOf(Alice); + let redeemBalanceAfter = await redeemToken.balanceOf(Alice); + let optionBalanceAfter = await optionToken.balanceOf(Alice); + + // Used underlyings to mint options (Alice) + let underlyingChange = underlyingBalanceAfter.sub( + underlyingBalanceBefore + ); + // Purchased quoteTokens with our options (Alice) + let quoteChange = quoteBalanceAfter.sub(quoteBalanceBefore); + // Sold options for quoteTokens to the pair, pair has more options (Pair) + let optionChange = optionBalanceAfter.sub(optionBalanceBefore); + let redeemChange = redeemBalanceAfter.sub(redeemBalanceBefore); + + assertBNEqual( + underlyingChange.toString(), + amountAMin.mul(base).div(quote).add(amountBMin) + ); + assertBNEqual( + optionChange.toString(), + amountAMin.mul(base).div(quote).mul(-1) + ); + assertBNEqual(quoteChange.toString(), "0"); + assertBNEqual(redeemChange.toString(), "0"); }); }); @@ -781,29 +853,29 @@ describe("UniswapConnector", () => { it("gets a flash loan for underlyings, mints options, swaps redeem to underlyings to pay back", async () => { // Create a Uniswap V2 Pair and add liquidity. - console.log( - `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` - ); - console.log( - `Redeem balance: ${formatEther( - await redeemToken.balanceOf(Alice) - )}` + + let underlyingBalanceBefore = await underlyingToken.balanceOf( + Alice ); + let quoteBalanceBefore = await quoteToken.balanceOf(Alice); + let redeemBalanceBefore = await redeemToken.balanceOf(Alice); + let optionBalanceBefore = await optionToken.balanceOf(Alice); console.log( - `Option balance: ${formatEther( - await optionToken.balanceOf(Alice) - )}` + `Weth balance: ${formatEther(underlyingBalanceBefore)}` ); + console.log(`Dai balance: ${formatEther(quoteBalanceBefore)}`); + console.log(`Redeem balance: ${formatEther(redeemBalanceBefore)}`); + console.log(`Option balance: ${formatEther(optionBalanceBefore)}`); // Get the pair instance to approve it to the uniswapConnector let amountOptions = ONE_ETHER; let amountRedeems = amountOptions.mul(quote).div(base); - let amountOutMin = "0"; let amounts = await uniswapRouter.getAmountsOut(amountRedeems, [ redeemToken.address, weth.address, ]); + let amountOutMin = amounts[1]; let remainder = amountOptions .mul(1000) .add(amountOptions.mul(3)) @@ -819,21 +891,35 @@ describe("UniswapConnector", () => { .to.emit(uniswapConnector, "FlashOpened") .withArgs(uniswapConnector.address, amountOptions, remainder); - console.log( - `Weth balance: ${formatEther(await weth.balanceOf(Alice))}` - ); + let underlyingBalanceAfter = await underlyingToken.balanceOf(Alice); + let quoteBalanceAfter = await quoteToken.balanceOf(Alice); + let redeemBalanceAfter = await redeemToken.balanceOf(Alice); + let optionBalanceAfter = await optionToken.balanceOf(Alice); - console.log( - `Redeem balance: ${formatEther( - await redeemToken.balanceOf(Alice) - )}` + // Used underlyings to mint options (Alice) + let underlyingChange = underlyingBalanceAfter.sub( + underlyingBalanceBefore ); + // Purchased quoteTokens with our options (Alice) + let quoteChange = quoteBalanceAfter.sub(quoteBalanceBefore); + // Sold options for quoteTokens to the pair, pair has more options (Pair) + let optionChange = optionBalanceAfter.sub(optionBalanceBefore); + let redeemChange = redeemBalanceAfter.sub(redeemBalanceBefore); - console.log( - `Option balance: ${formatEther( - await optionToken.balanceOf(Alice) - )}` + assert.equal( + underlyingChange.toString() <= + amountOptions.mul(-1).add(remainder), + true, + `${formatEther(underlyingChange)} ${formatEther(amountOptions)}` ); + assertBNEqual(optionChange.toString(), amountOptions); + assertBNEqual(quoteChange.toString(), "0"); + assertBNEqual(redeemChange.toString(), "0"); + + console.log(`Weth balance: ${formatEther(underlyingBalanceAfter)}`); + console.log(`Dai balance: ${formatEther(quoteBalanceAfter)}`); + console.log(`Redeem balance: ${formatEther(redeemBalanceAfter)}`); + console.log(`Option balance: ${formatEther(optionBalanceAfter)}`); }); }); }); From ce673d677c1d1ce7abbb691549007ca8472fe555 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 20:26:36 -0700 Subject: [PATCH 19/20] Added revert test for the flash open. --- artifacts/UniswapConnector02.json | 4 ++-- .../connectors/Uniswap/UniswapConnector02.sol | 1 + test/test_uni_connector.spec.js | 19 ++++++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/artifacts/UniswapConnector02.json b/artifacts/UniswapConnector02.json index 489b551c..bf2b0fb9 100644 --- a/artifacts/UniswapConnector02.json +++ b/artifacts/UniswapConnector02.json @@ -579,8 +579,8 @@ "type": "function" } ], - "bytecode": "0x60806040523480156200001157600080fd5b506040516200570c3803806200570c833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a250505061532e80620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b604051808215151515815260200191505060405180910390f35b610718611a9c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ac2565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611c0d565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506123d6565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506124d4565b604051808215151515815260200191505060405180910390f35b610a57612610565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612636565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b6127f6565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612d07565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061139f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989613588565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561152b57600080fd5b505afa15801561153f573d6000803e3d6000fd5b505050506040513d602081101561155557600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061158c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61164887878373ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156116c957600080fd5b505af11580156116dd573d6000803e3d6000fd5b505050506040513d60408110156116f357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156117b1578082015181840152602081019050611796565b50505050905001935050505060006040518083038186803b1580156117d557600080fd5b505afa1580156117e9573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561181357600080fd5b810190808051604051939291908464010000000082111561183357600080fd5b8382019150602082018581111561184957600080fd5b825186602082028301116401000000008211171561186657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561189d578082015181840152602081019050611882565b5050505090500160405250505090506000808b90506000836001815181106118c157fe5b6020026020010151905061192b8161191d6103e861190f6118ec60038861379d90919063ffffffff16565b6119016103e88961379d90919063ffffffff16565b61382390919063ffffffff16565b6138ab90919063ffffffff16565b6138f590919063ffffffff16565b925050506119da8d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561197a57600080fd5b505afa15801561198e573d6000803e3d6000fd5b505050506040513d60208110156119a457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b611a07888e838673ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a2505050611a8b85838b73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611b46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611bdb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613a2c565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611c90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cf257600080fd5b505afa158015611d06573d6000803e3d6000fd5b505050506040513d6020811015611d1c57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7757600080fd5b505afa158015611d8b573d6000803e3d6000fd5b505050506040513d6020811015611da157600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611e8957600080fd5b505afa158015611e9d573d6000803e3d6000fd5b505050506040513d6020811015611eb357600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611ef85781602001602082028038833980820191505090505b5090508381600081518110611f0957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611f5157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000829050600060405180608001604052806050815260200161527f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156120a557808201518184015260208101905061208a565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217357600080fd5b505afa158015612187573d6000803e3d6000fd5b505050506040513d602081101561219d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d05760006121d2565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561223357600080fd5b505afa158015612247573d6000803e3d6000fd5b505050506040513d602081101561225d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461228f578b612292565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612341578082015181840152602081019050612326565b50505050905090810190601f16801561236e5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561239057600080fd5b505af11580156123a4573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff16612459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006124a8600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614279565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60008060009054906101000a900460ff16612557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006125e5600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614787565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561270c57600080fd5b505afa158015612720573d6000803e3d6000fd5b505050506040513d602081101561273657600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006128253330888b73ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000806128338b8a306148de565b9150915088821461284057fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156128e757600080fd5b505af11580156128fb573d6000803e3d6000fd5b505050506040513d602081101561291157600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156129ca57600080fd5b505af11580156129de573d6000803e3d6000fd5b505050506040513d60208110156129f457600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612b1557600080fd5b505af1158015612b29573d6000803e3d6000fd5b505050506040513d6060811015612b3f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612c1233828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bb257600080fd5b505afa158015612bc6573d6000803e3d6000fd5b505050506040513d6020811015612bdc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b612cf4338b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612c9357600080fd5b505afa158015612ca7573d6000803e3d6000fd5b505050506040513d6020811015612cbd57600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5257600080fd5b505afa158015612d66573d6000803e3d6000fd5b505050506040513d6020811015612d7c57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612e4257600080fd5b505afa158015612e56573d6000803e3d6000fd5b505050506040513d6020811015612e6c57600080fd5b81019080805190602001909291905050509050612eac33308b8473ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f5357600080fd5b505af1158015612f67573d6000803e3d6000fd5b505050506040513d6020811015612f7d57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561309957600080fd5b505af11580156130ad573d6000803e3d6000fd5b505050506040513d60408110156130c357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561318e57600080fd5b505af11580156131a2573d6000803e3d6000fd5b505050506040513d60208110156131b857600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561327157600080fd5b505af1158015613285573d6000803e3d6000fd5b505050506040513d602081101561329b57600080fd5b8101908080519060200190929190505050506000613407670de0b6b3a76400006133f98473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330357600080fd5b505afa158015613317573d6000803e3d6000fd5b505050506040513d602081101561332d57600080fd5b81019080805190602001909291905050506133eb670de0b6b3a76400006133dd8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561339357600080fd5b505afa1580156133a7573d6000803e3d6000fd5b505050506040513d60208110156133bd57600080fd5b81019080805190602001909291905050508b61379d90919063ffffffff16565b61379d90919063ffffffff16565b6138ab90919063ffffffff16565b6138ab90919063ffffffff16565b90506134363330838573ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156134f157600080fd5b505af1158015613505573d6000803e3d6000fd5b505050506040513d606081101561351b57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061357087828d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b60008060006135988989306148de565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156135e457600080fd5b505afa1580156135f8573d6000803e3d6000fd5b505050506040513d602081101561360e57600080fd5b8101908080519060200190929190505050905060006136328c83858c8c8c8c614ade565b915050806136a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6136d387858d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b80945050505050979650505050505050565b6137988363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614e41565b505050565b6000808314156137b0576000905061381d565b60008284029050828482816137c157fe5b0414613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061525e6021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156138a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006138ed83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061508c565b905092915050565b600061393783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615152565b905092915050565b613a26846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614e41565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613ae757600080fd5b505afa158015613afb573d6000803e3d6000fd5b505050506040513d6020811015613b1157600080fd5b81019080805190602001909291905050509050613b5133308b8473ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bf857600080fd5b505af1158015613c0c573d6000803e3d6000fd5b505050506040513d6020811015613c2257600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613d3e57600080fd5b505af1158015613d52573d6000803e3d6000fd5b505050506040513d6040811015613d6857600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613eb357600080fd5b505af1158015613ec7573d6000803e3d6000fd5b505050506040513d6020811015613edd57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6020811015613fc057600080fd5b81019080805190602001909291905050505060006140f88573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561401d57600080fd5b505afa158015614031573d6000803e3d6000fd5b505050506040513d602081101561404757600080fd5b81019080805190602001909291905050506140ea8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140a057600080fd5b505afa1580156140b4573d6000803e3d6000fd5b505050506040513d60208110156140ca57600080fd5b81019080805190602001909291905050508761379d90919063ffffffff16565b6138ab90919063ffffffff16565b90506141273330838573ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156141e457600080fd5b505af11580156141f8573d6000803e3d6000fd5b505050506040513d606081101561420e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061426187828d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b60006142a83330888b73ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000806142b68b8a306148de565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561430257600080fd5b505afa158015614316573d6000803e3d6000fd5b505050506040513d602081101561432c57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156143e657600080fd5b505af11580156143fa573d6000803e3d6000fd5b505050506040513d602081101561441057600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156144c957600080fd5b505af11580156144dd573d6000803e3d6000fd5b505050506040513d60208110156144f357600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561461457600080fd5b505af1158015614628573d6000803e3d6000fd5b505050506040513d606081101561463e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061469133848e73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b614773338c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561471257600080fd5b505afa158015614726573d6000803e3d6000fd5b505050506040513d602081101561473c57600080fd5b81019080805190602001909291905050508d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b600193505050509998505050505050505050565b60008060006147978989306148de565b9150915060006147ac8b8b858b8b8b8b614ade565b91505080614822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6148cd86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561486d57600080fd5b505afa158015614881573d6000803e3d6000fd5b505050506040513d602081101561489757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b809350505050979650505050505050565b60008060008411614957576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a043386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156149a357600080fd5b505afa1580156149b7573d6000803e3d6000fd5b505050506040513d60208110156149cd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614a8557600080fd5b505af1158015614a99573d6000803e3d6000fd5b505050506040513d6040811015614aaf57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b0657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614b97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614c3e57600080fd5b505af1158015614c52573d6000803e3d6000fd5b505050506040513d6020811015614c6857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614d31578082015181840152602081019050614d16565b505050509050019650505050505050600060405180830381600087803b158015614d5a57600080fd5b505af1158015614d6e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614d9857600080fd5b8101908080516040519392919084640100000000821115614db857600080fd5b83820191506020820185811115614dce57600080fd5b8251866020820283011164010000000082111715614deb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614e22578082015181840152602081019050614e07565b5050505090500160405250505091506001905097509795505050505050565b614e608273ffffffffffffffffffffffffffffffffffffffff16615212565b614ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614f215780518252602082019150602081019050602083039250614efe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614f83576040519150601f19603f3d011682016040523d82523d6000602084013e614f88565b606091505b509150915081615000576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156150865780806020019051602081101561501f57600080fd5b8101908080519060200190929190505050615085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806152cf602a913960400191505060405180910390fd5b5b50505050565b60008083118290615138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156150fd5780820151818401526020810190506150e2565b50505050905090810190601f16801561512a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161514457fe5b049050809150509392505050565b60008383111582906151ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156151c45780820151818401526020810190506151a9565b50505050905090810190601f1680156151f15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561525457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212203800194f3ba8fa672e6d1487a4e395f79886c2c75d6ca95a3567fcf8aa9f347664736f6c63430006020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b604051808215151515815260200191505060405180910390f35b610718611a9c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ac2565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611c0d565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506123d6565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506124d4565b604051808215151515815260200191505060405180910390f35b610a57612610565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612636565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b6127f6565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612d07565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061139f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989613588565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561152b57600080fd5b505afa15801561153f573d6000803e3d6000fd5b505050506040513d602081101561155557600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061158c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61164887878373ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156116c957600080fd5b505af11580156116dd573d6000803e3d6000fd5b505050506040513d60408110156116f357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156117b1578082015181840152602081019050611796565b50505050905001935050505060006040518083038186803b1580156117d557600080fd5b505afa1580156117e9573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561181357600080fd5b810190808051604051939291908464010000000082111561183357600080fd5b8382019150602082018581111561184957600080fd5b825186602082028301116401000000008211171561186657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561189d578082015181840152602081019050611882565b5050505090500160405250505090506000808b90506000836001815181106118c157fe5b6020026020010151905061192b8161191d6103e861190f6118ec60038861379d90919063ffffffff16565b6119016103e88961379d90919063ffffffff16565b61382390919063ffffffff16565b6138ab90919063ffffffff16565b6138f590919063ffffffff16565b925050506119da8d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561197a57600080fd5b505afa15801561198e573d6000803e3d6000fd5b505050506040513d60208110156119a457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b611a07888e838673ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a2505050611a8b85838b73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611b46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611bdb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613a2c565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611c90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cf257600080fd5b505afa158015611d06573d6000803e3d6000fd5b505050506040513d6020811015611d1c57600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7757600080fd5b505afa158015611d8b573d6000803e3d6000fd5b505050506040513d6020811015611da157600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611e8957600080fd5b505afa158015611e9d573d6000803e3d6000fd5b505050506040513d6020811015611eb357600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611ef85781602001602082028038833980820191505090505b5090508381600081518110611f0957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611f5157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000829050600060405180608001604052806050815260200161527f60509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156120a557808201518184015260208101905061208a565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561217357600080fd5b505afa158015612187573d6000803e3d6000fd5b505050506040513d602081101561219d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146121d05760006121d2565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561223357600080fd5b505afa158015612247573d6000803e3d6000fd5b505050506040513d602081101561225d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461228f578b612292565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612341578082015181840152602081019050612326565b50505050905090810190601f16801561236e5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561239057600080fd5b505af11580156123a4573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff16612459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006124a8600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b614279565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60008060009054906101000a900460ff16612557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060006125e5600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508989614787565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561270c57600080fd5b505afa158015612720573d6000803e3d6000fd5b505050506040513d602081101561273657600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b60006128253330888b73ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000806128338b8a306148de565b9150915088821461284057fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156128e757600080fd5b505af11580156128fb573d6000803e3d6000fd5b505050506040513d602081101561291157600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156129ca57600080fd5b505af11580156129de573d6000803e3d6000fd5b505050506040513d60208110156129f457600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612b1557600080fd5b505af1158015612b29573d6000803e3d6000fd5b505050506040513d6060811015612b3f57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612c1233828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bb257600080fd5b505afa158015612bc6573d6000803e3d6000fd5b505050506040513d6020811015612bdc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b612cf4338b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612c9357600080fd5b505afa158015612ca7573d6000803e3d6000fd5b505050506040513d6020811015612cbd57600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5257600080fd5b505afa158015612d66573d6000803e3d6000fd5b505050506040513d6020811015612d7c57600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612e4257600080fd5b505afa158015612e56573d6000803e3d6000fd5b505050506040513d6020811015612e6c57600080fd5b81019080805190602001909291905050509050612eac33308b8473ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f5357600080fd5b505af1158015612f67573d6000803e3d6000fd5b505050506040513d6020811015612f7d57600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561309957600080fd5b505af11580156130ad573d6000803e3d6000fd5b505050506040513d60408110156130c357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561318e57600080fd5b505af11580156131a2573d6000803e3d6000fd5b505050506040513d60208110156131b857600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561327157600080fd5b505af1158015613285573d6000803e3d6000fd5b505050506040513d602081101561329b57600080fd5b8101908080519060200190929190505050506000613407670de0b6b3a76400006133f98473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561330357600080fd5b505afa158015613317573d6000803e3d6000fd5b505050506040513d602081101561332d57600080fd5b81019080805190602001909291905050506133eb670de0b6b3a76400006133dd8873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561339357600080fd5b505afa1580156133a7573d6000803e3d6000fd5b505050506040513d60208110156133bd57600080fd5b81019080805190602001909291905050508b61379d90919063ffffffff16565b61379d90919063ffffffff16565b6138ab90919063ffffffff16565b6138ab90919063ffffffff16565b90506134363330838573ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156134f157600080fd5b505af1158015613505573d6000803e3d6000fd5b505050506040513d606081101561351b57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050505061357087828d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b60008060006135988989306148de565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156135e457600080fd5b505afa1580156135f8573d6000803e3d6000fd5b505050506040513d602081101561360e57600080fd5b8101908080519060200190929190505050905060006136328c83858c8c8c8c614ade565b915050806136a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6136d387858d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b80945050505050979650505050505050565b6137988363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614e41565b505050565b6000808314156137b0576000905061381d565b60008284029050828482816137c157fe5b0414613818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061525e6021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156138a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006138ed83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061508c565b905092915050565b600061393783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250615152565b905092915050565b613a26846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614e41565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613ae757600080fd5b505afa158015613afb573d6000803e3d6000fd5b505050506040513d6020811015613b1157600080fd5b81019080805190602001909291905050509050613b5133308b8473ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613bf857600080fd5b505af1158015613c0c573d6000803e3d6000fd5b505050506040513d6020811015613c2257600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613d3e57600080fd5b505af1158015613d52573d6000803e3d6000fd5b505050506040513d6040811015613d6857600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613dcf57600080fd5b505afa158015613de3573d6000803e3d6000fd5b505050506040513d6020811015613df957600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613eb357600080fd5b505af1158015613ec7573d6000803e3d6000fd5b505050506040513d6020811015613edd57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f9657600080fd5b505af1158015613faa573d6000803e3d6000fd5b505050506040513d6020811015613fc057600080fd5b81019080805190602001909291905050505060006140f88573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561401d57600080fd5b505afa158015614031573d6000803e3d6000fd5b505050506040513d602081101561404757600080fd5b81019080805190602001909291905050506140ea8773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140a057600080fd5b505afa1580156140b4573d6000803e3d6000fd5b505050506040513d60208110156140ca57600080fd5b81019080805190602001909291905050508761379d90919063ffffffff16565b6138ab90919063ffffffff16565b90506141273330838573ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b1580156141e457600080fd5b505af11580156141f8573d6000803e3d6000fd5b505050506040513d606081101561420e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061426187828d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b60006142a83330888b73ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000806142b68b8a306148de565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561430257600080fd5b505afa158015614316573d6000803e3d6000fd5b505050506040513d602081101561432c57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156143e657600080fd5b505af11580156143fa573d6000803e3d6000fd5b505050506040513d602081101561441057600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156144c957600080fd5b505af11580156144dd573d6000803e3d6000fd5b505050506040513d60208110156144f357600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561461457600080fd5b505af1158015614628573d6000803e3d6000fd5b505050506040513d606081101561463e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061469133848e73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b614773338c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561471257600080fd5b505afa158015614726573d6000803e3d6000fd5b505050506040513d602081101561473c57600080fd5b81019080805190602001909291905050508d73ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b600193505050509998505050505050505050565b60008060006147978989306148de565b9150915060006147ac8b8b858b8b8b8b614ade565b91505080614822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b6148cd86838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561486d57600080fd5b505afa158015614881573d6000803e3d6000fd5b505050506040513d602081101561489757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166136e59092919063ffffffff16565b809350505050979650505050505050565b60008060008411614957576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a043386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156149a357600080fd5b505afa1580156149b7573d6000803e3d6000fd5b505050506040513d60208110156149cd57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661393f909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614a8557600080fd5b505af1158015614a99573d6000803e3d6000fd5b505050506040513d6040811015614aaf57600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b0657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614b97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614c3e57600080fd5b505af1158015614c52573d6000803e3d6000fd5b505050506040513d6020811015614c6857600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614d31578082015181840152602081019050614d16565b505050509050019650505050505050600060405180830381600087803b158015614d5a57600080fd5b505af1158015614d6e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614d9857600080fd5b8101908080516040519392919084640100000000821115614db857600080fd5b83820191506020820185811115614dce57600080fd5b8251866020820283011164010000000082111715614deb57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614e22578082015181840152602081019050614e07565b5050505090500160405250505091506001905097509795505050505050565b614e608273ffffffffffffffffffffffffffffffffffffffff16615212565b614ed2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614f215780518252602082019150602081019050602083039250614efe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614f83576040519150601f19603f3d011682016040523d82523d6000602084013e614f88565b606091505b509150915081615000576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156150865780806020019051602081101561501f57600080fd5b8101908080519060200190929190505050615085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806152cf602a913960400191505060405180910390fd5b5b50505050565b60008083118290615138576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156150fd5780820151818401526020810190506150e2565b50505050905090810190601f16801561512a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161514457fe5b049050809150509392505050565b60008383111582906151ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156151c45780820151818401526020810190506151a9565b50505050905090810190601f1680156151f15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561525457506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212203800194f3ba8fa672e6d1487a4e395f79886c2c75d6ca95a3567fcf8aa9f347664736f6c63430006020033", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200578238038062005782833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a25050506153a480620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b604051808215151515815260200191505060405180910390f35b610718611b12565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b38565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611c83565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061244c565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061254a565b604051808215151515815260200191505060405180910390f35b610a57612686565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61286c565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612d7d565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061139f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505089896135fe565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561152b57600080fd5b505afa15801561153f573d6000803e3d6000fd5b505050506040513d602081101561155557600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061158c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61164887878373ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156116c957600080fd5b505af11580156116dd573d6000803e3d6000fd5b505050506040513d60408110156116f357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156117b1578082015181840152602081019050611796565b50505050905001935050505060006040518083038186803b1580156117d557600080fd5b505afa1580156117e9573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561181357600080fd5b810190808051604051939291908464010000000082111561183357600080fd5b8382019150602082018581111561184957600080fd5b825186602082028301116401000000008211171561186657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561189d578082015181840152602081019050611882565b5050505090500160405250505090506000808b90506000836001815181106118c157fe5b602002602001015190508b811015611941576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f414d4f554e545f544f4f5f4c4f57000000000000000000000000000081525060200191505060405180910390fd5b6119a1816119936103e861198561196260038861381390919063ffffffff16565b6119776103e88961381390919063ffffffff16565b61389990919063ffffffff16565b61392190919063ffffffff16565b61396b90919063ffffffff16565b92505050611a508d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f057600080fd5b505afa158015611a04573d6000803e3d6000fd5b505050506040513d6020811015611a1a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b611a7d888e838673ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a2505050611b0185838b73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611bbc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611c51600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613aa2565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611d06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d6857600080fd5b505afa158015611d7c573d6000803e3d6000fd5b505050506040513d6020811015611d9257600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611ded57600080fd5b505afa158015611e01573d6000803e3d6000fd5b505050506040513d6020811015611e1757600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611eff57600080fd5b505afa158015611f13573d6000803e3d6000fd5b505050506040513d6020811015611f2957600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611f6e5781602001602082028038833980820191505090505b5090508381600081518110611f7f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611fc757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605081526020016152f560509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b8381101561211b578082015181840152602081019050612100565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156121e957600080fd5b505afa1580156121fd573d6000803e3d6000fd5b505050506040513d602081101561221357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612246576000612248565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a957600080fd5b505afa1580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612305578b612308565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156123b757808201518184015260208101905061239c565b50505050905090810190601f1680156123e45780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561240657600080fd5b505af115801561241a573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166124cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061251e600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b6142ef565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60008060009054906101000a900460ff166125cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061265b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505089896147fd565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561278257600080fd5b505afa158015612796573d6000803e3d6000fd5b505050506040513d60208110156127ac57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612862576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600061289b3330888b73ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b6000806128a98b8a30614954565b915091508882146128b657fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561295d57600080fd5b505af1158015612971573d6000803e3d6000fd5b505050506040513d602081101561298757600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612a4057600080fd5b505af1158015612a54573d6000803e3d6000fd5b505050506040513d6020811015612a6a57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612b8b57600080fd5b505af1158015612b9f573d6000803e3d6000fd5b505050506040513d6060811015612bb557600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612c8833828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c2857600080fd5b505afa158015612c3c573d6000803e3d6000fd5b505050506040513d6020811015612c5257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b612d6a338b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d0957600080fd5b505afa158015612d1d573d6000803e3d6000fd5b505050506040513d6020811015612d3357600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612dc857600080fd5b505afa158015612ddc573d6000803e3d6000fd5b505050506040513d6020811015612df257600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612eb857600080fd5b505afa158015612ecc573d6000803e3d6000fd5b505050506040513d6020811015612ee257600080fd5b81019080805190602001909291905050509050612f2233308b8473ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612fc957600080fd5b505af1158015612fdd573d6000803e3d6000fd5b505050506040513d6020811015612ff357600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561310f57600080fd5b505af1158015613123573d6000803e3d6000fd5b505050506040513d604081101561313957600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561320457600080fd5b505af1158015613218573d6000803e3d6000fd5b505050506040513d602081101561322e57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156132e757600080fd5b505af11580156132fb573d6000803e3d6000fd5b505050506040513d602081101561331157600080fd5b810190808051906020019092919050505050600061347d670de0b6b3a764000061346f8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561337957600080fd5b505afa15801561338d573d6000803e3d6000fd5b505050506040513d60208110156133a357600080fd5b8101908080519060200190929190505050613461670de0b6b3a76400006134538873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561340957600080fd5b505afa15801561341d573d6000803e3d6000fd5b505050506040513d602081101561343357600080fd5b81019080805190602001909291905050508b61381390919063ffffffff16565b61381390919063ffffffff16565b61392190919063ffffffff16565b61392190919063ffffffff16565b90506134ac3330838573ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561356757600080fd5b505af115801561357b573d6000803e3d6000fd5b505050506040513d606081101561359157600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050506135e687828d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061360e898930614954565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561365a57600080fd5b505afa15801561366e573d6000803e3d6000fd5b505050506040513d602081101561368457600080fd5b8101908080519060200190929190505050905060006136a88c83858c8c8c8c614b54565b9150508061371e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61374987858d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b80945050505050979650505050505050565b61380e8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614eb7565b505050565b6000808314156138265760009050613893565b600082840290508284828161383757fe5b041461388e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806152d46021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613917576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061396383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615102565b905092915050565b60006139ad83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506151c8565b905092915050565b613a9c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614eb7565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613b5d57600080fd5b505afa158015613b71573d6000803e3d6000fd5b505050506040513d6020811015613b8757600080fd5b81019080805190602001909291905050509050613bc733308b8473ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6e57600080fd5b505af1158015613c82573d6000803e3d6000fd5b505050506040513d6020811015613c9857600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613db457600080fd5b505af1158015613dc8573d6000803e3d6000fd5b505050506040513d6040811015613dde57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4557600080fd5b505afa158015613e59573d6000803e3d6000fd5b505050506040513d6020811015613e6f57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f2957600080fd5b505af1158015613f3d573d6000803e3d6000fd5b505050506040513d6020811015613f5357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561400c57600080fd5b505af1158015614020573d6000803e3d6000fd5b505050506040513d602081101561403657600080fd5b810190808051906020019092919050505050600061416e8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561409357600080fd5b505afa1580156140a7573d6000803e3d6000fd5b505050506040513d60208110156140bd57600080fd5b81019080805190602001909291905050506141608773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561411657600080fd5b505afa15801561412a573d6000803e3d6000fd5b505050506040513d602081101561414057600080fd5b81019080805190602001909291905050508761381390919063ffffffff16565b61392190919063ffffffff16565b905061419d3330838573ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561425a57600080fd5b505af115801561426e573d6000803e3d6000fd5b505050506040513d606081101561428457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506142d787828d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061431e3330888b73ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b60008061432c8b8a30614954565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561437857600080fd5b505afa15801561438c573d6000803e3d6000fd5b505050506040513d60208110156143a257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561445c57600080fd5b505af1158015614470573d6000803e3d6000fd5b505050506040513d602081101561448657600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561453f57600080fd5b505af1158015614553573d6000803e3d6000fd5b505050506040513d602081101561456957600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561468a57600080fd5b505af115801561469e573d6000803e3d6000fd5b505050506040513d60608110156146b457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061470733848e73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6147e9338c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561478857600080fd5b505afa15801561479c573d6000803e3d6000fd5b505050506040513d60208110156147b257600080fd5b81019080805190602001909291905050508d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061480d898930614954565b9150915060006148228b8b858b8b8b8b614b54565b91505080614898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61494386838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148e357600080fd5b505afa1580156148f7573d6000803e3d6000fd5b505050506040513d602081101561490d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b809350505050979650505050505050565b600080600084116149cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a7a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a1957600080fd5b505afa158015614a2d573d6000803e3d6000fd5b505050506040513d6020811015614a4357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614afb57600080fd5b505af1158015614b0f573d6000803e3d6000fd5b505050506040513d6040811015614b2557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b7c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614cb457600080fd5b505af1158015614cc8573d6000803e3d6000fd5b505050506040513d6020811015614cde57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614da7578082015181840152602081019050614d8c565b505050509050019650505050505050600060405180830381600087803b158015614dd057600080fd5b505af1158015614de4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614e0e57600080fd5b8101908080516040519392919084640100000000821115614e2e57600080fd5b83820191506020820185811115614e4457600080fd5b8251866020820283011164010000000082111715614e6157600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614e98578082015181840152602081019050614e7d565b5050505090500160405250505091506001905097509795505050505050565b614ed68273ffffffffffffffffffffffffffffffffffffffff16615288565b614f48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614f975780518252602082019150602081019050602083039250614f74565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614ff9576040519150601f19603f3d011682016040523d82523d6000602084013e614ffe565b606091505b509150915081615076576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156150fc5780806020019051602081101561509557600080fd5b81019080805190602001909291905050506150fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615345602a913960400191505060405180910390fd5b5b50505050565b600080831182906151ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615173578082015181840152602081019050615158565b50505050905090810190601f1680156151a05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816151ba57fe5b049050809150509392505050565b6000838311158290615275576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561523a57808201518184015260208101905061521f565b50505050905090810190601f1680156152675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156152ca57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122057f6bfb14ec05d3671a394b702766668979feed2624d7d4960beb26cc2706fb064736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b604051808215151515815260200191505060405180910390f35b610718611b12565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b38565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611c83565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061244c565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061254a565b604051808215151515815260200191505060405180910390f35b610a57612686565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61286c565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612d7d565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061139f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505089896135fe565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561152b57600080fd5b505afa15801561153f573d6000803e3d6000fd5b505050506040513d602081101561155557600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061158c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61164887878373ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156116c957600080fd5b505af11580156116dd573d6000803e3d6000fd5b505050506040513d60408110156116f357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156117b1578082015181840152602081019050611796565b50505050905001935050505060006040518083038186803b1580156117d557600080fd5b505afa1580156117e9573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561181357600080fd5b810190808051604051939291908464010000000082111561183357600080fd5b8382019150602082018581111561184957600080fd5b825186602082028301116401000000008211171561186657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561189d578082015181840152602081019050611882565b5050505090500160405250505090506000808b90506000836001815181106118c157fe5b602002602001015190508b811015611941576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f414d4f554e545f544f4f5f4c4f57000000000000000000000000000081525060200191505060405180910390fd5b6119a1816119936103e861198561196260038861381390919063ffffffff16565b6119776103e88961381390919063ffffffff16565b61389990919063ffffffff16565b61392190919063ffffffff16565b61396b90919063ffffffff16565b92505050611a508d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f057600080fd5b505afa158015611a04573d6000803e3d6000fd5b505050506040513d6020811015611a1a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b611a7d888e838673ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a2505050611b0185838b73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611bbc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611c51600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613aa2565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611d06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d6857600080fd5b505afa158015611d7c573d6000803e3d6000fd5b505050506040513d6020811015611d9257600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611ded57600080fd5b505afa158015611e01573d6000803e3d6000fd5b505050506040513d6020811015611e1757600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611eff57600080fd5b505afa158015611f13573d6000803e3d6000fd5b505050506040513d6020811015611f2957600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611f6e5781602001602082028038833980820191505090505b5090508381600081518110611f7f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611fc757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605081526020016152f560509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b8381101561211b578082015181840152602081019050612100565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156121e957600080fd5b505afa1580156121fd573d6000803e3d6000fd5b505050506040513d602081101561221357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612246576000612248565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a957600080fd5b505afa1580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612305578b612308565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156123b757808201518184015260208101905061239c565b50505050905090810190601f1680156123e45780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561240657600080fd5b505af115801561241a573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166124cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061251e600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b6142ef565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60008060009054906101000a900460ff166125cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061265b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505089896147fd565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561278257600080fd5b505afa158015612796573d6000803e3d6000fd5b505050506040513d60208110156127ac57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612862576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600061289b3330888b73ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b6000806128a98b8a30614954565b915091508882146128b657fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561295d57600080fd5b505af1158015612971573d6000803e3d6000fd5b505050506040513d602081101561298757600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612a4057600080fd5b505af1158015612a54573d6000803e3d6000fd5b505050506040513d6020811015612a6a57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612b8b57600080fd5b505af1158015612b9f573d6000803e3d6000fd5b505050506040513d6060811015612bb557600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612c8833828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c2857600080fd5b505afa158015612c3c573d6000803e3d6000fd5b505050506040513d6020811015612c5257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b612d6a338b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d0957600080fd5b505afa158015612d1d573d6000803e3d6000fd5b505050506040513d6020811015612d3357600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612dc857600080fd5b505afa158015612ddc573d6000803e3d6000fd5b505050506040513d6020811015612df257600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612eb857600080fd5b505afa158015612ecc573d6000803e3d6000fd5b505050506040513d6020811015612ee257600080fd5b81019080805190602001909291905050509050612f2233308b8473ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612fc957600080fd5b505af1158015612fdd573d6000803e3d6000fd5b505050506040513d6020811015612ff357600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561310f57600080fd5b505af1158015613123573d6000803e3d6000fd5b505050506040513d604081101561313957600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561320457600080fd5b505af1158015613218573d6000803e3d6000fd5b505050506040513d602081101561322e57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156132e757600080fd5b505af11580156132fb573d6000803e3d6000fd5b505050506040513d602081101561331157600080fd5b810190808051906020019092919050505050600061347d670de0b6b3a764000061346f8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561337957600080fd5b505afa15801561338d573d6000803e3d6000fd5b505050506040513d60208110156133a357600080fd5b8101908080519060200190929190505050613461670de0b6b3a76400006134538873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561340957600080fd5b505afa15801561341d573d6000803e3d6000fd5b505050506040513d602081101561343357600080fd5b81019080805190602001909291905050508b61381390919063ffffffff16565b61381390919063ffffffff16565b61392190919063ffffffff16565b61392190919063ffffffff16565b90506134ac3330838573ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561356757600080fd5b505af115801561357b573d6000803e3d6000fd5b505050506040513d606081101561359157600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050506135e687828d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061360e898930614954565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561365a57600080fd5b505afa15801561366e573d6000803e3d6000fd5b505050506040513d602081101561368457600080fd5b8101908080519060200190929190505050905060006136a88c83858c8c8c8c614b54565b9150508061371e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61374987858d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b80945050505050979650505050505050565b61380e8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614eb7565b505050565b6000808314156138265760009050613893565b600082840290508284828161383757fe5b041461388e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806152d46021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613917576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061396383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615102565b905092915050565b60006139ad83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506151c8565b905092915050565b613a9c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614eb7565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613b5d57600080fd5b505afa158015613b71573d6000803e3d6000fd5b505050506040513d6020811015613b8757600080fd5b81019080805190602001909291905050509050613bc733308b8473ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6e57600080fd5b505af1158015613c82573d6000803e3d6000fd5b505050506040513d6020811015613c9857600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613db457600080fd5b505af1158015613dc8573d6000803e3d6000fd5b505050506040513d6040811015613dde57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4557600080fd5b505afa158015613e59573d6000803e3d6000fd5b505050506040513d6020811015613e6f57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f2957600080fd5b505af1158015613f3d573d6000803e3d6000fd5b505050506040513d6020811015613f5357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561400c57600080fd5b505af1158015614020573d6000803e3d6000fd5b505050506040513d602081101561403657600080fd5b810190808051906020019092919050505050600061416e8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561409357600080fd5b505afa1580156140a7573d6000803e3d6000fd5b505050506040513d60208110156140bd57600080fd5b81019080805190602001909291905050506141608773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561411657600080fd5b505afa15801561412a573d6000803e3d6000fd5b505050506040513d602081101561414057600080fd5b81019080805190602001909291905050508761381390919063ffffffff16565b61392190919063ffffffff16565b905061419d3330838573ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561425a57600080fd5b505af115801561426e573d6000803e3d6000fd5b505050506040513d606081101561428457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506142d787828d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061431e3330888b73ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b60008061432c8b8a30614954565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561437857600080fd5b505afa15801561438c573d6000803e3d6000fd5b505050506040513d60208110156143a257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561445c57600080fd5b505af1158015614470573d6000803e3d6000fd5b505050506040513d602081101561448657600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561453f57600080fd5b505af1158015614553573d6000803e3d6000fd5b505050506040513d602081101561456957600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561468a57600080fd5b505af115801561469e573d6000803e3d6000fd5b505050506040513d60608110156146b457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061470733848e73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6147e9338c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561478857600080fd5b505afa15801561479c573d6000803e3d6000fd5b505050506040513d60208110156147b257600080fd5b81019080805190602001909291905050508d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061480d898930614954565b9150915060006148228b8b858b8b8b8b614b54565b91505080614898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61494386838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148e357600080fd5b505afa1580156148f7573d6000803e3d6000fd5b505050506040513d602081101561490d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b809350505050979650505050505050565b600080600084116149cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a7a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a1957600080fd5b505afa158015614a2d573d6000803e3d6000fd5b505050506040513d6020811015614a4357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614afb57600080fd5b505af1158015614b0f573d6000803e3d6000fd5b505050506040513d6040811015614b2557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b7c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614cb457600080fd5b505af1158015614cc8573d6000803e3d6000fd5b505050506040513d6020811015614cde57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614da7578082015181840152602081019050614d8c565b505050509050019650505050505050600060405180830381600087803b158015614dd057600080fd5b505af1158015614de4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614e0e57600080fd5b8101908080516040519392919084640100000000821115614e2e57600080fd5b83820191506020820185811115614e4457600080fd5b8251866020820283011164010000000082111715614e6157600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614e98578082015181840152602081019050614e7d565b5050505090500160405250505091506001905097509795505050505050565b614ed68273ffffffffffffffffffffffffffffffffffffffff16615288565b614f48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614f975780518252602082019150602081019050602083039250614f74565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614ff9576040519150601f19603f3d011682016040523d82523d6000602084013e614ffe565b606091505b509150915081615076576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156150fc5780806020019051602081101561509557600080fd5b81019080805190602001909291905050506150fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615345602a913960400191505060405180910390fd5b5b50505050565b600080831182906151ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615173578082015181840152602081019050615158565b50505050905090810190601f1680156151a05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816151ba57fe5b049050809150509392505050565b6000838311158290615275576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561523a57808201518184015260208101905061521f565b50505050905090810190601f1680156152675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156152ca57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122057f6bfb14ec05d3671a394b702766668979feed2624d7d4960beb26cc2706fb064736f6c63430006020033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/connectors/Uniswap/UniswapConnector02.sol b/contracts/connectors/Uniswap/UniswapConnector02.sol index 9ae66210..1b766572 100644 --- a/contracts/connectors/Uniswap/UniswapConnector02.sol +++ b/contracts/connectors/Uniswap/UniswapConnector02.sol @@ -182,6 +182,7 @@ contract UniswapConnector02 is { uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed uint256 paid = amounts[1]; // quantity of underlyingTokens paid by shortOptionTokens + require(paid >= amountOutMin, "ERR_AMOUNT_TOO_LOW"); // consider the swap fee remainder = quantity .mul(1000) diff --git a/test/test_uni_connector.spec.js b/test/test_uni_connector.spec.js index e9434498..08ebe965 100644 --- a/test/test_uni_connector.spec.js +++ b/test/test_uni_connector.spec.js @@ -394,7 +394,6 @@ describe("UniswapConnector", () => { quoteToken.address ); reserves = [reserveA, reserveB]; - let amountBOptimal = await uniswapRouter.quote( amountADesired, reserves[0], @@ -921,5 +920,23 @@ describe("UniswapConnector", () => { console.log(`Redeem balance: ${formatEther(redeemBalanceAfter)}`); console.log(`Option balance: ${formatEther(optionBalanceAfter)}`); }); + + it("should revert on swapping an amount lower than amountOutMin", async () => { + // Get the pair instance to approve it to the uniswapConnector + let amountOptions = ONE_ETHER; + let amountRedeems = amountOptions.mul(quote).div(base); + let amounts = await uniswapRouter.getAmountsOut(amountRedeems, [ + redeemToken.address, + weth.address, + ]); + let amountOutMin = amounts[1].add(1); // 1 more than the best swap amount + await expect( + uniswapConnector.openFlashLong( + optionToken.address, + amountOptions, + amountOutMin + ) + ).to.be.revertedWith("ERR_UNISWAPV2_CALL_FAIL"); + }); }); }); From bbc7473adebf38f817f9053d37a3f98c3b6188c3 Mon Sep 17 00:00:00 2001 From: Alexangelj Date: Thu, 29 Oct 2020 20:40:39 -0700 Subject: [PATCH 20/20] Deployed periphery connector contracts to rinkeby. --- deploy/2_deploy_tokens.js | 2 + deploy/3_deploy_trader.js | 2 +- deploy/4_deloy_weth_connector.js | 2 +- deploy/5_deploy_uni_connector.js | 2 +- deployments/rinkeby/UniswapConnector02.json | 855 ++++++++++++++++++ deployments/rinkeby/WethConnector01.json | 545 +++++++++++ ...73a49b6abb5328c564027de7b23216e9f05ed.json | 174 ++++ package.json | 4 +- scripts/verify.js | 43 +- 9 files changed, 1622 insertions(+), 7 deletions(-) create mode 100644 deployments/rinkeby/UniswapConnector02.json create mode 100644 deployments/rinkeby/WethConnector01.json create mode 100644 deployments/rinkeby/solcInputs/0x9715524a9374d7e5e9f8cded26273a49b6abb5328c564027de7b23216e9f05ed.json diff --git a/deploy/2_deploy_tokens.js b/deploy/2_deploy_tokens.js index a53a400d..0a7d87f3 100644 --- a/deploy/2_deploy_tokens.js +++ b/deploy/2_deploy_tokens.js @@ -28,4 +28,6 @@ module.exports = async ({ getNamedAccounts, deployments }) => { `Contract deployed at ${deployed[i].address} using ${deployed[i].receipt.gasUsed} gas on chain ${chain}` ); } + + module.exports.tags = ["Test"]; }; diff --git a/deploy/3_deploy_trader.js b/deploy/3_deploy_trader.js index 9e4f93dd..f168534b 100644 --- a/deploy/3_deploy_trader.js +++ b/deploy/3_deploy_trader.js @@ -34,4 +34,4 @@ module.exports = async ({ getNamedAccounts, deployments }) => { } }; -module.exports.tags = ["Core"]; +module.exports.tags = ["Periphery"]; diff --git a/deploy/4_deloy_weth_connector.js b/deploy/4_deloy_weth_connector.js index 9c204d7c..05323462 100644 --- a/deploy/4_deloy_weth_connector.js +++ b/deploy/4_deloy_weth_connector.js @@ -34,4 +34,4 @@ module.exports = async ({ getNamedAccounts, deployments }) => { } }; -module.exports.tags = ["Core"]; +module.exports.tags = ["Periphery"]; diff --git a/deploy/5_deploy_uni_connector.js b/deploy/5_deploy_uni_connector.js index d5bcc165..f0de9c6c 100644 --- a/deploy/5_deploy_uni_connector.js +++ b/deploy/5_deploy_uni_connector.js @@ -28,4 +28,4 @@ module.exports = async ({ getNamedAccounts, deployments }) => { } }; -module.exports.tags = ["Core"]; +module.exports.tags = ["Periphery"]; diff --git a/deployments/rinkeby/UniswapConnector02.json b/deployments/rinkeby/UniswapConnector02.json new file mode 100644 index 00000000..13f683bf --- /dev/null +++ b/deployments/rinkeby/UniswapConnector02.json @@ -0,0 +1,855 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "router_", + "type": "address" + }, + { + "internalType": "address", + "name": "factory_", + "type": "address" + }, + { + "internalType": "address", + "name": "trader_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "premium", + "type": "uint256" + } + ], + "name": "FlashOpened", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantityOtherTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOptionTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOtherTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addLongLiquidityWithUnderlying", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "quantityOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantityOtherTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOtherTokens", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "addShortLiquidityWithUnderlying", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherToken", + "type": "address" + } + ], + "name": "deployUniswapMarket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pairAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "flashLoanQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "flashMintShortOptionsThenSwap", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "internalType": "address", + "name": "token1", + "type": "address" + } + ], + "name": "getUniswapMarketForTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintLongOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "mintShortOptionsThenSwapToTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOptions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + } + ], + "name": "openFlashLong", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeLongLiquidityThenCloseOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "optionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "otherTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountAMin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountBMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "removeShortLiquidityThenCloseOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trader", + "outputs": [ + { + "internalType": "contract ITrader", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "uniswapV2Call", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "receipt": { + "to": null, + "from": "0xE7D58d8554Eb0D5B5438848Af32Bf33EbdE477E7", + "contractAddress": "0x1a3C7deA8a021ed6108B44Ff9B9C327f92c7F15c", + "transactionIndex": 4, + "gasUsed": "4749821", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000800300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000010000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000", + "blockHash": "0x56d9e154488c2168c2678ad25a47ca0c3133b455d92156ea687e8a18aecba041", + "transactionHash": "0x324599cdd2887892e68f0ef3f837a79e70b0555b41f0c135c516b2d35d2929a9", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 7458065, + "transactionHash": "0x324599cdd2887892e68f0ef3f837a79e70b0555b41f0c135c516b2d35d2929a9", + "address": "0x1a3C7deA8a021ed6108B44Ff9B9C327f92c7F15c", + "topics": [ + "0x908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6", + "0x000000000000000000000000e7d58d8554eb0d5b5438848af32bf33ebde477e7" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x56d9e154488c2168c2678ad25a47ca0c3133b455d92156ea687e8a18aecba041" + } + ], + "blockNumber": 7458065, + "cumulativeGasUsed": "5477861", + "status": 1, + "byzantium": true + }, + "address": "0x1a3C7deA8a021ed6108B44Ff9B9C327f92c7F15c", + "args": [ + "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", + "0x615a04282a457b2Dd73Fa297A22114ABE3E812cF" + ], + "solcInputHash": "0x9715524a9374d7e5e9f8cded26273a49b6abb5328c564027de7b23216e9f05ed", + "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"factory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trader_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"premium\",\"type\":\"uint256\"}],\"name\":\"FlashOpened\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityOtherTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minOptionTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minOtherTokens\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLongLiquidityWithUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quantityOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityOtherTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minShortTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minOtherTokens\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addShortLiquidityWithUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherToken\",\"type\":\"address\"}],\"name\":\"deployUniswapMarket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pairAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"flashLoanQuantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"flashMintShortOptionsThenSwap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"getUniswapMarketForTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintLongOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"mintShortOptionsThenSwapToTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountOptions\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"}],\"name\":\"openFlashLong\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLongLiquidityThenCloseOptions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"optionAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"otherTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeShortLiquidityThenCloseOptions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router02\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trader\",\"outputs\":[{\"internalType\":\"contract ITrader\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"uniswapV2Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.\",\"params\":{\"deadline\":\"The timestamp to expire a pending transaction. \\r\",\"minOptionTokens\":\"The minimum quantity of longOptionTokens expected to provide liquidity with.\",\"minOtherTokens\":\"The minimum quantity of otherTokens expected to provide liquidity with.\",\"optionAddress\":\"The address of the optionToken to mint then provide liquidity for.\",\"otherTokenAddress\":\"The address of the otherToken in the pair with the optionToken.\",\"quantityOptions\":\"The quantity of underlyingTokens to use to mint longOptionTokens.\",\"quantityOtherTokens\":\"The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.\",\"to\":\"The address that receives UNI-V2 shares.\"}},\"addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Adds redeemToken liquidity to a redeem<>token pair by minting shortOptionTokens with underlyingTokens.\",\"params\":{\"deadline\":\"The timestamp to expire a pending transaction. \\r\",\"minOtherTokens\":\"The minimum quantity of otherTokens expected to provide liquidity with.\",\"minShortTokens\":\"The minimum quantity of shortOptionTokens expected to provide liquidity with.\",\"optionAddress\":\"The address of the optionToken to get the redeemToken to mint then provide liquidity for.\",\"otherTokenAddress\":\"IMPORTANT: Should be the underlyingToken of option. Address of other reserve asset.\",\"quantityOptions\":\"The quantity of underlyingTokens to use to mint option + redeem tokens.\",\"quantityOtherTokens\":\"The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair.\",\"to\":\"The address that receives UNI-V2 shares.\"}},\"deployUniswapMarket(address,address)\":{\"details\":\"Creates a UniswapV2Pair by calling `createPair` on the UniswapV2Factory.\"},\"flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)\":{\"details\":\"Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with reserve0 = shortOptionTokens and reserve1 = underlyingTokens. Uses underlyingTokens to mint long (option) + short (redeem) tokens. Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens, AND any remainder quantity of underlyingTokens (paid by msg.sender).\",\"params\":{\"amountOutMin\":\"The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens.\",\"flashLoanQuantity\":\"The quantity of options to mint using borrowed underlyingTokens.\",\"optionAddress\":\"The address of the Option contract.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\",\"to\":\"The address to send the shortOptionToken proceeds and longOptionTokens to.\"},\"returns\":{\"_0\":\"success bool Whether the transaction was successful or not. \\r\"}},\"getName()\":{\"details\":\"Gets the name of the contract.\"},\"getUniswapMarketForTokens(address,address)\":{\"details\":\"Gets a UniswapV2Pair address for two tokens by calling the UniswapV2Factory.\"},\"getVersion()\":{\"details\":\"Gets the version of the contract.\"},\"mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. Combines Primitive \\\"mintOptions\\\" function with Uniswap V2 Router \\\"swapExactTokensForTokens\\\" function.\",\"params\":{\"amountIn\":\"The quantity of longOptionTokens to mint and then sell.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the longOptionTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Oracle-less Primitive option.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\",\"to\":\"The address to send the optionToken proceeds and redeem tokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not. \\r\"}},\"mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"details\":\"Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens.\",\"params\":{\"amountIn\":\"The quantity of options to mint.\",\"amountOutMin\":\"The minimum quantity of tokens to receive in exchange for the shortOptionTokens.\",\"deadline\":\"The timestamp for a trade to fail at if not successful.\",\"optionToken\":\"The address of the Option contract.\",\"path\":\"The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\",\"to\":\"The address to send the shortOptionToken proceeds and longOptionTokens to.\"},\"returns\":{\"_0\":\"bool Whether the transaction was successful or not. \\r\"}},\"openFlashLong(address,uint256,uint256)\":{\"details\":\"Opens a longOptionToken position by minting long + short tokens, then selling the short tokens.\",\"params\":{\"amountOptions\":\"The quantity of longOptionTokens to purchase.\",\"amountOutMin\":\"The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. \\r\",\"optionToken\":\"The option address.\"}},\"removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines Uniswap V2 Router \\\"removeLiquidity\\\" function with Primitive \\\"closeOptions\\\" function.\",\"params\":{\"amountAMin\":\"The minimum quantity of longOptionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of otherTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction. \\r\",\"liquidity\":\"The quantity of liquidity tokens to pull from msg.sender and burn.\",\"optionAddress\":\"The address of the option that will be closed from burned UNI-V2 liquidity shares.\",\"otherTokenAddress\":\"The address of the other token in the pair with the options.\",\"to\":\"The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options.\"}},\"removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)\":{\"details\":\"Combines Uniswap V2 Router \\\"removeLiquidity\\\" function with Primitive \\\"closeOptions\\\" function.\",\"params\":{\"amountAMin\":\"The minimum quantity of shortOptionTokens to receive from removing liquidity.\",\"amountBMin\":\"The minimum quantity of quoteTokens to receive from removing liquidity.\",\"deadline\":\"The timestamp to expire a pending transaction. \\r\",\"liquidity\":\"The quantity of liquidity tokens to pull from msg.sender and burn.\",\"optionAddress\":\"The address of the option that will be closed from burned UNI-V2 liquidity shares.\",\"otherTokenAddress\":\"The address of the other token in the option pair.\",\"to\":\"The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\"}},\"uniswapV2Call(address,uint256,uint256,bytes)\":{\"details\":\"The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data.\",\"params\":{\"amount0\":\"The quantity of token0 received to the `to` address in the swap() call.\",\"amount1\":\"The quantity of token1 received to the `to` address in the swap() call.\",\"data\":\"The payload passed in the `data` parameter of the swap() call. \\r\",\"sender\":\"The original msg.sender of the UniswapV2Pair.swap() call.\"}}}},\"userdoc\":{\"methods\":{\"addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \\\"to\\\" address. underlyingToken -> optionToken -> UNI-V2.\"},\"addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \\\"to\\\" address. underlyingToken -> redeemToken -> UNI-V2.\"},\"flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)\":{\"notice\":\"If the first address in the path is not the shortOptionToken address, the tx will fail.\"},\"mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken.\"},\"mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)\":{\"notice\":\"If the first address in the path is not the shortOptionToken address, the tx will fail. underlyingToken -> shortOptionToken -> quoteToken. IMPORTANT: redeemTokens = shortOptionTokens\"},\"openFlashLong(address,uint256,uint256)\":{\"notice\":\"IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens. IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid.\"},\"removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. Then closes the longOptionTokens and withdraws underlyingTokens to the \\\"to\\\" address. Sends otherTokens from the burned UNI-V2 liquidity shares to the \\\"to\\\" address. UNI-V2 -> optionToken -> underlyingToken.\"},\"removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)\":{\"notice\":\"Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. Then closes the longOptionTokens and withdraws underlyingTokens to the \\\"to\\\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \\\"to\\\" address. UNI-V2 -> optionToken -> underlyingToken.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/Uniswap/UniswapConnector02.sol\":\"UniswapConnector02\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\":{\"keccak256\":\"0xdb17a1fb73e261e736ae8862be2d9a32964fc4b3741f48980f5cdc9d92b99a96\",\"urls\":[\"bzz-raw://468dab23a95d9d9b7d6ce74008d45eef3de2f137ede604e6be6c5e7d0121c5e9\",\"dweb:/ipfs/QmcXwjTfp6tCRgf1KsNQyUAtrqKhiaN6fbaHVGr22eficP\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\":{\"keccak256\":\"0xe5905c0989cf5a865ed9bb7b9252536ca011c5b744017a82a7d4443b9c00a891\",\"urls\":[\"bzz-raw://5d2a90a0a796491507462a3da18c3f8819721d571572d765a2207c35bf0a0389\",\"dweb:/ipfs/Qmf9ACYiT3qzjgsYuhm866FBdiBpRMXAPpQhSFbgqcyhHt\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\",\"urls\":[\"bzz-raw://85d5ad2dd23ee127f40907a12865a1e8cb5828814f6f2480285e1827dd72dedf\",\"dweb:/ipfs/QmayKQWJgWmr46DqWseADyUanmqxh662hPNdAkdHRjiQQH\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\":{\"keccak256\":\"0x8a3c5c449d4b7cd76513ed6995f4b86e4a86f222c770f8442f5fc128ce29b4d2\",\"urls\":[\"bzz-raw://1df63ca373dafae3bd0ee7fe70f890a1dc7c45ed869c01de68413e0e97ff9deb\",\"dweb:/ipfs/QmefJgEYGUL8KX7kQKYTrDweF8GB7yjy3nw5Bmqzryg7PG\"]},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\":{\"keccak256\":\"0x744e30c133bd0f7ca9e7163433cf6d72f45c6bb1508c2c9c02f1a6db796ae59d\",\"urls\":[\"bzz-raw://9bf2f4454ad63d4cff03a0630e787d9e8a9deed80aec89682cd8ad6379d9ef8c\",\"dweb:/ipfs/Qme51hQNR2wpax7ooUadhtqLtXm8ffeVVYyubLkTT4wMCG\"]},\"contracts/connectors/Uniswap/IUniswapConnector02.sol\":{\"keccak256\":\"0x9d300d784c8900f4e19ad21415819fa521e44d187a030c28c56c3e781c26ebef\",\"urls\":[\"bzz-raw://c94deed9984972c471fa7697ab974796edd0c35e1781cb20638eebd102bf35f2\",\"dweb:/ipfs/Qmc5G4wSYnXBLqcLvd1k5YxjxLsVcQhbnV2HfmRHenQoxi\"]},\"contracts/connectors/Uniswap/UniswapConnector02.sol\":{\"keccak256\":\"0xbd2805da41500ed444569ad022c6af21398973a9b9b6f9799ad74353100ae4ac\",\"urls\":[\"bzz-raw://0d9f864f4f5ad457be900a1566efac6eea497be6597e94653e5dbaf60ea45c20\",\"dweb:/ipfs/QmQ19K85iW7GCFLdJQyd6cgjRe7jt6j7exq1j4XekcZyrX\"]},\"contracts/connectors/Uniswap/UniswapConnectorLib02.sol\":{\"keccak256\":\"0x12811467a3862e63b105ddd2ba968e7191746ae42dd3b3a8de13c0a430f05b23\",\"urls\":[\"bzz-raw://9ca190c3f88b5ad2ead36086dba8f166664a740a9bc822d6e4f20b5c905a44d1\",\"dweb:/ipfs/QmfQKiR1ER8KsP7ThLAwRTqjJaLqmbLt1QNnXdn6AYHi9z\"]},\"contracts/connectors/WETH/IWETH.sol\":{\"keccak256\":\"0x63dce39ab69c513fb54459362900e4084a2ad2d164be2d46061afec61b956bfc\",\"urls\":[\"bzz-raw://43a214fb8eb4b26327dea29262c4e29e0f7269aec39ccb7e18bea20cfe7734da\",\"dweb:/ipfs/QmduwCTCBH4nQbXSBpJDhbLuATXLyS44yehfSvy6FTYyby\"]},\"contracts/connectors/WETH/IWethConnector01.sol\":{\"keccak256\":\"0x6e88f4f5726add5fd94a8ef9cfc14ba54a9d84a17018d26bbc2f956e0c07b1bb\",\"urls\":[\"bzz-raw://798f983a161efb3cc952c135a08c4b3ef14fabd6d7dbf49737d3305398aa1399\",\"dweb:/ipfs/QmPHV9UpP41hnxJyGgmKC7GeR3bWU1EJ3QfuTrfb2m4BNc\"]},\"contracts/connectors/WETH/WethConnectorLib01.sol\":{\"keccak256\":\"0xcac76b767f722892fc4a69421858b0eab336cce94cdb6024886760a1eb4f37cf\",\"urls\":[\"bzz-raw://20e60170706944d73305cb5977c3883b6f5233fceda56df85a2b070438e21516\",\"dweb:/ipfs/QmbA9Wabti8T3MfCFuvWUjZgXTyiXa6Yvyeu1kwyuKpnwd\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]},\"contracts/option/interfaces/ITrader.sol\":{\"keccak256\":\"0xb8f9e6d923e556e137a606c76e9adf8fd07375c7ff0650f4a7932adc950df44f\",\"urls\":[\"bzz-raw://ef82aa3d081c12e307f45334cffd8916a27c5c7db62c2b44ce9663633a8c385b\",\"dweb:/ipfs/QmQLsKZomP19HAAXKpLshhXiZhrusbf9yoZhy8tJDffVvS\"]},\"contracts/option/libraries/TraderLib.sol\":{\"keccak256\":\"0x51be231a418ac2c24bd41de288598448ba50754d7b0577e6d432856b90ed7464\",\"urls\":[\"bzz-raw://7ed555a066ee8a3c538b3aae65ec1c274797933a599fcd886b92039bc83a02cc\",\"dweb:/ipfs/QmSS6fQk4mgYHbEzWA86vVVChgEUZp1y34tLreASVDqrCP\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200578238038062005782833981810160405260608110156200003757600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000806101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620002c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f494e495449414c495a4544000000000000000000000000000000000081525060200191505060405180910390fd5b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e660405160405180910390a25050506153a480620003de6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b604051808215151515815260200191505060405180910390f35b610718611b12565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b38565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611c83565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061244c565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061254a565b604051808215151515815260200191505060405180910390f35b610a57612686565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61286c565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612d7d565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061139f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505089896135fe565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561152b57600080fd5b505afa15801561153f573d6000803e3d6000fd5b505050506040513d602081101561155557600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061158c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61164887878373ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156116c957600080fd5b505af11580156116dd573d6000803e3d6000fd5b505050506040513d60408110156116f357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156117b1578082015181840152602081019050611796565b50505050905001935050505060006040518083038186803b1580156117d557600080fd5b505afa1580156117e9573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561181357600080fd5b810190808051604051939291908464010000000082111561183357600080fd5b8382019150602082018581111561184957600080fd5b825186602082028301116401000000008211171561186657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561189d578082015181840152602081019050611882565b5050505090500160405250505090506000808b90506000836001815181106118c157fe5b602002602001015190508b811015611941576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f414d4f554e545f544f4f5f4c4f57000000000000000000000000000081525060200191505060405180910390fd5b6119a1816119936103e861198561196260038861381390919063ffffffff16565b6119776103e88961381390919063ffffffff16565b61389990919063ffffffff16565b61392190919063ffffffff16565b61396b90919063ffffffff16565b92505050611a508d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f057600080fd5b505afa158015611a04573d6000803e3d6000fd5b505050506040513d6020811015611a1a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b611a7d888e838673ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a2505050611b0185838b73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611bbc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611c51600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613aa2565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611d06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d6857600080fd5b505afa158015611d7c573d6000803e3d6000fd5b505050506040513d6020811015611d9257600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611ded57600080fd5b505afa158015611e01573d6000803e3d6000fd5b505050506040513d6020811015611e1757600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611eff57600080fd5b505afa158015611f13573d6000803e3d6000fd5b505050506040513d6020811015611f2957600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611f6e5781602001602082028038833980820191505090505b5090508381600081518110611f7f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611fc757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605081526020016152f560509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b8381101561211b578082015181840152602081019050612100565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156121e957600080fd5b505afa1580156121fd573d6000803e3d6000fd5b505050506040513d602081101561221357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612246576000612248565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a957600080fd5b505afa1580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612305578b612308565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156123b757808201518184015260208101905061239c565b50505050905090810190601f1680156123e45780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561240657600080fd5b505af115801561241a573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166124cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061251e600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b6142ef565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60008060009054906101000a900460ff166125cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061265b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505089896147fd565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561278257600080fd5b505afa158015612796573d6000803e3d6000fd5b505050506040513d60208110156127ac57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612862576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600061289b3330888b73ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b6000806128a98b8a30614954565b915091508882146128b657fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561295d57600080fd5b505af1158015612971573d6000803e3d6000fd5b505050506040513d602081101561298757600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612a4057600080fd5b505af1158015612a54573d6000803e3d6000fd5b505050506040513d6020811015612a6a57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612b8b57600080fd5b505af1158015612b9f573d6000803e3d6000fd5b505050506040513d6060811015612bb557600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612c8833828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c2857600080fd5b505afa158015612c3c573d6000803e3d6000fd5b505050506040513d6020811015612c5257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b612d6a338b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d0957600080fd5b505afa158015612d1d573d6000803e3d6000fd5b505050506040513d6020811015612d3357600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612dc857600080fd5b505afa158015612ddc573d6000803e3d6000fd5b505050506040513d6020811015612df257600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612eb857600080fd5b505afa158015612ecc573d6000803e3d6000fd5b505050506040513d6020811015612ee257600080fd5b81019080805190602001909291905050509050612f2233308b8473ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612fc957600080fd5b505af1158015612fdd573d6000803e3d6000fd5b505050506040513d6020811015612ff357600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561310f57600080fd5b505af1158015613123573d6000803e3d6000fd5b505050506040513d604081101561313957600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561320457600080fd5b505af1158015613218573d6000803e3d6000fd5b505050506040513d602081101561322e57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156132e757600080fd5b505af11580156132fb573d6000803e3d6000fd5b505050506040513d602081101561331157600080fd5b810190808051906020019092919050505050600061347d670de0b6b3a764000061346f8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561337957600080fd5b505afa15801561338d573d6000803e3d6000fd5b505050506040513d60208110156133a357600080fd5b8101908080519060200190929190505050613461670de0b6b3a76400006134538873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561340957600080fd5b505afa15801561341d573d6000803e3d6000fd5b505050506040513d602081101561343357600080fd5b81019080805190602001909291905050508b61381390919063ffffffff16565b61381390919063ffffffff16565b61392190919063ffffffff16565b61392190919063ffffffff16565b90506134ac3330838573ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561356757600080fd5b505af115801561357b573d6000803e3d6000fd5b505050506040513d606081101561359157600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050506135e687828d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061360e898930614954565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561365a57600080fd5b505afa15801561366e573d6000803e3d6000fd5b505050506040513d602081101561368457600080fd5b8101908080519060200190929190505050905060006136a88c83858c8c8c8c614b54565b9150508061371e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61374987858d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b80945050505050979650505050505050565b61380e8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614eb7565b505050565b6000808314156138265760009050613893565b600082840290508284828161383757fe5b041461388e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806152d46021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613917576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061396383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615102565b905092915050565b60006139ad83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506151c8565b905092915050565b613a9c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614eb7565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613b5d57600080fd5b505afa158015613b71573d6000803e3d6000fd5b505050506040513d6020811015613b8757600080fd5b81019080805190602001909291905050509050613bc733308b8473ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6e57600080fd5b505af1158015613c82573d6000803e3d6000fd5b505050506040513d6020811015613c9857600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613db457600080fd5b505af1158015613dc8573d6000803e3d6000fd5b505050506040513d6040811015613dde57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4557600080fd5b505afa158015613e59573d6000803e3d6000fd5b505050506040513d6020811015613e6f57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f2957600080fd5b505af1158015613f3d573d6000803e3d6000fd5b505050506040513d6020811015613f5357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561400c57600080fd5b505af1158015614020573d6000803e3d6000fd5b505050506040513d602081101561403657600080fd5b810190808051906020019092919050505050600061416e8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561409357600080fd5b505afa1580156140a7573d6000803e3d6000fd5b505050506040513d60208110156140bd57600080fd5b81019080805190602001909291905050506141608773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561411657600080fd5b505afa15801561412a573d6000803e3d6000fd5b505050506040513d602081101561414057600080fd5b81019080805190602001909291905050508761381390919063ffffffff16565b61392190919063ffffffff16565b905061419d3330838573ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561425a57600080fd5b505af115801561426e573d6000803e3d6000fd5b505050506040513d606081101561428457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506142d787828d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061431e3330888b73ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b60008061432c8b8a30614954565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561437857600080fd5b505afa15801561438c573d6000803e3d6000fd5b505050506040513d60208110156143a257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561445c57600080fd5b505af1158015614470573d6000803e3d6000fd5b505050506040513d602081101561448657600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561453f57600080fd5b505af1158015614553573d6000803e3d6000fd5b505050506040513d602081101561456957600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561468a57600080fd5b505af115801561469e573d6000803e3d6000fd5b505050506040513d60608110156146b457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061470733848e73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6147e9338c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561478857600080fd5b505afa15801561479c573d6000803e3d6000fd5b505050506040513d60208110156147b257600080fd5b81019080805190602001909291905050508d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061480d898930614954565b9150915060006148228b8b858b8b8b8b614b54565b91505080614898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61494386838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148e357600080fd5b505afa1580156148f7573d6000803e3d6000fd5b505050506040513d602081101561490d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b809350505050979650505050505050565b600080600084116149cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a7a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a1957600080fd5b505afa158015614a2d573d6000803e3d6000fd5b505050506040513d6020811015614a4357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614afb57600080fd5b505af1158015614b0f573d6000803e3d6000fd5b505050506040513d6040811015614b2557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b7c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614cb457600080fd5b505af1158015614cc8573d6000803e3d6000fd5b505050506040513d6020811015614cde57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614da7578082015181840152602081019050614d8c565b505050509050019650505050505050600060405180830381600087803b158015614dd057600080fd5b505af1158015614de4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614e0e57600080fd5b8101908080516040519392919084640100000000821115614e2e57600080fd5b83820191506020820185811115614e4457600080fd5b8251866020820283011164010000000082111715614e6157600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614e98578082015181840152602081019050614e7d565b5050505090500160405250505091506001905097509795505050505050565b614ed68273ffffffffffffffffffffffffffffffffffffffff16615288565b614f48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614f975780518252602082019150602081019050602083039250614f74565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614ff9576040519150601f19603f3d011682016040523d82523d6000602084013e614ffe565b606091505b509150915081615076576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156150fc5780806020019051602081101561509557600080fd5b81019080805190602001909291905050506150fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615345602a913960400191505060405180910390fd5b5b50505050565b600080831182906151ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615173578082015181840152602081019050615158565b50505050905090810190601f1680156151a05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816151ba57fe5b049050809150509392505050565b6000838311158290615275576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561523a57808201518184015260208101905061521f565b50505050905090810190601f1680156152675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156152ca57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122057f6bfb14ec05d3671a394b702766668979feed2624d7d4960beb26cc2706fb064736f6c63430006020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063b17d057011610097578063d580c62211610066578063d580c62214610891578063d9b3612514610960578063f887ea4014610a4f578063fd52c6bb14610a9957610100565b8063b17d0570146105cc578063c45a015514610710578063cc84fde71461075a578063cd0455241461082157610100565b806317d7de7c116100d357806317d7de7c146102ef57806369bd26cd1461037257806369d12e141461041657806395f0ae76146104dd57610100565b806301c6a450146101055780630d8e6e2c146101d457806310d1e85c146101f85780631758078b146102a5575b600080fd5b6101ba600480360361010081101561011c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b3d565b604051808215151515815260200191505060405180910390f35b6101dc610c3b565b604051808260ff1660ff16815260200191505060405180910390f35b6102a36004803603608081101561020e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561025f57600080fd5b82018360208201111561027157600080fd5b8035906020019184600183028401116401000000008311171561029357600080fd5b9091929391929390505050610c44565b005b6102ad610fc1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f7610fe7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033757808201518184015260208101905061031c565b50505050905090810190601f1680156103645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d46004803603604081101561038857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611024565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104c0600480360360e081101561042c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611143565b604051808381526020018281526020019250505060405180910390f35b6105b2600480360360c08110156104f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561054457600080fd5b82018360208201111561055657600080fd5b8035906020019184602083028401116401000000008311171561057857600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061128e565b604051808215151515815260200191505060405180910390f35b6106f6600480360360c08110156105e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561065357600080fd5b82018360208201111561066557600080fd5b8035906020019184602083028401116401000000008311171561068757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113ca565b604051808215151515815260200191505060405180910390f35b610718611b12565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610804600480360360e081101561077057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b38565b604051808381526020018281526020019250505060405180910390f35b6108776004803603606081101561083757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611c83565b604051808215151515815260200191505060405180910390f35b61094660048036036101008110156108a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061244c565b604051808215151515815260200191505060405180910390f35b610a35600480360360c081101561097657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156109c757600080fd5b8201836020820111156109d957600080fd5b803590602001918460208302840111640100000000831117156109fb57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061254a565b604051808215151515815260200191505060405180910390f35b610a57612686565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610afb60048036036040811015610aaf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126ac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900460ff16610bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055506000610c0f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b61286c565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60006002905090565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8c57600080fd5b505afa158015610ca0573d6000803e3d6000fd5b505050506040513d6020811015610cb657600080fd5b8101908080519060200190929190505050905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d6020811015610d3b57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390583836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610e2157600080fd5b505afa158015610e35573d6000803e3d6000fd5b505050506040513d6020811015610e4b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e9057fe5b600060603073ffffffffffffffffffffffffffffffffffffffff1686866040518083838082843780830192505050925050506000604051808303816000865af19150503d8060008114610eff576040519150601f19603f3d011682016040523d82523d6000602084013e610f04565b606091505b5091509150818015610f445750600081511480610f435750808060200190516020811015610f3157600080fd5b81019080805190602001909291905050505b5b610fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f554e495357415056325f43414c4c5f4641494c00000000000000000081525060200191505060405180910390fd5b505050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280601d81526020017f5072696d69746976655631556e6973776170436f6e6e6563746f723032000000815250905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539685856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d602081101561112657600080fd5b810190808051906020019092919050505090508091505092915050565b6000806000809054906101000a900460ff166111c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008061125c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e612d7d565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061139f600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505089896135fe565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f53454c46000000000000000000000000000000000000000081525060200191505060405180910390fd5b600085116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561152b57600080fd5b505afa15801561153f573d6000803e3d6000fd5b505050506040513d602081101561155557600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168460018151811061158c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4552525f454e445f504154485f4e4f545f554e4445524c59494e47000000000081525060200191505060405180910390fd5b61164887878373ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b1580156116c957600080fd5b505af11580156116dd573d6000803e3d6000fd5b505050506040513d60408110156116f357600080fd5b8101908080519060200190929190805190602001909291905050509150915060008390506060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d06ca61f848a6040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156117b1578082015181840152602081019050611796565b50505050905001935050505060006040518083038186803b1580156117d557600080fd5b505afa1580156117e9573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561181357600080fd5b810190808051604051939291908464010000000082111561183357600080fd5b8382019150602082018581111561184957600080fd5b825186602082028301116401000000008211171561186657600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561189d578082015181840152602081019050611882565b5050505090500160405250505090506000808b90506000836001815181106118c157fe5b602002602001015190508b811015611941576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4552525f414d4f554e545f544f4f5f4c4f57000000000000000000000000000081525060200191505060405180910390fd5b6119a1816119936103e861198561196260038861381390919063ffffffff16565b6119776103e88961381390919063ffffffff16565b61389990919063ffffffff16565b61392190919063ffffffff16565b61396b90919063ffffffff16565b92505050611a508d858e73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f057600080fd5b505afa158015611a04573d6000803e3d6000fd5b505050506040513d6020811015611a1a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b611a7d888e838673ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff17aa7749e04732ce7bde5ee88376144e6c5669bd4d8c80358119eada62a1d008683604051808381526020018281526020019250505060405180910390a2505050611b0185838b73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b600193505050509695505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900460ff16611bbc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600080611c51600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168e8e8e8e8e8e8e613aa2565b91509150818193509350505060016000806101000a81548160ff02191690831515021790555097509795505050505050565b60008060009054906101000a900460ff16611d06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555060008473ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d6857600080fd5b505afa158015611d7c573d6000803e3d6000fd5b505050506040513d6020811015611d9257600080fd5b8101908080519060200190929190505050905060008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015611ded57600080fd5b505afa158015611e01573d6000803e3d6000fd5b505050506040513d6020811015611e1757600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611eff57600080fd5b505afa158015611f13573d6000803e3d6000fd5b505050506040513d6020811015611f2957600080fd5b8101908080519060200190929190505050905060606002604051908082528060200260200182016040528015611f6e5781602001602082028038833980820191505090505b5090508381600081518110611f7f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508281600181518110611fc757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600082905060006040518060800160405280605081526020016152f560509139805190602001209050606081858c8c8c8833604051602401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b8381101561211b578082015181840152602081019050612100565b50505050905001975050505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156121e957600080fd5b505afa1580156121fd573d6000803e3d6000fd5b505050506040513d602081101561221357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612246576000612248565b8a5b905060008773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156122a957600080fd5b505afa1580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614612305578b612308565b60005b90508473ffffffffffffffffffffffffffffffffffffffff1663022c0d9f838330876040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156123b757808201518184015260208101905061239c565b50505050905090810190601f1680156123e45780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561240657600080fd5b505af115801561241a573d6000803e3d6000fd5b505050506001995050505050505050505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060009054906101000a900460ff166124cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061251e600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b8b8b8b8b8b6142ef565b90508091505060016000806101000a81548160ff02191690831515021790555098975050505050505050565b60008060009054906101000a900460ff166125cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550600061265b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a8a8a8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505089896147fd565b90508091505060016000806101000a81548160ff021916908315150217905550979650505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561278257600080fd5b505afa158015612796573d6000803e3d6000fd5b505050506040513d60208110156127ac57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612862576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4552525f504149525f444f45535f4e4f545f455849535400000000000000000081525060200191505060405180910390fd5b8091505092915050565b600061289b3330888b73ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b6000806128a98b8a30614954565b915091508882146128b657fe5b8a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561295d57600080fd5b505af1158015612971573d6000803e3d6000fd5b505050506040513d602081101561298757600080fd5b8101908080519060200190929190505050508973ffffffffffffffffffffffffffffffffffffffff1663095ea7b38d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612a4057600080fd5b505af1158015612a54573d6000803e3d6000fd5b505050506040513d6020811015612a6a57600080fd5b8101908080519060200190929190505050508b73ffffffffffffffffffffffffffffffffffffffff1663e8e337008c8c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b158015612b8b57600080fd5b505af1158015612b9f573d6000803e3d6000fd5b505050506040513d6060811015612bb557600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050505050612c8833828d73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c2857600080fd5b505afa158015612c3c573d6000803e3d6000fd5b505050506040513d6020811015612c5257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b612d6a338b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612d0957600080fd5b505afa158015612d1d573d6000803e3d6000fd5b505050506040513d6020811015612d3357600080fd5b81019080805190602001909291905050508c73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6001925050509998505050505050505050565b60008060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015612dc857600080fd5b505afa158015612ddc573d6000803e3d6000fd5b505050506040513d6020811015612df257600080fd5b8101908080519060200190929190505050905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a43905838c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015612eb857600080fd5b505afa158015612ecc573d6000803e3d6000fd5b505050506040513d6020811015612ee257600080fd5b81019080805190602001909291905050509050612f2233308b8473ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612fc957600080fd5b505af1158015612fdd573d6000803e3d6000fd5b505050506040513d6020811015612ff357600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde848d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b15801561310f57600080fd5b505af1158015613123573d6000803e3d6000fd5b505050506040513d604081101561313957600080fd5b8101908080519060200190929190805190602001909291905050509150915060008c90508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561320457600080fd5b505af1158015613218573d6000803e3d6000fd5b505050506040513d602081101561322e57600080fd5b8101908080519060200190929190505050508373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156132e757600080fd5b505af11580156132fb573d6000803e3d6000fd5b505050506040513d602081101561331157600080fd5b810190808051906020019092919050505050600061347d670de0b6b3a764000061346f8473ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561337957600080fd5b505afa15801561338d573d6000803e3d6000fd5b505050506040513d60208110156133a357600080fd5b8101908080519060200190929190505050613461670de0b6b3a76400006134538873ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561340957600080fd5b505afa15801561341d573d6000803e3d6000fd5b505050506040513d602081101561343357600080fd5b81019080805190602001909291905050508b61381390919063ffffffff16565b61381390919063ffffffff16565b61392190919063ffffffff16565b61392190919063ffffffff16565b90506134ac3330838573ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8e73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b83838c6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561356757600080fd5b505af115801561357b573d6000803e3d6000fd5b505050506040513d606081101561359157600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505050506135e687828d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600080600061360e898930614954565b9150915060008973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561365a57600080fd5b505afa15801561366e573d6000803e3d6000fd5b505050506040513d602081101561368457600080fd5b8101908080519060200190929190505050905060006136a88c83858c8c8c8c614b54565b9150508061371e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61374987858d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b80945050505050979650505050505050565b61380e8363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614eb7565b505050565b6000808314156138265760009050613893565b600082840290508284828161383757fe5b041461388e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806152d46021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015613917576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600061396383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250615102565b905092915050565b60006139ad83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506151c8565b905092915050565b613a9c846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614eb7565b50505050565b600080600089905060008d73ffffffffffffffffffffffffffffffffffffffff1663e6a439058c8c6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613b5d57600080fd5b505afa158015613b71573d6000803e3d6000fd5b505050506040513d6020811015613b8757600080fd5b81019080805190602001909291905050509050613bc733308b8473ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613c6e57600080fd5b505af1158015613c82573d6000803e3d6000fd5b505050506040513d6020811015613c9857600080fd5b810190808051906020019092919050505050506000808d73ffffffffffffffffffffffffffffffffffffffff1663baa2abde8d8d8d8d8d308d6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b158015613db457600080fd5b505af1158015613dc8573d6000803e3d6000fd5b505050506040513d6040811015613dde57600080fd5b8101908080519060200190929190805190602001909291905050509150915060008373ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e4557600080fd5b505afa158015613e59573d6000803e3d6000fd5b505050506040513d6020811015613e6f57600080fd5b810190808051906020019092919050505090508c73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015613f2957600080fd5b505af1158015613f3d573d6000803e3d6000fd5b505050506040513d6020811015613f5357600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561400c57600080fd5b505af1158015614020573d6000803e3d6000fd5b505050506040513d602081101561403657600080fd5b810190808051906020019092919050505050600061416e8573ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561409357600080fd5b505afa1580156140a7573d6000803e3d6000fd5b505050506040513d60208110156140bd57600080fd5b81019080805190602001909291905050506141608773ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561411657600080fd5b505afa15801561412a573d6000803e3d6000fd5b505050506040513d602081101561414057600080fd5b81019080805190602001909291905050508761381390919063ffffffff16565b61392190919063ffffffff16565b905061419d3330838573ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b50508c73ffffffffffffffffffffffffffffffffffffffff1663b8a6bb3b84848a6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050606060405180830381600087803b15801561425a57600080fd5b505af115801561426e573d6000803e3d6000fd5b505050506040513d606081101561428457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506142d787828d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b8181945094505050509a509a98505050505050505050565b600061431e3330888b73ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b60008061432c8b8a30614954565b9150915060008b73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561437857600080fd5b505afa15801561438c573d6000803e3d6000fd5b505050506040513d60208110156143a257600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561445c57600080fd5b505af1158015614470573d6000803e3d6000fd5b505050506040513d602081101561448657600080fd5b8101908080519060200190929190505050508a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b38e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561453f57600080fd5b505af1158015614553573d6000803e3d6000fd5b505050506040513d602081101561456957600080fd5b8101908080519060200190929190505050508c73ffffffffffffffffffffffffffffffffffffffff1663e8e33700828d858d8d8d8d8d6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200198505050505050505050606060405180830381600087803b15801561468a57600080fd5b505af115801561469e573d6000803e3d6000fd5b505050506040513d60608110156146b457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505050505061470733848e73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b6147e9338c73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561478857600080fd5b505afa15801561479c573d6000803e3d6000fd5b505050506040513d60208110156147b257600080fd5b81019080805190602001909291905050508d73ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b600193505050509998505050505050505050565b600080600061480d898930614954565b9150915060006148228b8b858b8b8b8b614b54565b91505080614898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f535741505f4641494c4544000000000000000000000000000000000081525060200191505060405180910390fd5b61494386838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148e357600080fd5b505afa1580156148f7573d6000803e3d6000fd5b505050506040513d602081101561490d57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661375b9092919063ffffffff16565b809350505050979650505050505050565b600080600084116149cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614a7a3386868873ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a1957600080fd5b505afa158015614a2d573d6000803e3d6000fd5b505050506040513d6020811015614a4357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166139b5909392919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015614afb57600080fd5b505af1158015614b0f573d6000803e3d6000fd5b505050506040513d6040811015614b2557600080fd5b810190808051906020019092919080519060200190929190505050915091508181935093505050935093915050565b606060008773ffffffffffffffffffffffffffffffffffffffff1685600081518110614b7c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614614c0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4552525f504154485f4f5054494f4e5f5354415254000000000000000000000081525060200191505060405180910390fd5b8773ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015614cb457600080fd5b505af1158015614cc8573d6000803e3d6000fd5b505050506040513d6020811015614cde57600080fd5b8101908080519060200190929190505050508873ffffffffffffffffffffffffffffffffffffffff166338ed173988888888886040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015614da7578082015181840152602081019050614d8c565b505050509050019650505050505050600060405180830381600087803b158015614dd057600080fd5b505af1158015614de4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015614e0e57600080fd5b8101908080516040519392919084640100000000821115614e2e57600080fd5b83820191506020820185811115614e4457600080fd5b8251866020820283011164010000000082111715614e6157600080fd5b8083526020830192505050908051906020019060200280838360005b83811015614e98578082015181840152602081019050614e7d565b5050505090500160405250505091506001905097509795505050505050565b614ed68273ffffffffffffffffffffffffffffffffffffffff16615288565b614f48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310614f975780518252602082019150602081019050602083039250614f74565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614ff9576040519150601f19603f3d011682016040523d82523d6000602084013e614ffe565b606091505b509150915081615076576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156150fc5780806020019051602081101561509557600080fd5b81019080805190602001909291905050506150fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615345602a913960400191505060405180910390fd5b5b50505050565b600080831182906151ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615173578082015181840152602081019050615158565b50505050905090810190601f1680156151a05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816151ba57fe5b049050809150509392505050565b6000838311158290615275576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561523a57808201518184015260208101905061521f565b50505050905090810190601f1680156152675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91508082141580156152ca57506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77666c6173684d696e7453686f72744f7074696f6e735468656e5377617028616464726573732c616464726573732c75696e743235362c75696e743235362c616464726573735b5d2c61646472657373295361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122057f6bfb14ec05d3671a394b702766668979feed2624d7d4960beb26cc2706fb064736f6c63430006020033", + "devdoc": { + "methods": { + "addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": { + "details": "Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.", + "params": { + "deadline": "The timestamp to expire a pending transaction. \r", + "minOptionTokens": "The minimum quantity of longOptionTokens expected to provide liquidity with.", + "minOtherTokens": "The minimum quantity of otherTokens expected to provide liquidity with.", + "optionAddress": "The address of the optionToken to mint then provide liquidity for.", + "otherTokenAddress": "The address of the otherToken in the pair with the optionToken.", + "quantityOptions": "The quantity of underlyingTokens to use to mint longOptionTokens.", + "quantityOtherTokens": "The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.", + "to": "The address that receives UNI-V2 shares." + } + }, + "addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": { + "details": "Adds redeemToken liquidity to a redeem<>token pair by minting shortOptionTokens with underlyingTokens.", + "params": { + "deadline": "The timestamp to expire a pending transaction. \r", + "minOtherTokens": "The minimum quantity of otherTokens expected to provide liquidity with.", + "minShortTokens": "The minimum quantity of shortOptionTokens expected to provide liquidity with.", + "optionAddress": "The address of the optionToken to get the redeemToken to mint then provide liquidity for.", + "otherTokenAddress": "IMPORTANT: Should be the underlyingToken of option. Address of other reserve asset.", + "quantityOptions": "The quantity of underlyingTokens to use to mint option + redeem tokens.", + "quantityOtherTokens": "The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair.", + "to": "The address that receives UNI-V2 shares." + } + }, + "deployUniswapMarket(address,address)": { + "details": "Creates a UniswapV2Pair by calling `createPair` on the UniswapV2Factory." + }, + "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)": { + "details": "Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with reserve0 = shortOptionTokens and reserve1 = underlyingTokens. Uses underlyingTokens to mint long (option) + short (redeem) tokens. Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens, AND any remainder quantity of underlyingTokens (paid by msg.sender).", + "params": { + "amountOutMin": "The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens.", + "flashLoanQuantity": "The quantity of options to mint using borrowed underlyingTokens.", + "optionAddress": "The address of the Option contract.", + "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.", + "to": "The address to send the shortOptionToken proceeds and longOptionTokens to." + }, + "returns": { + "_0": "success bool Whether the transaction was successful or not. \r" + } + }, + "getName()": { + "details": "Gets the name of the contract." + }, + "getUniswapMarketForTokens(address,address)": { + "details": "Gets a UniswapV2Pair address for two tokens by calling the UniswapV2Factory." + }, + "getVersion()": { + "details": "Gets the version of the contract." + }, + "mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "details": "Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens. Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.", + "params": { + "amountIn": "The quantity of longOptionTokens to mint and then sell.", + "amountOutMin": "The minimum quantity of tokens to receive in exchange for the longOptionTokens.", + "deadline": "The timestamp for a trade to fail at if not successful.", + "optionToken": "The address of the Oracle-less Primitive option.", + "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.", + "to": "The address to send the optionToken proceeds and redeem tokens to." + }, + "returns": { + "_0": "bool Whether the transaction was successful or not. \r" + } + }, + "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "details": "Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens.", + "params": { + "amountIn": "The quantity of options to mint.", + "amountOutMin": "The minimum quantity of tokens to receive in exchange for the shortOptionTokens.", + "deadline": "The timestamp for a trade to fail at if not successful.", + "optionToken": "The address of the Option contract.", + "path": "The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.", + "to": "The address to send the shortOptionToken proceeds and longOptionTokens to." + }, + "returns": { + "_0": "bool Whether the transaction was successful or not. \r" + } + }, + "openFlashLong(address,uint256,uint256)": { + "details": "Opens a longOptionToken position by minting long + short tokens, then selling the short tokens.", + "params": { + "amountOptions": "The quantity of longOptionTokens to purchase.", + "amountOutMin": "The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens. \r", + "optionToken": "The option address." + } + }, + "removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": { + "details": "Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.", + "params": { + "amountAMin": "The minimum quantity of longOptionTokens to receive from removing liquidity.", + "amountBMin": "The minimum quantity of otherTokens to receive from removing liquidity.", + "deadline": "The timestamp to expire a pending transaction. \r", + "liquidity": "The quantity of liquidity tokens to pull from msg.sender and burn.", + "optionAddress": "The address of the option that will be closed from burned UNI-V2 liquidity shares.", + "otherTokenAddress": "The address of the other token in the pair with the options.", + "to": "The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options." + } + }, + "removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": { + "details": "Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.", + "params": { + "amountAMin": "The minimum quantity of shortOptionTokens to receive from removing liquidity.", + "amountBMin": "The minimum quantity of quoteTokens to receive from removing liquidity.", + "deadline": "The timestamp to expire a pending transaction. \r", + "liquidity": "The quantity of liquidity tokens to pull from msg.sender and burn.", + "optionAddress": "The address of the option that will be closed from burned UNI-V2 liquidity shares.", + "otherTokenAddress": "The address of the other token in the option pair.", + "to": "The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options." + } + }, + "uniswapV2Call(address,uint256,uint256,bytes)": { + "details": "The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data.", + "params": { + "amount0": "The quantity of token0 received to the `to` address in the swap() call.", + "amount1": "The quantity of token1 received to the `to` address in the swap() call.", + "data": "The payload passed in the `data` parameter of the swap() call. \r", + "sender": "The original msg.sender of the UniswapV2Pair.swap() call." + } + } + } + }, + "userdoc": { + "methods": { + "addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": { + "notice": "Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address. underlyingToken -> optionToken -> UNI-V2." + }, + "addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": { + "notice": "Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address. underlyingToken -> redeemToken -> UNI-V2." + }, + "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)": { + "notice": "If the first address in the path is not the shortOptionToken address, the tx will fail." + }, + "mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "notice": "If the first address in the path is not the optionToken address, the tx will fail. underlyingToken -> optionToken -> quoteToken." + }, + "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": { + "notice": "If the first address in the path is not the shortOptionToken address, the tx will fail. underlyingToken -> shortOptionToken -> quoteToken. IMPORTANT: redeemTokens = shortOptionTokens" + }, + "openFlashLong(address,uint256,uint256)": { + "notice": "IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens. IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid." + }, + "removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": { + "notice": "Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender. Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address. Sends otherTokens from the burned UNI-V2 liquidity shares to the \"to\" address. UNI-V2 -> optionToken -> underlyingToken." + }, + "removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": { + "notice": "Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender. Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address. Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address. UNI-V2 -> optionToken -> underlyingToken." + } + } + }, + "storageLayout": { + "storage": [ + { + "astId": 1351, + "contract": "contracts/connectors/Uniswap/UniswapConnector02.sol:UniswapConnector02", + "label": "_notEntered", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 2314, + "contract": "contracts/connectors/Uniswap/UniswapConnector02.sol:UniswapConnector02", + "label": "trader", + "offset": 1, + "slot": "0", + "type": "t_contract(ITrader)6872" + }, + { + "astId": 2317, + "contract": "contracts/connectors/Uniswap/UniswapConnector02.sol:UniswapConnector02", + "label": "factory", + "offset": 0, + "slot": "1", + "type": "t_contract(IUniswapV2Factory)1454" + }, + { + "astId": 2320, + "contract": "contracts/connectors/Uniswap/UniswapConnector02.sol:UniswapConnector02", + "label": "router", + "offset": 0, + "slot": "2", + "type": "t_contract(IUniswapV2Router02)2092" + } + ], + "types": { + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ITrader)6872": { + "encoding": "inplace", + "label": "contract ITrader", + "numberOfBytes": "20" + }, + "t_contract(IUniswapV2Factory)1454": { + "encoding": "inplace", + "label": "contract IUniswapV2Factory", + "numberOfBytes": "20" + }, + "t_contract(IUniswapV2Router02)2092": { + "encoding": "inplace", + "label": "contract IUniswapV2Router02", + "numberOfBytes": "20" + } + } + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "4282400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addLongLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": "infinite", + "addShortLiquidityWithUnderlying(address,address,uint256,uint256,uint256,uint256,address,uint256)": "infinite", + "deployUniswapMarket(address,address)": "infinite", + "factory()": "1098", + "flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)": "infinite", + "getName()": "infinite", + "getUniswapMarketForTokens(address,address)": "infinite", + "getVersion()": "271", + "mintLongOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": "infinite", + "mintShortOptionsThenSwapToTokens(address,uint256,uint256,address[],address,uint256)": "infinite", + "openFlashLong(address,uint256,uint256)": "infinite", + "removeLongLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": "infinite", + "removeShortLiquidityThenCloseOptions(address,address,uint256,uint256,uint256,address,uint256)": "infinite", + "router()": "1119", + "trader()": "1193", + "uniswapV2Call(address,uint256,uint256,bytes)": "infinite" + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/WethConnector01.json b/deployments/rinkeby/WethConnector01.json new file mode 100644 index 00000000..b30c793d --- /dev/null +++ b/deployments/rinkeby/WethConnector01.json @@ -0,0 +1,545 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_weth", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inOptions", + "type": "uint256" + } + ], + "name": "WethConnectorClose", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "outUnderlyings", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inStrikes", + "type": "uint256" + } + ], + "name": "WethConnectorExercise", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "outputOptions", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "outputRedeems", + "type": "uint256" + } + ], + "name": "WethConnectorMint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inRedeems", + "type": "uint256" + } + ], + "name": "WethConnectorRedeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "option", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "inOptions", + "type": "uint256" + } + ], + "name": "WethConnectorUnwind", + "type": "event" + }, + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "closeQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeCloseForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "exerciseQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeExerciseForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeExerciseWithETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeMintWithETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeRedeemForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOption", + "name": "optionToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "unwindQuantity", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "safeUnwindForETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "weth", + "outputs": [ + { + "internalType": "contract IWETH", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "receipt": { + "to": null, + "from": "0xE7D58d8554Eb0D5B5438848Af32Bf33EbdE477E7", + "contractAddress": "0xD2A4D8b04ECE88486F265Db5e2F9E792CeBcFD35", + "transactionIndex": 8, + "gasUsed": "3367890", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf9b8bc36bcf1fe42353349785df0a06955651062628037a18d5e723bb6cf9f5b", + "transactionHash": "0x603a1f9a3f59301912d555ac7e831c6deb63c8e270e7676454ac3518514dabd9", + "logs": [], + "blockNumber": 7458064, + "cumulativeGasUsed": "4208793", + "status": 1, + "byzantium": true + }, + "address": "0xD2A4D8b04ECE88486F265Db5e2F9E792CeBcFD35", + "args": [ + "0xc778417e063141139fce010982780140aa0cd5ab" + ], + "solcInputHash": "0x9715524a9374d7e5e9f8cded26273a49b6abb5328c564027de7b23216e9f05ed", + "metadata": "{\"compiler\":{\"version\":\"0.6.2+commit.bacdbe57\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"WethConnectorClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outUnderlyings\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inStrikes\",\"type\":\"uint256\"}],\"name\":\"WethConnectorExercise\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputOptions\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputRedeems\",\"type\":\"uint256\"}],\"name\":\"WethConnectorMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inRedeems\",\"type\":\"uint256\"}],\"name\":\"WethConnectorRedeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"option\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inOptions\",\"type\":\"uint256\"}],\"name\":\"WethConnectorUnwind\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"closeQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeCloseForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"exerciseQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExerciseForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeExerciseWithETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeMintWithETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeRedeemForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOption\",\"name\":\"optionToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"unwindQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"safeUnwindForETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"details\":\"Since the WethConnector contract is responsible for converting between ethers and WETH, the contract is initialized with the address for WETH. \\r\"},\"getName()\":{\"details\":\"Gets the name of the contract.\"},\"getVersion()\":{\"details\":\"Gets the version of the contract.\"},\"safeCloseForETH(address,uint256,address)\":{\"details\":\"Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\",\"params\":{\"closeQuantity\":\"Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address. \\r\"}},\"safeExerciseForETH(address,uint256,address)\":{\"details\":\"Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\",\"params\":{\"exerciseQuantity\":\"Quantity of optionTokens to exercise.\",\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address. \\r\"}},\"safeExerciseWithETH(address,address)\":{\"details\":\"Swaps msg.value of strikeTokens (ethers) to underlyingTokens. Uses the strike ratio as the exchange rate. Strike ratio = base / quote. Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens are sent to the receiver address. \\r\"}},\"safeMintWithETH(address,address)\":{\"details\":\"Mints msg.value quantity of options and \\\"quote\\\" (option parameter) quantity of redeem tokens.\",\"params\":{\"optionToken\":\"The address of the option token to mint.\",\"receiver\":\"The address which receives the minted option and redeem tokens. \\r\"}},\"safeRedeemForETH(address,uint256,address)\":{\"details\":\"Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The strikeTokens (ethers) are sent to the receiver address. \\r\",\"redeemQuantity\":\"The quantity of redeemTokens to burn.\"}},\"safeUnwindForETH(address,uint256,address)\":{\"details\":\"Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. This function is for options with WETH as the underlying asset. The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\",\"params\":{\"optionToken\":\"The address of the option contract.\",\"receiver\":\"The underlyingTokens (ethers) are sent to the receiver address. \\r\",\"unwindQuantity\":\"Quantity of underlyingTokens (ethers) to withdraw.\"}}}},\"userdoc\":{\"methods\":{\"safeCloseForETH(address,uint256,address)\":{\"notice\":\"This function is for options with WETH as the underlying asset. WETH underlyingTokens are converted to ethers before being sent to receiver. The redeemTokens to burn is equal to the optionTokens * strike ratio. inputOptions = inputRedeems / strike ratio = outUnderlyings\"},\"safeExerciseForETH(address,uint256,address)\":{\"notice\":\"This function is for options with WETH as the underlying asset. Burns option tokens, pulls strikeTokens, and pushes out ethers.\"},\"safeExerciseWithETH(address,address)\":{\"notice\":\"This function is for options with WETH as the strike asset. Burns option tokens, accepts ethers, and pushes out underlyingTokens.\"},\"safeMintWithETH(address,address)\":{\"notice\":\"This function is for options that have WETH as the underlying asset.\"},\"safeRedeemForETH(address,uint256,address)\":{\"notice\":\"This function is for options that have WETH as the strike asset. Converts WETH to ethers, and withdraws ethers to the receiver address.\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/connectors/WETH/WethConnector01.sol\":\"WethConnector01\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x04d34b3cd5677bea25f8dfceb6dec0eaa071d4d4b789a43f13fe0c415ba4c296\",\"urls\":[\"bzz-raw://e7e8b526a6839e5ba14f0d23a830387fec47f7043ce01d42c9f285b709a9d080\",\"dweb:/ipfs/QmXmhhFmX5gcAvVzNiDPAGA35iHMPNaYtQkACswRHBVTNw\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3211de52f707a62a356a34fdea9d6a7bed46402d5ce45f1891a16fe2132fbb47\",\"urls\":[\"bzz-raw://45dfe794ad43a3674fab38a378c57eb6ed3353949f6529ccad4a4cbc91d45fc5\",\"dweb:/ipfs/QmReFGciE9fgsb6Nas1Fx593pzKWMjaDa1VQg4CEJQaD6U\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x6cc1cb934a3ac2137a7dcaed018af9e235392236ceecfd3687259702b9c767ad\",\"urls\":[\"bzz-raw://0055fa88138cd1c3c6440370f8580f85857f8fe9dec41c99af9eafbeb8d9c3ce\",\"dweb:/ipfs/QmX1xDh8vwGLLCH8ti45eXjQ7Wcxv1FEGTR3jkFnd5Nv6F\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xa27d8d0bf389702f2b124fff3d86238b17ec0abd47d1401e81dc48a1509dbb9a\",\"urls\":[\"bzz-raw://899c25b79e783c1e4ccdd06928e332e2b37f3ecaa487f49ef68ef9fde6b18f82\",\"dweb:/ipfs/QmV3rZDWabetVSmZ2iviS5tajKzvR3AEwsicKZao4ptTg2\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x5cc574fb09fe4a5f96228ee3af85d268aae6e0b91fc0f2f90b08e9b207bfefd5\",\"urls\":[\"bzz-raw://9e043d364d848bedcafab010a00bb8069b4719a447cd5cf41be4f2993d8e9fc5\",\"dweb:/ipfs/QmPdecjvQJvjxcEH8jd2vuKxKhBWbUu9qLft4kfKz96eR3\"]},\"contracts/connectors/WETH/IWETH.sol\":{\"keccak256\":\"0x63dce39ab69c513fb54459362900e4084a2ad2d164be2d46061afec61b956bfc\",\"urls\":[\"bzz-raw://43a214fb8eb4b26327dea29262c4e29e0f7269aec39ccb7e18bea20cfe7734da\",\"dweb:/ipfs/QmduwCTCBH4nQbXSBpJDhbLuATXLyS44yehfSvy6FTYyby\"]},\"contracts/connectors/WETH/IWethConnector01.sol\":{\"keccak256\":\"0x6e88f4f5726add5fd94a8ef9cfc14ba54a9d84a17018d26bbc2f956e0c07b1bb\",\"urls\":[\"bzz-raw://798f983a161efb3cc952c135a08c4b3ef14fabd6d7dbf49737d3305398aa1399\",\"dweb:/ipfs/QmPHV9UpP41hnxJyGgmKC7GeR3bWU1EJ3QfuTrfb2m4BNc\"]},\"contracts/connectors/WETH/WethConnector01.sol\":{\"keccak256\":\"0x43abd87de3ffe7fcbaadf5496a14ae2693e9ae9a060b281f437842ccc6a4f851\",\"urls\":[\"bzz-raw://3bb0fee6ad240f9d1a2e1bb5f20075af41b5fd2375f959d26698eefeef7b4a25\",\"dweb:/ipfs/QmSVx4syX4hmJtjFyzjei3x1vBPTqPQmeX6VBsMBTtBKJY\"]},\"contracts/connectors/WETH/WethConnectorLib01.sol\":{\"keccak256\":\"0xcac76b767f722892fc4a69421858b0eab336cce94cdb6024886760a1eb4f37cf\",\"urls\":[\"bzz-raw://20e60170706944d73305cb5977c3883b6f5233fceda56df85a2b070438e21516\",\"dweb:/ipfs/QmbA9Wabti8T3MfCFuvWUjZgXTyiXa6Yvyeu1kwyuKpnwd\"]},\"contracts/option/interfaces/IOption.sol\":{\"keccak256\":\"0xef573689b839d22f4b00611baecc3bd095c2a9ca047a677168c99c41741119bb\",\"urls\":[\"bzz-raw://2d2bfc6599b5409ba0d0f426c8fedb7d6fcd2f4b983777ca66fce82e2f1a057b\",\"dweb:/ipfs/QmSAYHuQrjBvXFinCWPCyp3S8pkA7ZDuAC5ZEerQaYPjXB\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051613c89380380613c898339818101604052602081101561003357600080fd5b810190808051906020019092919050505060016000806101000a81548160ff02191690831515021790555080600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613bda806100af6000396000f3fe60806040526004361061008a5760003560e01c80636ba17e7a116100595780636ba17e7a146102a25780636db8ce241461033f57806380e42f8e146103d55780638549780b14610454578063c9c9163e146104d3576100e8565b80630d8e6e2c146100ed57806317d7de7c1461011e5780633fc8cef3146101ae57806350e2f0ba14610205576100e8565b366100e857600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100e657fe5b005b600080fd5b3480156100f957600080fd5b50610102610562565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b5061013361056b565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610173578082015181840152602081019050610158565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ba57600080fd5b506101c36105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021157600080fd5b5061027e6004803603606081101561022857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102ae57600080fd5b5061031b600480360360608110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b3565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561034b57600080fd5b506103b86004803603606081101561036257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610998565b604051808381526020018281526020019250505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7a565b604051808381526020018281526020019250505060405180910390f35b6104b66004803603604081101561046a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b604051808381526020018281526020019250505060405180910390f35b3480156104df57600080fd5b5061054c600480360360608110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3a565b6040518082815260200191505060405180910390f35b60006001905090565b60606040518060400160405280601a81526020017f5072696d6974697665563157657468436f6e6e6563746f723031000000000000815250905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806000610718600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61110b565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006108fd600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b611889565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16610a1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ade600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611fa2565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610bfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610c8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610cbf600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612738565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610e9f600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612cef565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550826000811161104e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600061107e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612f75565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008460008111611187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156111cf57600080fd5b505afa1580156111e3573d6000803e3d6000fd5b505050506040513d60208110156111f957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b810190808051906020019092919050505010156113da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006115008973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b81019080805190602001909291905050506114f28b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a857600080fd5b505afa1580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154957600080fd5b505afa15801561155d573d6000803e3d6000fd5b505050506040513d602081101561157357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561160057600080fd5b505afa158015611614573d6000803e3d6000fd5b505050506040513d602081101561162a57600080fd5b810190808051906020019092919050505010156116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61175c338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116fb57600080fd5b505afa15801561170f573d6000803e3d6000fd5b505050506040513d602081101561172557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b611789338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d606081101561183557600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506118718c8a8c613588565b82828297509750975050505050509450945094915050565b60008060008460008111611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b810190808051906020019092919050505010611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611c468973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6b57600080fd5b505afa158015611b7f573d6000803e3d6000fd5b505050506040513d6020811015611b9557600080fd5b8101908080519060200190929190505050611c388b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bee57600080fd5b505afa158015611c02573d6000803e3d6000fd5b505050506040513d6020811015611c1857600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d4657600080fd5b505afa158015611d5a573d6000803e3d6000fd5b505050506040513d6020811015611d7057600080fd5b81019080805190602001909291905050501015611df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611ea2338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e4157600080fd5b505afa158015611e55573d6000803e3d6000fd5b505050506040513d6020811015611e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611f2457600080fd5b505af1158015611f38573d6000803e3d6000fd5b505050506040513d6060811015611f4e57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611f8a8c8a8c613588565b82828297509750975050505050509450945094915050565b600080836000811161201c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561206457600080fd5b505afa158015612078573d6000803e3d6000fd5b505050506040513d602081101561208e57600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561224557600080fd5b505afa158015612259573d6000803e3d6000fd5b505050506040513d602081101561226f57600080fd5b810190808051906020019092919050505010156122f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b600061241a8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561233f57600080fd5b505afa158015612353573d6000803e3d6000fd5b505050506040513d602081101561236957600080fd5b810190808051906020019092919050505061240c8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123c257600080fd5b505afa1580156123d6573d6000803e3d6000fd5b505050506040513d60208110156123ec57600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561249a57600080fd5b505afa1580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b81019080805190602001909291905050501015612549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612576338a838573ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6125a3338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156125f75781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561267f578082015181840152602081019050612664565b50505050905090810190601f1680156126ac5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156126cc57600080fd5b505af11580156126e0573d6000803e3d6000fd5b505050506040513d60408110156126f657600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506127248b898b613588565b818196509650505050505094509492505050565b60008034600081116127b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156127fa57600080fd5b505afa15801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60003490506000612a038873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561292757600080fd5b505afa15801561293b573d6000803e3d6000fd5b505050506040513d602081101561295157600080fd5b81019080805190602001909291905050506129f58a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ab57600080fd5b505afa1580156129bf573d6000803e3d6000fd5b505050506040513d60208110156129d557600080fd5b8101908080519060200190929190505050856133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a8357600080fd5b505afa158015612a97573d6000803e3d6000fd5b505050506040513d6020811015612aad57600080fd5b81019080805190602001909291905050501015612b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612b3c89896136d5565b612b693389838b73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612bbb5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c43578082015181840152602081019050612c28565b50505050905090810190601f168015612c705780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612c9057600080fd5b505af1158015612ca4573d6000803e3d6000fd5b505050506040513d6040811015612cba57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612d69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d6020811015612ddb57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612e9987876136d5565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1a57600080fd5b505af1158015612f2e573d6000803e3d6000fd5b505050506040513d6040811015612f4457600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561303657600080fd5b505afa15801561304a573d6000803e3d6000fd5b505050506040513d602081101561306057600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315c57600080fd5b505afa158015613170573d6000803e3d6000fd5b505050506040513d602081101561318657600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561321757600080fd5b505afa15801561322b573d6000803e3d6000fd5b505050506040513d602081101561324157600080fd5b810190808051906020019092919050505010156132c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6132f33388888473ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505090506133bc898789613588565b80945050505050949350505050565b6000808314156133de576000905061344b565b60008284029050828482816133ef57fe5b0414613446576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613b5a6021913960400191505060405180910390fd5b809150505b92915050565b600061349383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506137fd565b905092915050565b613582846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506138c3565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135db57600080fd5b505af11580156135ef573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613653576040519150601f19603f3d011682016040523d82523d6000602084013e613658565b606091505b50509050806136cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561371d57600080fd5b505af1158015613731573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b505050506040513d60208110156137e757600080fd5b8101908080519060200190929190505050505050565b600080831182906138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561386e578082015181840152602081019050613853565b50505050905090810190601f16801561389b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138b557fe5b049050809150509392505050565b6138e28273ffffffffffffffffffffffffffffffffffffffff16613b0e565b613954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106139a35780518252602082019150602081019050602083039250613980565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a05576040519150601f19603f3d011682016040523d82523d6000602084013e613a0a565b606091505b509150915081613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115613b0857808060200190516020811015613aa157600080fd5b8101908080519060200190929190505050613b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613b7b602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613b5057506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220009854dfdae5b6ac72c66f966ed76aebbb8d090af514b1f61b96058c67d9246764736f6c63430006020033", + "deployedBytecode": "0x60806040526004361061008a5760003560e01c80636ba17e7a116100595780636ba17e7a146102a25780636db8ce241461033f57806380e42f8e146103d55780638549780b14610454578063c9c9163e146104d3576100e8565b80630d8e6e2c146100ed57806317d7de7c1461011e5780633fc8cef3146101ae57806350e2f0ba14610205576100e8565b366100e857600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146100e657fe5b005b600080fd5b3480156100f957600080fd5b50610102610562565b604051808260ff1660ff16815260200191505060405180910390f35b34801561012a57600080fd5b5061013361056b565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610173578082015181840152602081019050610158565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ba57600080fd5b506101c36105a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561021157600080fd5b5061027e6004803603606081101561022857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ce565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156102ae57600080fd5b5061031b600480360360608110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b3565b60405180848152602001838152602001828152602001935050505060405180910390f35b34801561034b57600080fd5b506103b86004803603606081101561036257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610998565b604051808381526020018281526020019250505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b7a565b604051808381526020018281526020019250505060405180910390f35b6104b66004803603604081101561046a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d5a565b604051808381526020018281526020019250505060405180910390f35b3480156104df57600080fd5b5061054c600480360360608110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f3a565b6040518082815260200191505060405180910390f35b60006001905090565b60606040518060400160405280601a81526020017f5072696d6974697665563157657468436f6e6e6563746f723031000000000000815250905090565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116106e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000806000610718600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b61110b565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc2978904886e008311e365b3205f995713757c94ed5280ae009e4aef94f16496846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b60008060008060009054906101000a900460ff16610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff02191690831515021790555084600081116108ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008060006108fd600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168b8b8b611889565b9250925092508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1a00f9a182cd4b3a17f7d615d9844efbfd01db2c8cc67af671013bcc8449ebe9846040518082815260200191505060405180910390a38282829650965096505050505060016000806101000a81548160ff02191690831515021790555093509350939050565b6000806000809054906101000a900460ff16610a1c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055508360008111610aad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610ade600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898989611fa2565b915091508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8985604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff021916908315150217905550935093915050565b6000806000809054906101000a900460ff16610bfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610c8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610cbf600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612738565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8116e544573ccde45984e7f3d841fa5423c10bf9b307b3d8fc2bff17e75c5f3c8385604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b6000806000809054906101000a900460ff16610dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff0219169083151502179055503460008111610e6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080610e9f600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888612cef565b915091508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1e752b80e2c0de1d3c2ac440e30be61d90fa63d0946c9f913545d28941a1ce3a8484604051808381526020018281526020019250505060405180910390a381819450945050505060016000806101000a81548160ff0219169083151502179055509250929050565b60008060009054906101000a900460ff16610fbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60008060006101000a81548160ff021916908315150217905550826000811161104e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600061107e600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878787612f75565b90508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fee58565c86b9cdb0f760bea68a01784c06f947b47c38d1314832cc9a7b279499836040518082815260200191505060405180910390a3809250505060016000806101000a81548160ff0219169083151502179055509392505050565b60008060008460008111611187576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b1580156111cf57600080fd5b505afa1580156111e3573d6000803e3d6000fd5b505050506040513d60208110156111f957600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b810190808051906020019092919050505010156113da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b60006115008973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b81019080805190602001909291905050506114f28b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a857600080fd5b505afa1580156114bc573d6000803e3d6000fd5b505050506040513d60208110156114d257600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561154957600080fd5b505afa15801561155d573d6000803e3d6000fd5b505050506040513d602081101561157357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561160057600080fd5b505afa158015611614573d6000803e3d6000fd5b505050506040513d602081101561162a57600080fd5b810190808051906020019092919050505010156116af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b61175c338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116fb57600080fd5b505afa15801561170f573d6000803e3d6000fd5b505050506040513d602081101561172557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b611789338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b15801561180b57600080fd5b505af115801561181f573d6000803e3d6000fd5b505050506040513d606081101561183557600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050508093508194508295505050506118718c8a8c613588565b82828297509750975050505050509450945094915050565b60008060008460008111611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614611a2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b428873ffffffffffffffffffffffffffffffffffffffff166325cb5bc06040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b810190808051906020019092919050505010611b20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f4e4f545f45585049524544000000000000000000000000000000000081525060200191505060405180910390fd5b6000611c468973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b6b57600080fd5b505afa158015611b7f573d6000803e3d6000fd5b505050506040513d6020811015611b9557600080fd5b8101908080519060200190929190505050611c388b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bee57600080fd5b505afa158015611c02573d6000803e3d6000fd5b505050506040513d6020811015611c1857600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808973ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8f57600080fd5b505afa158015611ca3573d6000803e3d6000fd5b505050506040513d6020811015611cb957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d4657600080fd5b505afa158015611d5a573d6000803e3d6000fd5b505050506040513d6020811015611d7057600080fd5b81019080805190602001909291905050501015611df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b611ea2338a838c73ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e4157600080fd5b505afa158015611e55573d6000803e3d6000fd5b505050506040513d6020811015611e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6000808a73ffffffffffffffffffffffffffffffffffffffff166383499805306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050606060405180830381600087803b158015611f2457600080fd5b505af1158015611f38573d6000803e3d6000fd5b505050506040513d6060811015611f4e57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809350819450829550505050611f8a8c8a8c613588565b82828297509750975050505050509450945094915050565b600080836000811161201c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561206457600080fd5b505afa158015612078573d6000803e3d6000fd5b505050506040513d602081101561208e57600080fd5b8101908080519060200190929190505050905060008773ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156120e957600080fd5b505afa1580156120fd573d6000803e3d6000fd5b505050506040513d602081101561211357600080fd5b810190808051906020019092919050505090508873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b868873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561224557600080fd5b505afa158015612259573d6000803e3d6000fd5b505050506040513d602081101561226f57600080fd5b810190808051906020019092919050505010156122f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b600061241a8973ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b15801561233f57600080fd5b505afa158015612353573d6000803e3d6000fd5b505050506040513d602081101561236957600080fd5b810190808051906020019092919050505061240c8b73ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123c257600080fd5b505afa1580156123d6573d6000803e3d6000fd5b505050506040513d60208110156123ec57600080fd5b81019080805190602001909291905050508b6133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561249a57600080fd5b505afa1580156124ae573d6000803e3d6000fd5b505050506040513d60208110156124c457600080fd5b81019080805190602001909291905050501015612549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f535452494b4500000000000000000000000000000000000081525060200191505060405180910390fd5b612576338a838573ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b6125a3338a8a8c73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008973ffffffffffffffffffffffffffffffffffffffff1663787eae30308b60006040519080825280601f01601f1916602001820160405280156125f75781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561267f578082015181840152602081019050612664565b50505050905090810190601f1680156126ac5780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b1580156126cc57600080fd5b505af11580156126e0573d6000803e3d6000fd5b505050506040513d60408110156126f657600080fd5b81019080805190602001909291908051906020019092919050505080925081935050506127248b898b613588565b818196509650505050505094509492505050565b60008034600081116127b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b1580156127fa57600080fd5b505afa15801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60003490506000612a038873ffffffffffffffffffffffffffffffffffffffff1662fe19fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561292757600080fd5b505afa15801561293b573d6000803e3d6000fd5b505050506040513d602081101561295157600080fd5b81019080805190602001909291905050506129f58a73ffffffffffffffffffffffffffffffffffffffff1663b592a1386040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ab57600080fd5b505afa1580156129bf573d6000803e3d6000fd5b505050506040513d60208110156129d557600080fd5b8101908080519060200190929190505050856133cb90919063ffffffff16565b61345190919063ffffffff16565b9050808873ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612a8357600080fd5b505afa158015612a97573d6000803e3d6000fd5b505050506040513d6020811015612aad57600080fd5b81019080805190602001909291905050501015612b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4552525f42414c5f4f5054494f4e53000000000000000000000000000000000081525060200191505060405180910390fd5b612b3c89896136d5565b612b693389838b73ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b8773ffffffffffffffffffffffffffffffffffffffff1663787eae30888360006040519080825280601f01601f191660200182016040528015612bbb5781602001600182028038833980820191505090505b506040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c43578082015181840152602081019050612c28565b50505050905090810190601f168015612c705780820380516001836020036101000a031916815260200191505b509450505050506040805180830381600087803b158015612c9057600080fd5b505af1158015612ca4573d6000803e3d6000fd5b505050506040513d6040811015612cba57600080fd5b810190808051906020019092919080519060200190929190505050809250819350505081819550955050505050935093915050565b6000803460008111612d69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663440f5fd26040518163ffffffff1660e01b815260040160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d6020811015612ddb57600080fd5b810190808051906020019092919050505090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612e8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b612e9987876136d5565b6000808773ffffffffffffffffffffffffffffffffffffffff1663fa9ad7c4886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b158015612f1a57600080fd5b505af1158015612f2e573d6000803e3d6000fd5b505050506040513d6040811015612f4457600080fd5b8101908080519060200190929190805190602001909291905050509150915081819550955050505050935093915050565b60008260008111612fee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f4552525f5a45524f00000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008573ffffffffffffffffffffffffffffffffffffffff1663a1a407616040518163ffffffff1660e01b815260040160206040518083038186803b15801561303657600080fd5b505afa15801561304a573d6000803e3d6000fd5b505050506040513d602081101561306057600080fd5b810190808051906020019092919050505090508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4552525f4e4f545f57455448000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008673ffffffffffffffffffffffffffffffffffffffff16632f310bad6040518163ffffffff1660e01b815260040160206040518083038186803b15801561315c57600080fd5b505afa158015613170573d6000803e3d6000fd5b505050506040513d602081101561318657600080fd5b81019080805190602001909291905050509050858173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561321757600080fd5b505afa15801561322b573d6000803e3d6000fd5b505050506040513d602081101561324157600080fd5b810190808051906020019092919050505010156132c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4552525f42414c5f52454445454d00000000000000000000000000000000000081525060200191505060405180910390fd5b6132f33388888473ffffffffffffffffffffffffffffffffffffffff1661349b909392919063ffffffff16565b60008773ffffffffffffffffffffffffffffffffffffffff16635e86929d306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561337457600080fd5b505af1158015613388573d6000803e3d6000fd5b505050506040513d602081101561339e57600080fd5b810190808051906020019092919050505090506133bc898789613588565b80945050505050949350505050565b6000808314156133de576000905061344b565b60008284029050828482816133ef57fe5b0414613446576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613b5a6021913960400191505060405180910390fd5b809150505b92915050565b600061349383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506137fd565b905092915050565b613582846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506138c3565b50505050565b8273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156135db57600080fd5b505af11580156135ef573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114613653576040519150601f19603f3d011682016040523d82523d6000602084013e613658565b606091505b50509050806136cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552525f53454e44494e475f455448455200000000000000000000000000000081525060200191505060405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561371d57600080fd5b505af1158015613731573d6000803e3d6000fd5b50505050508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82346040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156137bd57600080fd5b505af11580156137d1573d6000803e3d6000fd5b505050506040513d60208110156137e757600080fd5b8101908080519060200190929190505050505050565b600080831182906138a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561386e578082015181840152602081019050613853565b50505050905090810190601f16801561389b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816138b557fe5b049050809150509392505050565b6138e28273ffffffffffffffffffffffffffffffffffffffff16613b0e565b613954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106139a35780518252602082019150602081019050602083039250613980565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613a05576040519150601f19603f3d011682016040523d82523d6000602084013e613a0a565b606091505b509150915081613a82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115613b0857808060200190516020811015613aa157600080fd5b8101908080519060200190929190505050613b07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613b7b602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015613b5057506000801b8214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220009854dfdae5b6ac72c66f966ed76aebbb8d090af514b1f61b96058c67d9246764736f6c63430006020033", + "devdoc": { + "methods": { + "constructor": { + "details": "Since the WethConnector contract is responsible for converting between ethers and WETH, the contract is initialized with the address for WETH. \r" + }, + "getName()": { + "details": "Gets the name of the contract." + }, + "getVersion()": { + "details": "Gets the version of the contract." + }, + "safeCloseForETH(address,uint256,address)": { + "details": "Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).", + "params": { + "closeQuantity": "Quantity of optionTokens to burn and an input to calculate how many redeems to burn.", + "optionToken": "The address of the option contract.", + "receiver": "The underlyingTokens (ethers) are sent to the receiver address. \r" + } + }, + "safeExerciseForETH(address,uint256,address)": { + "details": "Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn. Uses the strike ratio as the exchange rate. Strike ratio = base / quote.", + "params": { + "exerciseQuantity": "Quantity of optionTokens to exercise.", + "optionToken": "The address of the option contract.", + "receiver": "The underlyingTokens (ethers) are sent to the receiver address. \r" + } + }, + "safeExerciseWithETH(address,address)": { + "details": "Swaps msg.value of strikeTokens (ethers) to underlyingTokens. Uses the strike ratio as the exchange rate. Strike ratio = base / quote. Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.", + "params": { + "optionToken": "The address of the option contract.", + "receiver": "The underlyingTokens are sent to the receiver address. \r" + } + }, + "safeMintWithETH(address,address)": { + "details": "Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.", + "params": { + "optionToken": "The address of the option token to mint.", + "receiver": "The address which receives the minted option and redeem tokens. \r" + } + }, + "safeRedeemForETH(address,uint256,address)": { + "details": "Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.", + "params": { + "optionToken": "The address of the option contract.", + "receiver": "The strikeTokens (ethers) are sent to the receiver address. \r", + "redeemQuantity": "The quantity of redeemTokens to burn." + } + }, + "safeUnwindForETH(address,uint256,address)": { + "details": "Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options. This function is for options with WETH as the underlying asset. The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.", + "params": { + "optionToken": "The address of the option contract.", + "receiver": "The underlyingTokens (ethers) are sent to the receiver address. \r", + "unwindQuantity": "Quantity of underlyingTokens (ethers) to withdraw." + } + } + } + }, + "userdoc": { + "methods": { + "safeCloseForETH(address,uint256,address)": { + "notice": "This function is for options with WETH as the underlying asset. WETH underlyingTokens are converted to ethers before being sent to receiver. The redeemTokens to burn is equal to the optionTokens * strike ratio. inputOptions = inputRedeems / strike ratio = outUnderlyings" + }, + "safeExerciseForETH(address,uint256,address)": { + "notice": "This function is for options with WETH as the underlying asset. Burns option tokens, pulls strikeTokens, and pushes out ethers." + }, + "safeExerciseWithETH(address,address)": { + "notice": "This function is for options with WETH as the strike asset. Burns option tokens, accepts ethers, and pushes out underlyingTokens." + }, + "safeMintWithETH(address,address)": { + "notice": "This function is for options that have WETH as the underlying asset." + }, + "safeRedeemForETH(address,uint256,address)": { + "notice": "This function is for options that have WETH as the strike asset. Converts WETH to ethers, and withdraws ethers to the receiver address." + } + } + }, + "storageLayout": { + "storage": [ + { + "astId": 1351, + "contract": "contracts/connectors/WETH/WethConnector01.sol:WethConnector01", + "label": "_notEntered", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 4221, + "contract": "contracts/connectors/WETH/WethConnector01.sol:WethConnector01", + "label": "weth", + "offset": 1, + "slot": "0", + "type": "t_contract(IWETH)4095" + } + ], + "types": { + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IWETH)4095": { + "encoding": "inplace", + "label": "contract IWETH", + "numberOfBytes": "20" + } + } + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "3064400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "getName()": "infinite", + "getVersion()": "226", + "safeCloseForETH(address,uint256,address)": "infinite", + "safeExerciseForETH(address,uint256,address)": "infinite", + "safeExerciseWithETH(address,address)": "infinite", + "safeMintWithETH(address,address)": "infinite", + "safeRedeemForETH(address,uint256,address)": "infinite", + "safeUnwindForETH(address,uint256,address)": "infinite", + "weth()": "1148" + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/solcInputs/0x9715524a9374d7e5e9f8cded26273a49b6abb5328c564027de7b23216e9f05ed.json b/deployments/rinkeby/solcInputs/0x9715524a9374d7e5e9f8cded26273a49b6abb5328c564027de7b23216e9f05ed.json new file mode 100644 index 00000000..3d2dbffc --- /dev/null +++ b/deployments/rinkeby/solcInputs/0x9715524a9374d7e5e9f8cded26273a49b6abb5328c564027de7b23216e9f05ed.json @@ -0,0 +1,174 @@ +{ + "language": "Solidity", + "sources": { + "contracts/connectors/Uniswap/IUniswapConnector02.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\nimport {\r\n IUniswapV2Router02\r\n} from \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\r\nimport {\r\n IUniswapV2Factory\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\r\nimport { ITrader } from \"../../option/interfaces/ITrader.sol\";\r\nimport { IOption, IERC20 } from \"../../option/interfaces/IOption.sol\";\r\n\r\ninterface IUniswapConnector02 {\r\n // ==== Combo Operations ====\r\n\r\n function mintLongOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool);\r\n\r\n function mintShortOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool);\r\n\r\n // ==== Flash Open Functions ====\r\n\r\n function openFlashLong(\r\n IOption optionToken,\r\n uint256 amountOptions,\r\n uint256 amountOutMin\r\n ) external returns (bool);\r\n\r\n // ==== Liquidity Functions ====\r\n\r\n function addLongLiquidityWithUnderlying(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minOptionTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool);\r\n\r\n function addShortLiquidityWithUnderlying(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minShortTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) external returns (bool);\r\n\r\n function removeLongLiquidityThenCloseOptions(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external returns (uint256, uint256);\r\n\r\n function removeShortLiquidityThenCloseOptions(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external returns (uint256, uint256);\r\n\r\n // ==== Management Functions ====\r\n\r\n function deployUniswapMarket(address optionAddress, address otherToken)\r\n external\r\n returns (address);\r\n\r\n // ==== View ====\r\n\r\n function getUniswapMarketForTokens(address token0, address token1)\r\n external\r\n view\r\n returns (address);\r\n\r\n function router() external view returns (IUniswapV2Router02);\r\n\r\n function factory() external view returns (IUniswapV2Factory);\r\n\r\n function trader() external view returns (ITrader);\r\n\r\n function getName() external pure returns (string memory);\r\n\r\n function getVersion() external pure returns (uint8);\r\n}\r\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": { + "content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": { + "content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n" + }, + "contracts/option/interfaces/ITrader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IOption } from \"./IOption.sol\";\r\n\r\ninterface ITrader {\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n}\r\n" + }, + "contracts/option/interfaces/IOption.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IOption is IERC20 {\r\n function mintOptions(address receiver) external returns (uint256, uint256);\r\n\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external returns (uint256, uint256);\r\n\r\n function redeemStrikeTokens(address receiver) external returns (uint256);\r\n\r\n function closeOptions(address receiver)\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function redeemToken() external view returns (address);\r\n\r\n function getStrikeTokenAddress() external view returns (address);\r\n\r\n function getUnderlyingTokenAddress() external view returns (address);\r\n\r\n function getBaseValue() external view returns (uint256);\r\n\r\n function getQuoteValue() external view returns (uint256);\r\n\r\n function getExpiryTime() external view returns (uint256);\r\n\r\n function underlyingCache() external view returns (uint256);\r\n\r\n function strikeCache() external view returns (uint256);\r\n\r\n function factory() external view returns (address);\r\n\r\n function getCacheBalances() external view returns (uint256, uint256);\r\n\r\n function getAssetAddresses()\r\n external\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n );\r\n\r\n function getParameters()\r\n external\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n );\r\n\r\n function initRedeemToken(address _redeemToken) external;\r\n\r\n function updateCacheBalances() external;\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../../GSN/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20MinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n /**\n * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n * a default value of 18.\n *\n * To select a different value for {decimals}, use {_setupDecimals}.\n *\n * All three of these values are immutable: they can only be set once during\n * construction.\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n _decimals = 18;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n * called.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Sets {decimals} to a value other than the default one of 18.\n *\n * WARNING: This function should only be called from the constructor. Most\n * applications that interact with token contracts will not expect\n * {decimals} to ever change, and may work incorrectly if it does.\n */\n function _setupDecimals(uint8 decimals_) internal {\n _decimals = decimals_;\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/GSN/Context.sol": { + "content": "pragma solidity ^0.6.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "pragma solidity ^0.6.2;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/connectors/Uniswap/UniswapConnector02.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\n///\r\n/// @title Combines Uniswap V2 Protocol functions with Primitive V1.\r\n/// @notice Primitive V1 UniswapConnector02 - @primitivefi/contracts@v0.4.1\r\n/// @author Primitive\r\n///\r\n\r\n// Uniswap V2 & Primitive V1\r\nimport {\r\n IUniswapV2Callee\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\";\r\nimport {\r\n IUniswapV2Pair\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\";\r\nimport {\r\n IUniswapConnector02,\r\n IUniswapV2Router02,\r\n IUniswapV2Factory,\r\n IOption,\r\n ITrader,\r\n IERC20\r\n} from \"./IUniswapConnector02.sol\";\r\nimport { UniswapConnectorLib02 } from \"./UniswapConnectorLib02.sol\";\r\n// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract UniswapConnector02 is\r\n IUniswapConnector02,\r\n IUniswapV2Callee,\r\n ReentrancyGuard\r\n{\r\n using SafeERC20 for IERC20; // Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data\r\n using SafeMath for uint256; // Reverts on math underflows/overflows\r\n\r\n ITrader public override trader; // The Primitive contract used to interact with the protocol\r\n IUniswapV2Factory public override factory; // The Uniswap V2 factory contract to get pair addresses from\r\n IUniswapV2Router02 public override router; // The Uniswap contract used to interact with the protocol\r\n\r\n event Initialized(address indexed from); // Emmitted on deployment\r\n event FlashOpened(address indexed from, uint256 quantity, uint256 premium); // Emmitted on flash opening a long position\r\n\r\n // ==== Constructor ====\r\n\r\n constructor(\r\n address router_,\r\n address factory_,\r\n address trader_\r\n ) public {\r\n require(address(router) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(factory) == address(0x0), \"ERR_INITIALIZED\");\r\n require(address(trader) == address(0x0), \"ERR_INITIALIZED\");\r\n router = IUniswapV2Router02(router_);\r\n factory = IUniswapV2Factory(factory_);\r\n trader = ITrader(trader_);\r\n emit Initialized(msg.sender);\r\n }\r\n\r\n // ==== Combo Operations ====\r\n\r\n ///\r\n /// @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens.\r\n /// Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.\r\n /// @notice If the first address in the path is not the optionToken address, the tx will fail.\r\n /// underlyingToken -> optionToken -> quoteToken.\r\n /// @param optionToken The address of the Oracle-less Primitive option.\r\n /// @param amountIn The quantity of longOptionTokens to mint and then sell.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n /// @param to The address to send the optionToken proceeds and redeem tokens to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n /// @return bool Whether the transaction was successful or not.\r\n ///\r\n function mintLongOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (bool) {\r\n bool success = UniswapConnectorLib02.mintLongOptionsThenSwapToTokens(\r\n router,\r\n optionToken,\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n return success;\r\n }\r\n\r\n ///\r\n /// @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens.\r\n /// @notice If the first address in the path is not the shortOptionToken address, the tx will fail.\r\n /// underlyingToken -> shortOptionToken -> quoteToken.\r\n /// IMPORTANT: redeemTokens = shortOptionTokens\r\n /// @param optionToken The address of the Option contract.\r\n /// @param amountIn The quantity of options to mint.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\r\n /// @param to The address to send the shortOptionToken proceeds and longOptionTokens to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n /// @return bool Whether the transaction was successful or not.\r\n ///\r\n function mintShortOptionsThenSwapToTokens(\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (bool) {\r\n bool success = UniswapConnectorLib02.mintShortOptionsThenSwapToTokens(\r\n router,\r\n optionToken,\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n return success;\r\n }\r\n\r\n // ==== Flash Open Functions ====\r\n\r\n ///\r\n /// @dev Receives underlyingTokens from a UniswapV2Pair.swap() call from a pair with\r\n /// reserve0 = shortOptionTokens and reserve1 = underlyingTokens.\r\n /// Uses underlyingTokens to mint long (option) + short (redeem) tokens.\r\n /// Sends longOptionTokens to msg.sender, and pays back the UniswapV2Pair the shortOptionTokens,\r\n /// AND any remainder quantity of underlyingTokens (paid by msg.sender).\r\n /// @notice If the first address in the path is not the shortOptionToken address, the tx will fail.\r\n /// @param optionAddress The address of the Option contract.\r\n /// @param flashLoanQuantity The quantity of options to mint using borrowed underlyingTokens.\r\n /// @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\r\n /// @param to The address to send the shortOptionToken proceeds and longOptionTokens to.\r\n /// @return success bool Whether the transaction was successful or not.\r\n ///\r\n function flashMintShortOptionsThenSwap(\r\n address pairAddress,\r\n address optionAddress,\r\n uint256 flashLoanQuantity,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to\r\n ) public returns (bool) {\r\n require(msg.sender == address(this), \"ERR_NOT_SELF\");\r\n require(flashLoanQuantity > 0, \"ERR_ZERO\");\r\n // IMPORTANT: Assume this contract has already received `flashLoanQuantity` of underlyingTokens.\r\n // We are flash swapping from an underlying <> shortOptionToken pair, paying back a portion using minted shortOptionTokens\r\n // and any remainder of underlyingToken.\r\n\r\n address underlyingToken = IOption(optionAddress)\r\n .getUnderlyingTokenAddress();\r\n require(path[1] == underlyingToken, \"ERR_END_PATH_NOT_UNDERLYING\");\r\n\r\n // Mint longOptionTokens using the underlyingTokens received from UniswapV2 flash swap to this contract.\r\n // Send underlyingTokens from this contract to the optionToken contract, then call mintOptions.\r\n IERC20(underlyingToken).safeTransfer(optionAddress, flashLoanQuantity);\r\n (uint256 outputOptions, uint256 outputRedeems) = IOption(optionAddress)\r\n .mintOptions(address(this));\r\n\r\n // Need to return tokens from the flash swap by returning shortOptionTokens and any remainder of underlyingTokens.\r\n {\r\n address underlyingToken_ = underlyingToken;\r\n // Gets the amount of underlyingTokens paid (amounts[1]) based on an input quantity of shortOptionTokens.\r\n uint256[] memory amounts = router.getAmountsOut(\r\n outputRedeems,\r\n path\r\n );\r\n\r\n // The remainder is the flash loan amount - amount paid for from shortOptionTokens.\r\n uint256 remainder; // underlyingTokens borrowed - underlyingTokens paid back by returning shortOptionTokens.\r\n {\r\n uint256 quantity = flashLoanQuantity; // quantity of underlying tokens borrowed\r\n uint256 paid = amounts[1]; // quantity of underlyingTokens paid by shortOptionTokens\r\n require(paid >= amountOutMin, \"ERR_AMOUNT_TOO_LOW\");\r\n // consider the swap fee\r\n remainder = quantity\r\n .mul(1000)\r\n .add(quantity.mul(3))\r\n .div(1000)\r\n .sub(paid);\r\n }\r\n\r\n // Pay back the pair in shortOptionTokens\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n pairAddress,\r\n outputRedeems\r\n );\r\n\r\n // Pull underlyingTokens from the original msg.sender to pay the remainder of the flash swap.\r\n IERC20(underlyingToken_).safeTransferFrom(\r\n to,\r\n pairAddress,\r\n remainder\r\n );\r\n emit FlashOpened(msg.sender, outputOptions, remainder);\r\n }\r\n\r\n // Send longOptionTokens (option) to the original msg.sender.\r\n IERC20(optionAddress).safeTransfer(to, outputOptions);\r\n return true;\r\n }\r\n\r\n ///\r\n /// @dev Opens a longOptionToken position by minting long + short tokens, then selling the short tokens.\r\n /// @notice IMPORTANT: amountOutMin parameter is the price to swap shortOptionTokens to underlyingTokens.\r\n /// IMPORTANT: If the ratio between shortOptionTokens and underlyingTokens is 1:1, then only the swap fee (0.30%) has to be paid.\r\n /// @param optionToken The option address.\r\n /// @param amountOptions The quantity of longOptionTokens to purchase.\r\n /// @param amountOutMin The minimum quantity of underlyingTokens to receive in exchange for the shortOptionTokens.\r\n ///\r\n function openFlashLong(\r\n IOption optionToken,\r\n uint256 amountOptions,\r\n uint256 amountOutMin\r\n ) external override nonReentrant returns (bool) {\r\n address redeemToken = optionToken.redeemToken();\r\n address underlyingToken = optionToken.getUnderlyingTokenAddress();\r\n address pairAddress = factory.getPair(redeemToken, underlyingToken);\r\n\r\n // Build the path to get the appropriate reserves to borrow from, and then pay back.\r\n // We are borrowing from reserve1 then paying it back mostly in reserve0.\r\n // Borrowing underlyingTokens, paying back in shortOptionTokens (normal swap). Pay any remainder in underlyingTokens.\r\n address[] memory path = new address[](2);\r\n path[0] = redeemToken;\r\n path[1] = underlyingToken;\r\n IUniswapV2Pair pair = IUniswapV2Pair(pairAddress);\r\n\r\n bytes4 selector = bytes4(\r\n keccak256(\r\n bytes(\r\n \"flashMintShortOptionsThenSwap(address,address,uint256,uint256,address[],address)\"\r\n )\r\n )\r\n );\r\n bytes memory params = abi.encodeWithSelector(\r\n selector, // function to call in this contract\r\n pairAddress, // pair contract we are borrowing from\r\n optionToken, // option token to mint with flash loaned tokens\r\n amountOptions, // quantity of underlyingTokens from flash loan to use to mint options\r\n amountOutMin, // total price paid (in underlyingTokens) for selling shortOptionTokens\r\n path, // redeemToken -> underlyingToken\r\n msg.sender // address to pull the remainder loan amount to pay, and send longOptionTokens to.\r\n );\r\n\r\n // Receives 0 quoteTokens and `amountOptions` of underlyingTokens to `this` contract address.\r\n // Then executes `flashMintShortOptionsThenSwap`.\r\n uint256 amount0Out = pair.token0() == underlyingToken\r\n ? amountOptions\r\n : 0;\r\n uint256 amount1Out = pair.token0() == underlyingToken\r\n ? 0\r\n : amountOptions;\r\n\r\n // Borrow the amountOptions quantity of underlyingTokens and execute the callback function using params.\r\n pair.swap(amount0Out, amount1Out, address(this), params);\r\n return true;\r\n }\r\n\r\n // ==== Liquidity Functions ====\r\n\r\n ///\r\n /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> optionToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken.\r\n /// @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.\r\n /// @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addLongLiquidityWithUnderlying(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minOptionTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (bool) {\r\n bool success = UniswapConnectorLib02.addLongLiquidityWithUnderlying(\r\n router,\r\n optionAddress,\r\n otherTokenAddress,\r\n quantityOptions,\r\n quantityOtherTokens,\r\n minOptionTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n return success;\r\n }\r\n\r\n ///\r\n /// @dev Adds redeemToken liquidity to a redeem<>token pair by minting shortOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> redeemToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress IMPORTANT: Should be the underlyingToken of option. Address of other reserve asset.\r\n /// @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair.\r\n /// @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addShortLiquidityWithUnderlying(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minShortTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (bool) {\r\n bool success = UniswapConnectorLib02.addShortLiquidityWithUnderlying(\r\n router,\r\n optionAddress,\r\n otherTokenAddress,\r\n quantityOptions,\r\n quantityOtherTokens,\r\n minShortTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n return success;\r\n }\r\n\r\n ///\r\n /// @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n /// @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender.\r\n /// Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address.\r\n /// Sends otherTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n /// UNI-V2 -> optionToken -> underlyingToken.\r\n /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n /// @param otherTokenAddress The address of the other token in the pair with the options.\r\n /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n /// @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity.\r\n /// @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity.\r\n /// @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function removeLongLiquidityThenCloseOptions(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (\r\n uint256 amountOptions,\r\n uint256 amountOtherTokens\r\n ) = UniswapConnectorLib02.removeLongLiquidityThenCloseOptions(\r\n factory,\r\n router,\r\n trader,\r\n optionAddress,\r\n otherTokenAddress,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n return (amountOptions, amountOtherTokens);\r\n }\r\n\r\n ///\r\n /// @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n /// @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender.\r\n /// Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address.\r\n /// Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n /// UNI-V2 -> optionToken -> underlyingToken.\r\n /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n /// @param otherTokenAddress The address of the other token in the option pair.\r\n /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n /// @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity.\r\n /// @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n /// @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function removeShortLiquidityThenCloseOptions(\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (\r\n uint256 amountOptions,\r\n uint256 amountOtherTokens\r\n ) = UniswapConnectorLib02.removeShortLiquidityThenCloseOptions(\r\n factory,\r\n router,\r\n trader,\r\n optionAddress,\r\n otherTokenAddress,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n to,\r\n deadline\r\n );\r\n\r\n return (amountOptions, amountOtherTokens);\r\n }\r\n\r\n // ==== Callback Implementation ====\r\n\r\n ///\r\n /// @dev The callback function triggered in a UniswapV2Pair.swap() call when the `data` parameter has data.\r\n /// @param sender The original msg.sender of the UniswapV2Pair.swap() call.\r\n /// @param amount0 The quantity of token0 received to the `to` address in the swap() call.\r\n /// @param amount1 The quantity of token1 received to the `to` address in the swap() call.\r\n /// @param data The payload passed in the `data` parameter of the swap() call.\r\n ///\r\n function uniswapV2Call(\r\n address sender,\r\n uint256 amount0,\r\n uint256 amount1,\r\n bytes calldata data\r\n ) external override {\r\n address token0 = IUniswapV2Pair(msg.sender).token0();\r\n address token1 = IUniswapV2Pair(msg.sender).token1();\r\n assert(msg.sender == factory.getPair(token0, token1)); /// ensure that msg.sender is actually a V2 pair\r\n (bool success, bytes memory returnData) = address(this).call(data);\r\n require(\r\n success &&\r\n (returnData.length == 0 || abi.decode(returnData, (bool))),\r\n \"ERR_UNISWAPV2_CALL_FAIL\"\r\n );\r\n }\r\n\r\n // ==== Management Functions ====\r\n\r\n /// @dev Creates a UniswapV2Pair by calling `createPair` on the UniswapV2Factory.\r\n function deployUniswapMarket(address optionAddress, address otherToken)\r\n external\r\n override\r\n returns (address)\r\n {\r\n address uniswapPair = factory.createPair(optionAddress, otherToken);\r\n return uniswapPair;\r\n }\r\n\r\n // ==== View ====\r\n\r\n /// @dev Gets a UniswapV2Pair address for two tokens by calling the UniswapV2Factory.\r\n function getUniswapMarketForTokens(address token0, address token1)\r\n public\r\n override\r\n view\r\n returns (address)\r\n {\r\n address uniswapPair = factory.getPair(token0, token1);\r\n require(uniswapPair != address(0x0), \"ERR_PAIR_DOES_NOT_EXIST\");\r\n return uniswapPair;\r\n }\r\n\r\n /// @dev Gets the name of the contract.\r\n function getName() external override pure returns (string memory) {\r\n return \"PrimitiveV1UniswapConnector02\";\r\n }\r\n\r\n /// @dev Gets the version of the contract.\r\n function getVersion() external override pure returns (uint8) {\r\n return uint8(2);\r\n }\r\n}\r\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Callee {\n function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/connectors/Uniswap/UniswapConnectorLib02.sol": { + "content": "pragma solidity >=0.6.0;\r\n\r\n///\r\n/// @title Library for business logic for connecting Uniswap V2 Protocol functions with Primitive V1.\r\n/// @notice Primitive V1 UniswapConnectorLib02 - @primitivefi/contracts@v0.4.1\r\n/// @author Primitive\r\n///\r\n\r\n// Uniswap\r\nimport {\r\n IUniswapV2Callee\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Callee.sol\";\r\nimport {\r\n IUniswapV2Router02\r\n} from \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\r\nimport {\r\n IUniswapV2Factory\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\r\nimport {\r\n IUniswapV2Pair\r\n} from \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\";\r\n// Primitive\r\nimport { ITrader, IOption } from \"../../option/interfaces/ITrader.sol\";\r\nimport { TraderLib, IERC20 } from \"../../option/libraries/TraderLib.sol\";\r\nimport { IWethConnector01, IWETH } from \"../WETH/IWethConnector01.sol\";\r\nimport { WethConnectorLib01 } from \"../WETH/WethConnectorLib01.sol\";\r\n// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary UniswapConnectorLib02 {\r\n using SafeERC20 for IERC20; // Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data\r\n using SafeMath for uint256; // Reverts on math underflows/overflows\r\n\r\n /// ==== Combo Operations ====\r\n\r\n ///\r\n /// @dev Mints long + short option tokens, then swaps the longOptionTokens (option) for tokens.\r\n /// Combines Primitive \"mintOptions\" function with Uniswap V2 Router \"swapExactTokensForTokens\" function.\r\n /// @notice If the first address in the path is not the optionToken address, the tx will fail.\r\n /// underlyingToken -> optionToken -> quoteToken.\r\n /// @param optionToken The address of the Oracle-less Primitive option.\r\n /// @param amountIn The quantity of longOptionTokens to mint and then sell.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the longOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = option.\r\n /// @param to The address to send the optionToken proceeds and redeem tokens to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n /// @return bool Whether the transaction was successful or not.\r\n ///\r\n function mintLongOptionsThenSwapToTokens(\r\n IUniswapV2Router02 router,\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints long + short option tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps longOptionTokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the optionToken address.\r\n (, bool success) = _swapExactOptionsForTokens(\r\n router,\r\n address(optionToken),\r\n outputOptions,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send shortOptionTokens (redeem) to the \"to\" address.\r\n IERC20(optionToken.redeemToken()).safeTransfer(to, outputRedeems);\r\n return success;\r\n }\r\n\r\n ///\r\n /// @dev Mints long + short option tokens, then swaps the shortOptionTokens (redeem) for tokens.\r\n /// @notice If the first address in the path is not the shortOptionToken address, the tx will fail.\r\n /// underlyingToken -> shortOptionToken -> quoteToken.\r\n /// IMPORTANT: redeemTokens = shortOptionTokens\r\n /// @param optionToken The address of the Option contract.\r\n /// @param amountIn The quantity of options to mint.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the shortOptionTokens.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pools. Assumes path[0] = shortOptionToken.\r\n /// @param to The address to send the shortOptionToken proceeds and longOptionTokens to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n /// @return bool Whether the transaction was successful or not.\r\n ///\r\n function mintShortOptionsThenSwapToTokens(\r\n IUniswapV2Router02 router,\r\n IOption optionToken,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n // Pulls underlyingTokens from msg.sender, then pushes underlyingTokens to option contract.\r\n // Mints long + short tokens to this contract.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n amountIn,\r\n address(this)\r\n );\r\n\r\n // Swaps shortOptionTokens to the token specified at the end of the path, then sends to msg.sender.\r\n // Reverts if the first address in the path is not the shortOptionToken address.\r\n address redeemToken = optionToken.redeemToken();\r\n (, bool success) = _swapExactOptionsForTokens(\r\n router,\r\n redeemToken,\r\n outputRedeems, // shortOptionTokens = redeemTokens\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n // Fail early if the swap failed.\r\n require(success, \"ERR_SWAP_FAILED\");\r\n\r\n // Send longOptionTokens to the \"to\" address.\r\n IERC20(optionToken).safeTransfer(to, outputOptions); // longOptionTokens\r\n return success;\r\n }\r\n\r\n // ==== Liquidity Functions ====\r\n\r\n ///\r\n /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> optionToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken.\r\n /// @param quantityOptions The quantity of underlyingTokens to use to mint longOptionTokens.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.\r\n /// @param minOptionTokens IMPORTANT: MUST BE EQUAL TO QUANTITYOPTIONS. The minimum quantity of longOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addLongLiquidityWithUnderlying(\r\n IUniswapV2Router02 router,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minOptionTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n // Pull otherTokens from msg.sender to add to Uniswap V2 Pair.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(otherTokenAddress).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityOtherTokens\r\n );\r\n\r\n // Pulls underlyingTokens from msg.sender to this contract.\r\n // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n IOption(optionAddress),\r\n quantityOptions,\r\n address(this)\r\n );\r\n assert(outputOptions == quantityOptions);\r\n\r\n // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(optionAddress).approve(address(router), uint256(-1));\r\n IERC20(otherTokenAddress).approve(address(router), uint256(-1));\r\n\r\n // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router.addLiquidity(\r\n optionAddress,\r\n otherTokenAddress,\r\n quantityOptions,\r\n quantityOtherTokens,\r\n minOptionTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n // Send shortOptionTokens (redeem) from minting option operation to msg.sender.\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n msg.sender,\r\n outputRedeems\r\n );\r\n IERC20(otherTokenAddress).safeTransfer(\r\n msg.sender,\r\n IERC20(otherTokenAddress).balanceOf(address(this))\r\n );\r\n return true;\r\n }\r\n\r\n ///\r\n /// @dev Adds liquidity to an option<>token pair by minting longOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> optionToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with longOptionTokens to the Uniswap V2 Pair.\r\n /// @param minOptionTokens The minimum quantity of longOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addLongLiquidityWithETHUnderlying(\r\n IWETH weth,\r\n IUniswapV2Router02 router,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOtherTokens,\r\n uint256 minOptionTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n // Pull otherTokens from msg.sender to add to Uniswap V2 Pair.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(otherTokenAddress).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityOtherTokens\r\n );\r\n\r\n // Pulls underlyingTokens from msg.sender to this contract.\r\n // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = WethConnectorLib01\r\n .safeMintWithETH(weth, IOption(optionAddress), address(this));\r\n assert(outputOptions == msg.value);\r\n\r\n // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(optionAddress).approve(address(router), uint256(-1));\r\n IERC20(otherTokenAddress).approve(address(router), uint256(-1));\r\n\r\n // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router.addLiquidity(\r\n optionAddress,\r\n otherTokenAddress,\r\n msg.value,\r\n quantityOtherTokens,\r\n minOptionTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n // Send shortOptionTokens (redeem) from minting option operation to msg.sender.\r\n IERC20(IOption(optionAddress).redeemToken()).safeTransfer(\r\n msg.sender,\r\n outputRedeems\r\n );\r\n return true;\r\n }\r\n\r\n ///\r\n /// @dev Adds redeemToken liquidity to a redeem<>otherToken pair by minting shortOptionTokens with underlyingTokens.\r\n /// @notice Pulls underlying tokens from msg.sender and pushes UNI-V2 liquidity tokens to the \"to\" address.\r\n /// underlyingToken -> redeemToken -> UNI-V2.\r\n /// @param optionAddress The address of the optionToken to get the redeemToken to mint then provide liquidity for.\r\n /// @param otherTokenAddress The address of the otherToken in the pair with the optionToken.\r\n /// @param quantityOptions The quantity of underlyingTokens to use to mint option + redeem tokens.\r\n /// @param quantityOtherTokens The quantity of otherTokens to add with shortOptionTokens to the Uniswap V2 Pair.\r\n /// @param minShortTokens The minimum quantity of shortOptionTokens expected to provide liquidity with.\r\n /// @param minOtherTokens The minimum quantity of otherTokens expected to provide liquidity with.\r\n /// @param to The address that receives UNI-V2 shares.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function addShortLiquidityWithUnderlying(\r\n IUniswapV2Router02 router,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 quantityOptions,\r\n uint256 quantityOtherTokens,\r\n uint256 minShortTokens,\r\n uint256 minOtherTokens,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (bool) {\r\n // Pull otherTokens from msg.sender to add to Uniswap V2 Pair.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n IERC20(otherTokenAddress).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n quantityOtherTokens\r\n );\r\n\r\n // Pulls underlyingTokens from msg.sender to this contract.\r\n // Pushes underlyingTokens to option contract and mints option + redeem tokens to this contract.\r\n // Warning: calls into msg.sender using `safeTransferFrom`. Msg.sender is not trusted.\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n IOption(optionAddress),\r\n quantityOptions,\r\n address(this)\r\n );\r\n address redeemToken = IOption(optionAddress).redeemToken();\r\n\r\n // Approves Uniswap V2 Pair to transfer option and quote tokens from this contract.\r\n IERC20(redeemToken).approve(address(router), uint256(-1));\r\n IERC20(otherTokenAddress).approve(address(router), uint256(-1));\r\n\r\n // Adds liquidity to Uniswap V2 Pair and returns liquidity shares to the \"to\" address.\r\n router.addLiquidity(\r\n redeemToken,\r\n otherTokenAddress,\r\n outputRedeems,\r\n quantityOtherTokens,\r\n minShortTokens,\r\n minOtherTokens,\r\n to,\r\n deadline\r\n );\r\n\r\n // Send longOptionTokens from minting option operation to msg.sender.\r\n IERC20(optionAddress).safeTransfer(msg.sender, outputOptions);\r\n IERC20(otherTokenAddress).safeTransfer(\r\n msg.sender,\r\n IERC20(otherTokenAddress).balanceOf(address(this))\r\n );\r\n return true;\r\n }\r\n\r\n ///\r\n /// @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n /// @notice Pulls UNI-V2 liquidity shares with option<>other token, and redeemTokens from msg.sender.\r\n /// Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address.\r\n /// Sends otherTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n /// UNI-V2 -> optionToken -> underlyingToken.\r\n /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n /// @param otherTokenAddress The address of the other token in the pair with the options.\r\n /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n /// @param amountAMin The minimum quantity of longOptionTokens to receive from removing liquidity.\r\n /// @param amountBMin The minimum quantity of otherTokens to receive from removing liquidity.\r\n /// @param to The address that receives otherTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function removeLongLiquidityThenCloseOptions(\r\n IUniswapV2Factory factory,\r\n IUniswapV2Router02 router,\r\n ITrader trader,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256, uint256) {\r\n // Store in memory for gas savings.\r\n IOption optionToken = IOption(optionAddress);\r\n\r\n {\r\n // Gets the Uniswap V2 Pair address for optionAddress and otherToken.\r\n // Transfers the LP tokens for the pair to this contract.\r\n // Warning: internal call to a non-trusted address `msg.sender`.\r\n address pair = factory.getPair(optionAddress, otherTokenAddress);\r\n IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);\r\n IERC20(pair).approve(address(router), uint256(-1));\r\n }\r\n\r\n // Remove liquidity from Uniswap V2 pool to receive pool tokens (option + quote tokens).\r\n (uint256 amountOptions, uint256 amountOtherTokens) = router\r\n .removeLiquidity(\r\n optionAddress,\r\n otherTokenAddress,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n address(this),\r\n deadline\r\n );\r\n\r\n // Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options.\r\n {\r\n address redeemToken = optionToken.redeemToken();\r\n IERC20(optionAddress).approve(address(trader), uint256(-1));\r\n IERC20(redeemToken).approve(address(trader), uint256(-1));\r\n\r\n // Calculate equivalent quantity of redeem (short option) tokens to close the option position.\r\n // Need to cancel base units and have quote units remaining.\r\n uint256 requiredRedeems = amountOptions\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Pull the required shortOptionTokens from msg.sender to this contract.\r\n IERC20(redeemToken).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n requiredRedeems\r\n );\r\n }\r\n\r\n // Pushes option and redeem tokens to the option contract and calls \"closeOption\".\r\n // Receives underlyingTokens and sends them to the \"to\" address.\r\n trader.safeClose(optionToken, amountOptions, to);\r\n\r\n // Send the otherTokens received from burning liquidity shares to the \"to\" address.\r\n IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens);\r\n return (amountOptions, amountOtherTokens);\r\n }\r\n\r\n ///\r\n /// @dev Combines Uniswap V2 Router \"removeLiquidity\" function with Primitive \"closeOptions\" function.\r\n /// @notice Pulls UNI-V2 liquidity shares with shortOption<>quote token, and optionTokens from msg.sender.\r\n /// Then closes the longOptionTokens and withdraws underlyingTokens to the \"to\" address.\r\n /// Sends quoteTokens from the burned UNI-V2 liquidity shares to the \"to\" address.\r\n /// UNI-V2 -> optionToken -> underlyingToken.\r\n /// @param optionAddress The address of the option that will be closed from burned UNI-V2 liquidity shares.\r\n /// @param otherTokenAddress The address of the other token in the option pair.\r\n /// @param liquidity The quantity of liquidity tokens to pull from msg.sender and burn.\r\n /// @param amountAMin The minimum quantity of shortOptionTokens to receive from removing liquidity.\r\n /// @param amountBMin The minimum quantity of quoteTokens to receive from removing liquidity.\r\n /// @param to The address that receives quoteTokens from burned UNI-V2, and underlyingTokens from closed options.\r\n /// @param deadline The timestamp to expire a pending transaction.\r\n ///\r\n function removeShortLiquidityThenCloseOptions(\r\n IUniswapV2Factory factory,\r\n IUniswapV2Router02 router,\r\n ITrader trader,\r\n address optionAddress,\r\n address otherTokenAddress,\r\n uint256 liquidity,\r\n uint256 amountAMin,\r\n uint256 amountBMin,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256, uint256) {\r\n // Store in memory for gas savings.\r\n address redeemToken = IOption(optionAddress).redeemToken();\r\n\r\n {\r\n // Gets the Uniswap V2 Pair address for shortOptionToken and otherTokens.\r\n // Transfers the LP tokens for the pair to this contract.\r\n // Warning: internal call to a non-trusted address `msg.sender`.\r\n address pair = factory.getPair(redeemToken, otherTokenAddress);\r\n IERC20(pair).safeTransferFrom(msg.sender, address(this), liquidity);\r\n IERC20(pair).approve(address(router), uint256(-1));\r\n }\r\n\r\n // Remove liquidity from Uniswap V2 pool to receive pool tokens (shortOptionTokens + otherTokens).\r\n (uint256 amountShortOptions, uint256 amountOtherTokens) = router\r\n .removeLiquidity(\r\n redeemToken,\r\n otherTokenAddress,\r\n liquidity,\r\n amountAMin,\r\n amountBMin,\r\n address(this),\r\n deadline\r\n );\r\n\r\n // Approves trader to pull longOptionTokens and shortOptionTOkens from this contract to close options.\r\n {\r\n IOption optionToken = IOption(optionAddress);\r\n IERC20(address(optionToken)).approve(address(trader), uint256(-1));\r\n IERC20(redeemToken).approve(address(trader), uint256(-1));\r\n\r\n // Calculate equivalent quantity of redeem (short option) tokens to close the option position.\r\n // Need to cancel base units and have quote units remaining.\r\n uint256 requiredLongOptionTokens = amountShortOptions\r\n .mul(optionToken.getBaseValue())\r\n .mul(1 ether)\r\n .div(optionToken.getQuoteValue())\r\n .div(1 ether);\r\n\r\n // Pull the required longOptionTokens from msg.sender to this contract.\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(this),\r\n requiredLongOptionTokens\r\n );\r\n // Pushes option and redeem tokens to the option contract and calls \"closeOption\".\r\n // Receives underlyingTokens and sends them to the \"to\" address.\r\n trader.safeClose(optionToken, requiredLongOptionTokens, to);\r\n }\r\n\r\n // Send the otherTokens received from burning liquidity shares to the \"to\" address.\r\n IERC20(otherTokenAddress).safeTransfer(to, amountOtherTokens);\r\n return (amountShortOptions, amountOtherTokens);\r\n }\r\n\r\n // ==== Internal Functions ====\r\n\r\n ///\r\n /// @dev Calls the \"swapExactTokensForTokens\" function on the Uniswap V2 Router 02 Contract.\r\n /// @notice Fails early if the address in the beginning of the path is not the token address.\r\n /// @param tokenAddress The address of the token to swap from.\r\n /// @param amountIn The quantity of longOptionTokens to swap with.\r\n /// @param amountOutMin The minimum quantity of tokens to receive in exchange for the tokens swapped.\r\n /// @param path The token addresses to trade through using their Uniswap V2 pairs.\r\n /// @param to The address to send the token proceeds to.\r\n /// @param deadline The timestamp for a trade to fail at if not successful.\r\n ///\r\n function _swapExactOptionsForTokens(\r\n IUniswapV2Router02 router,\r\n address tokenAddress,\r\n uint256 amountIn,\r\n uint256 amountOutMin,\r\n address[] memory path,\r\n address to,\r\n uint256 deadline\r\n ) internal returns (uint256[] memory amounts, bool success) {\r\n // Fails early if the token being swapped from is not the optionToken.\r\n require(path[0] == tokenAddress, \"ERR_PATH_OPTION_START\");\r\n\r\n // Approve the uniswap router to be able to transfer longOptionTokens from this contract.\r\n IERC20(tokenAddress).approve(address(router), uint256(-1));\r\n // Call the Uniswap V2 function to swap longOptionTokens to quoteTokens.\r\n (amounts) = router.swapExactTokensForTokens(\r\n amountIn,\r\n amountOutMin,\r\n path,\r\n to,\r\n deadline\r\n );\r\n success = true;\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/TraderLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Trader Library\r\n * @notice Internal functions that can be used to safeTransfer\r\n * tokens into the option contract then call respective option contract functions.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary TraderLib {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n /**\r\n * @dev Conducts important safety checks to safely mint option tokens.\r\n * @param optionToken The address of the option token to mint.\r\n * @param mintQuantity The quantity of option tokens to mint.\r\n * @param receiver The address which receives the minted option tokens.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(mintQuantity > 0, \"ERR_ZERO\");\r\n IERC20(optionToken.getUnderlyingTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n mintQuantity\r\n );\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) internal returns (uint256, uint256) {\r\n require(exerciseQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.getStrikeTokenAddress()).balanceOf(msg.sender) >=\r\n inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n IERC20(optionToken.getStrikeTokenAddress()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inputRedeems = outputStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) internal returns (uint256) {\r\n require(redeemQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n // There can be the case there is no available strikes to redeem, causing a revert.\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(receiver);\r\n return inputRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n require(closeQuantity > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned. (What we mean by Implicit).\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens are sent to the receiver address and the redeemTokens are burned.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n internal\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Checks\r\n require(unwindQuantity > 0, \"ERR_ZERO\");\r\n // solhint-disable-next-line not-rely-on-time\r\n require(\r\n optionToken.getExpiryTime() < block.timestamp,\r\n \"ERR_NOT_EXPIRED\"\r\n );\r\n\r\n // Calculate amount of redeems required\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n receiver\r\n );\r\n\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeERC20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeERC20: low-level call failed\");\n\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/connectors/WETH/IWethConnector01.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n// Primitive\r\nimport { IOption } from \"../../option/interfaces/IOption.sol\";\r\nimport { IWETH } from \"./IWETH.sol\";\r\n\r\ninterface IWethConnector01 {\r\n function weth() external view returns (IWETH);\r\n\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n payable\r\n returns (uint256, uint256);\r\n\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external returns (uint256, uint256);\r\n\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external returns (uint256);\r\n\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n );\r\n\r\n function getName() external pure returns (string memory);\r\n\r\n function getVersion() external pure returns (uint8);\r\n}\r\n" + }, + "contracts/connectors/WETH/IWETH.sol": { + "content": "pragma solidity >=0.5.0;\r\n\r\ninterface IWETH {\r\n function deposit() external payable;\r\n\r\n function transfer(address to, uint256 value) external returns (bool);\r\n\r\n function withdraw(uint256) external;\r\n}\r\n" + }, + "contracts/connectors/WETH/WethConnectorLib01.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n///\r\n/// @title Weth Connector for bridging ether to WETH Primitive options.\r\n/// @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n/// Manages operations involving options with WETH as the underlying or strike asset.\r\n/// Accepts deposits in ethers and withdraws ethers.\r\n/// Primitive V1 WethConnectorLib01 - @primitivefi/contracts@v0.4.1\r\n/// @author Primitive\r\n///\r\n\r\n// WETH Interface\r\nimport { IWETH } from \"./IWETH.sol\";\r\n// Primitive\r\nimport { IOption, IERC20 } from \"../../option/interfaces/IOption.sol\";\r\n// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\nlibrary WethConnectorLib01 {\r\n using SafeERC20 for IERC20; // Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data\r\n using SafeMath for uint256; // Reverts on math underflows/overflows\r\n\r\n ///\r\n /// @dev Checks the quantity of an operation to make sure its not zero. Fails early.\r\n ///\r\n modifier nonZero(uint256 quantity) {\r\n require(quantity > 0, \"ERR_ZERO\");\r\n _;\r\n }\r\n\r\n // ==== Operation Functions ====\r\n\r\n ///\r\n ///@dev Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.\r\n ///@notice This function is for options that have WETH as the underlying asset.\r\n ///@param optionToken The address of the option token to mint.\r\n ///@param receiver The address which receives the minted option and redeem tokens.\r\n ///\r\n function safeMintWithETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n address receiver\r\n ) internal nonZero(msg.value) returns (uint256, uint256) {\r\n // Check to make sure we are minting a WETH call option.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Convert ethers into WETH, then send WETH to option contract in preparation of calling mintOptions().\r\n _depositEthSendWeth(weth, address(optionToken));\r\n\r\n // Mint the option and redeem tokens.\r\n (uint256 outputOptions, uint256 outputRedeems) = optionToken\r\n .mintOptions(receiver);\r\n\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n ///\r\n /// @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens.\r\n /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n /// Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\r\n /// @notice This function is for options with WETH as the strike asset.\r\n /// Burns option tokens, accepts ethers, and pushes out underlyingTokens.\r\n /// @param optionToken The address of the option contract.\r\n /// @param receiver The underlyingTokens are sent to the receiver address.\r\n ///\r\n function safeExerciseWithETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n address receiver\r\n ) internal nonZero(msg.value) returns (uint256, uint256) {\r\n // Require one of the option's assets to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n uint256 inputStrikes = msg.value;\r\n // Calculate quantity of optionTokens needed to burn.\r\n // An ether put option with strike price $300 has a \"base\" value of 300, and a \"quote\" value of 1.\r\n // To calculate how many options are needed to be burned, we need to cancel out the \"quote\" units.\r\n // The input strike quantity can be multiplied by the strike ratio to cancel out \"quote\" units.\r\n // 1 ether (quote units) * 300 (base units) / 1 (quote units) = 300 inputOptions\r\n uint256 inputOptions = inputStrikes.mul(optionToken.getBaseValue()).div(\r\n optionToken.getQuoteValue()\r\n );\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= inputOptions,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Wrap the ethers into WETH, and send the WETH to the option contract to prepare for calling exerciseOptions().\r\n _depositEthSendWeth(weth, address(optionToken));\r\n\r\n // Send the option tokens required to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n\r\n // Burns the transferred option tokens, stores the strike asset (ether), and pushes underlyingTokens\r\n // to the receiver address.\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n receiver,\r\n inputOptions,\r\n new bytes(0)\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n ///\r\n /// @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn.\r\n /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n /// @notice This function is for options with WETH as the underlying asset.\r\n /// Burns option tokens, pulls strikeTokens, and pushes out ethers.\r\n /// @param optionToken The address of the option contract.\r\n /// @param exerciseQuantity Quantity of optionTokens to exercise.\r\n /// @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeExerciseForETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) internal nonZero(exerciseQuantity) returns (uint256, uint256) {\r\n // Require one of the option's assets to be WETH.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(underlyingAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fails early if msg.sender does not have enough optionTokens.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >=\r\n exerciseQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate quantity of strikeTokens needed to exercise quantity of optionTokens.\r\n uint256 inputStrikes = exerciseQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fails early if msg.sender does not have enough strikeTokens.\r\n require(\r\n IERC20(strikeAddress).balanceOf(msg.sender) >= inputStrikes,\r\n \"ERR_BAL_STRIKE\"\r\n );\r\n\r\n // Send strikeTokens to option contract to prepare for calling exerciseOptions().\r\n IERC20(strikeAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputStrikes\r\n );\r\n\r\n // Send the option tokens to prepare for calling exerciseOptions().\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity\r\n );\r\n\r\n // Burns the optionTokens sent, stores the strikeTokens sent, and pushes underlyingTokens\r\n // to this contract.\r\n uint256 inputOptions;\r\n (inputStrikes, inputOptions) = optionToken.exerciseOptions(\r\n address(this),\r\n exerciseQuantity,\r\n new bytes(0)\r\n );\r\n\r\n // Converts the withdrawn WETH to ethers, then sends the ethers to the receiver address.\r\n _withdrawEthAndSend(weth, receiver, exerciseQuantity);\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n ///\r\n /// @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\r\n /// @notice This function is for options that have WETH as the strike asset.\r\n /// Converts WETH to ethers, and withdraws ethers to the receiver address.\r\n /// @param optionToken The address of the option contract.\r\n /// @param redeemQuantity The quantity of redeemTokens to burn.\r\n /// @param receiver The strikeTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeRedeemForETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) internal nonZero(redeemQuantity) returns (uint256) {\r\n // Require strikeToken to be WETH.\r\n address strikeAddress = optionToken.getStrikeTokenAddress();\r\n require(strikeAddress == address(weth), \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens.\r\n address redeemAddress = optionToken.redeemToken();\r\n require(\r\n IERC20(redeemAddress).balanceOf(msg.sender) >= redeemQuantity,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeemTokens to option contract in preparation for calling redeemStrikeTokens().\r\n IERC20(redeemAddress).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n redeemQuantity\r\n );\r\n\r\n // If options have not been exercised, there will be no strikeTokens to redeem, causing a revert.\r\n // Burns the redeem tokens that were sent to the contract, and withdraws the same quantity of WETH.\r\n // Sends the withdrawn WETH to this contract, so that it can be unwrapped prior to being sent to receiver.\r\n uint256 inputRedeems = optionToken.redeemStrikeTokens(address(this));\r\n\r\n // Unwrap the redeemed WETH and then send the ethers to the receiver.\r\n _withdrawEthAndSend(weth, receiver, redeemQuantity);\r\n\r\n return inputRedeems;\r\n }\r\n\r\n ///\r\n /// @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\r\n /// @notice This function is for options with WETH as the underlying asset.\r\n /// WETH underlyingTokens are converted to ethers before being sent to receiver.\r\n /// The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n /// inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n /// @param optionToken The address of the option contract.\r\n /// @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\r\n /// @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeCloseForETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n internal\r\n nonZero(closeQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // Fail early if msg.sender does not have enough optionTokens to burn.\r\n require(\r\n IERC20(address(optionToken)).balanceOf(msg.sender) >= closeQuantity,\r\n \"ERR_BAL_OPTIONS\"\r\n );\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = closeQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early is msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem and option tokens in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n IERC20(address(optionToken)).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n closeQuantity\r\n );\r\n\r\n // Call the closeOptions() function to burn option and redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them then send the ethers to the receiver.\r\n _withdrawEthAndSend(weth, receiver, closeQuantity);\r\n\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n ///\r\n /// @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options.\r\n /// This function is for options with WETH as the underlying asset.\r\n /// The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\r\n /// @param optionToken The address of the option contract.\r\n /// @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw.\r\n /// @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeUnwindForETH(\r\n IWETH weth,\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n internal\r\n nonZero(unwindQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Require the optionToken to have WETH as the underlying asset.\r\n address underlyingAddress = optionToken.getUnderlyingTokenAddress();\r\n require(address(weth) == underlyingAddress, \"ERR_NOT_WETH\");\r\n\r\n // If the option is not expired, fail early.\r\n // solhint-disable-next-line not-rely-on-time\r\n require(optionToken.getExpiryTime() < now, \"ERR_NOT_EXPIRED\");\r\n\r\n // Calculate the quantity of redeemTokens that need to be burned.\r\n uint256 inputRedeems = unwindQuantity\r\n .mul(optionToken.getQuoteValue())\r\n .div(optionToken.getBaseValue());\r\n\r\n // Fail early if msg.sender does not have enough redeemTokens to burn.\r\n require(\r\n IERC20(optionToken.redeemToken()).balanceOf(msg.sender) >=\r\n inputRedeems,\r\n \"ERR_BAL_REDEEM\"\r\n );\r\n\r\n // Send redeem in preparation of calling closeOptions().\r\n IERC20(optionToken.redeemToken()).safeTransferFrom(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n\r\n // Call the closeOptions() function to burn redeem tokens and withdraw underlyingTokens.\r\n uint256 inputOptions;\r\n uint256 outUnderlyings;\r\n (inputRedeems, inputOptions, outUnderlyings) = optionToken.closeOptions(\r\n address(this)\r\n );\r\n\r\n // Since underlyngTokens are WETH, unwrap them to ethers then send the ethers to the receiver.\r\n _withdrawEthAndSend(weth, receiver, unwindQuantity);\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n // ==== WETH Operations ====\r\n\r\n ///\r\n /// @dev Deposits msg.value of ethers into WETH contract. Then sends WETH to \"to\".\r\n /// @param to The address to send WETH ERC-20 tokens to.\r\n ///\r\n function _depositEthSendWeth(IWETH weth, address to) internal {\r\n // Deposit the ethers received from msg.value into the WETH contract.\r\n weth.deposit.value(msg.value)();\r\n\r\n // Send WETH.\r\n weth.transfer(to, msg.value);\r\n }\r\n\r\n ///\r\n /// @dev Unwraps WETH to withrdaw ethers, which are then sent to the \"to\" address.\r\n /// @param to The address to send withdrawn ethers to.\r\n /// @param quantity The quantity of WETH to unwrap.\r\n ///\r\n function _withdrawEthAndSend(\r\n IWETH weth,\r\n address to,\r\n uint256 quantity\r\n ) internal {\r\n // Withdraw ethers with weth.\r\n weth.withdraw(quantity);\r\n\r\n // Send ether.\r\n (bool success, ) = to.call.value(quantity)(\"\");\r\n\r\n // Revert is call is unsuccessful.\r\n require(success, \"ERR_SENDING_ETHER\");\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\ncontract ReentrancyGuard {\n bool private _notEntered;\n\n constructor () internal {\n // Storing an initial non-zero value makes deployment a bit more\n // expensive, but in exchange the refund on every call to nonReentrant\n // will be lower in amount. Since refunds are capped to a percetange of\n // the total transaction's gas, it is best to keep them low in cases\n // like this one, to increase the likelihood of the full refund coming\n // into effect.\n _notEntered = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _notEntered = false;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _notEntered = true;\n }\n}\n" + }, + "contracts/connectors/WETH/WethConnector01.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n///\r\n/// @title Weth Connector for bridging ether to WETH Primitive options.\r\n/// @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n/// Manages operations involving options with WETH as the underlying or strike asset.\r\n/// Accepts deposits in ethers and withdraws ethers.\r\n/// Primitive V1 WethConnector01 - @primitivefi/contracts@v0.4.1\r\n/// @author Primitive\r\n///\r\n\r\n// Primitive\r\nimport { IWethConnector01, IOption, IWETH } from \"./IWethConnector01.sol\";\r\nimport { WethConnectorLib01, IERC20 } from \"./WethConnectorLib01.sol\";\r\n// Open Zeppelin\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\n\r\ncontract WethConnector01 is IWethConnector01, ReentrancyGuard {\r\n using SafeERC20 for IERC20; // Reverts when `transfer` or `transferFrom` erc20 calls don't return proper data\r\n using SafeMath for uint256; // Reverts on math underflows/overflows\r\n\r\n IWETH public override weth;\r\n\r\n event WethConnectorMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event WethConnectorExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event WethConnectorRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event WethConnectorClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event WethConnectorUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n ///\r\n /// @dev Checks the quantity of an operation to make sure its not zero. Fails early.\r\n ///\r\n modifier nonZero(uint256 quantity) {\r\n require(quantity > 0, \"ERR_ZERO\");\r\n _;\r\n }\r\n\r\n ///\r\n /// @dev Since the WethConnector contract is responsible for converting between ethers and WETH,\r\n /// the contract is initialized with the address for WETH.\r\n ///\r\n constructor(address payable _weth) public {\r\n weth = IWETH(_weth);\r\n }\r\n\r\n ///\r\n /// @dev If ether is sent to this contract through a normal transaction, it will fail, unless\r\n /// it was the WETH contract who sent it.\r\n ///\r\n receive() external payable {\r\n assert(msg.sender == address(weth));\r\n }\r\n\r\n // ==== Operation Functions ====\r\n\r\n ///\r\n /// @dev Mints msg.value quantity of options and \"quote\" (option parameter) quantity of redeem tokens.\r\n /// @notice This function is for options that have WETH as the underlying asset.\r\n /// @param optionToken The address of the option token to mint.\r\n /// @param receiver The address which receives the minted option and redeem tokens.\r\n ///\r\n function safeMintWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n (uint256 outputOptions, uint256 outputRedeems) = WethConnectorLib01\r\n .safeMintWithETH(weth, optionToken, receiver);\r\n emit WethConnectorMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n ///\r\n /// @dev Swaps msg.value of strikeTokens (ethers) to underlyingTokens.\r\n /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n /// Msg.value (quote units) * base / quote = base units (underlyingTokens) to withdraw.\r\n /// @notice This function is for options with WETH as the strike asset.\r\n /// Burns option tokens, accepts ethers, and pushes out underlyingTokens.\r\n /// @param optionToken The address of the option contract.\r\n /// @param receiver The underlyingTokens are sent to the receiver address.\r\n ///\r\n function safeExerciseWithETH(IOption optionToken, address receiver)\r\n external\r\n override\r\n payable\r\n nonReentrant\r\n nonZero(msg.value)\r\n returns (uint256, uint256)\r\n {\r\n (uint256 inputStrikes, uint256 inputOptions) = WethConnectorLib01\r\n .safeExerciseWithETH(weth, optionToken, receiver);\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n ///\r\n /// @dev Swaps strikeTokens to underlyingTokens, WETH, which is converted to ethers before withdrawn.\r\n /// Uses the strike ratio as the exchange rate. Strike ratio = base / quote.\r\n /// @notice This function is for options with WETH as the underlying asset.\r\n /// Burns option tokens, pulls strikeTokens, and pushes out ethers.\r\n /// @param optionToken The address of the option contract.\r\n /// @param exerciseQuantity Quantity of optionTokens to exercise.\r\n /// @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeExerciseForETH(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(exerciseQuantity)\r\n returns (uint256, uint256)\r\n {\r\n (uint256 inputStrikes, uint256 inputOptions) = WethConnectorLib01\r\n .safeExerciseForETH(weth, optionToken, exerciseQuantity, receiver);\r\n\r\n emit WethConnectorExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inputStrikes\r\n );\r\n\r\n return (inputStrikes, inputOptions);\r\n }\r\n\r\n ///\r\n /// @dev Burns redeem tokens to withdraw strike tokens (ethers) at a 1:1 ratio.\r\n /// @notice This function is for options that have WETH as the strike asset.\r\n /// Converts WETH to ethers, and withdraws ethers to the receiver address.\r\n /// @param optionToken The address of the option contract.\r\n /// @param redeemQuantity The quantity of redeemTokens to burn.\r\n /// @param receiver The strikeTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeRedeemForETH(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant nonZero(redeemQuantity) returns (uint256) {\r\n uint256 inputRedeems = WethConnectorLib01.safeRedeemForETH(\r\n weth,\r\n optionToken,\r\n redeemQuantity,\r\n receiver\r\n );\r\n\r\n emit WethConnectorRedeem(\r\n msg.sender,\r\n address(optionToken),\r\n inputRedeems\r\n );\r\n return inputRedeems;\r\n }\r\n\r\n ///\r\n /// @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens (ethers).\r\n /// @notice This function is for options with WETH as the underlying asset.\r\n /// WETH underlyingTokens are converted to ethers before being sent to receiver.\r\n /// The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n /// inputOptions = inputRedeems / strike ratio = outUnderlyings\r\n /// @param optionToken The address of the option contract.\r\n /// @param closeQuantity Quantity of optionTokens to burn and an input to calculate how many redeems to burn.\r\n /// @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeCloseForETH(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(closeQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inputRedeems,\r\n uint256 inputOptions,\r\n uint256 outUnderlyings\r\n ) = WethConnectorLib01.safeCloseForETH(\r\n weth,\r\n optionToken,\r\n closeQuantity,\r\n receiver\r\n );\r\n emit WethConnectorClose(msg.sender, address(optionToken), inputOptions);\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n ///\r\n /// @dev Burn redeemTokens to withdraw underlyingTokens (ethers) from expired options.\r\n /// This function is for options with WETH as the underlying asset.\r\n /// The underlyingTokens are WETH, which are converted to ethers prior to being sent to receiver.\r\n /// @param optionToken The address of the option contract.\r\n /// @param unwindQuantity Quantity of underlyingTokens (ethers) to withdraw.\r\n /// @param receiver The underlyingTokens (ethers) are sent to the receiver address.\r\n ///\r\n function safeUnwindForETH(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n nonZero(unwindQuantity)\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inputRedeems,\r\n uint256 inputOptions,\r\n uint256 outUnderlyings\r\n ) = WethConnectorLib01.safeUnwindForETH(\r\n weth,\r\n optionToken,\r\n unwindQuantity,\r\n receiver\r\n );\r\n\r\n emit WethConnectorUnwind(\r\n msg.sender,\r\n address(optionToken),\r\n inputOptions\r\n );\r\n return (inputRedeems, inputOptions, outUnderlyings);\r\n }\r\n\r\n // ==== View ====\r\n\r\n /// @dev Gets the name of the contract.\r\n function getName() external override pure returns (string memory) {\r\n return \"PrimitiveV1WethConnector01\";\r\n }\r\n\r\n /// @dev Gets the version of the contract.\r\n function getVersion() external override pure returns (uint8) {\r\n return uint8(1);\r\n }\r\n}\r\n" + }, + "contracts/option/applications/factories/OptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Factory for deploying option contracts.\r\n * @author Primitive\r\n */\r\n\r\nimport { Option, SafeMath } from \"../../primitives/Option.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { OptionTemplateLib } from \"../../libraries/OptionTemplateLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { IOptionFactory } from \"../../interfaces/IOptionFactory.sol\";\r\n\r\ncontract OptionFactory is IOptionFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override optionTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the bytecode for the Option contract.\r\n */\r\n function deployOptionTemplate() public override {\r\n optionTemplate = OptionTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a create2 clone of the option template contract.\r\n * @param underlyingToken The address of the underlying ERC-20 token.\r\n * @param strikeToken The address of the strike ERC-20 token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp for option expiry.\r\n */\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override onlyOwner returns (address) {\r\n require(optionTemplate != address(0x0), \"ERR_NO_DEPLOYED_TEMPLATE\");\r\n\r\n // Calculates the salt for create2.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n\r\n // Deploys the clone using the template contract and calculated salt.\r\n address optionAddress = CloneLib.create2Clone(\r\n optionTemplate,\r\n uint256(salt)\r\n );\r\n\r\n // Sets the initial state of the option with the parameter arguments.\r\n Option(optionAddress).initialize(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Only the factory can call the initRedeemToken function to set the redeem token address.\r\n * This function is only callable by the Registry contract (the owner).\r\n */\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n Option(optionAddress).initRedeemToken(redeemAddress);\r\n }\r\n\r\n /**\r\n * @dev Calculates the option token's address using the five option parameters.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override view returns (address) {\r\n // Calculates the salt using the parameter arguments and the salt used in the template contract\r\n // create2 deployment.\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n OptionTemplateLib.OPTION_SALT(),\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n )\r\n );\r\n address optionAddress = CloneLib.deriveInstanceAddress(\r\n optionTemplate,\r\n salt\r\n );\r\n return optionAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Option.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Vanilla Option Token\r\n * @notice This is a low-level contract that is designed to be interacted with by\r\n * other sophisticated smart contracts which have important safety checks,\r\n * and not by externally owned accounts.\r\n * Incorrect usage through direct interaction from externally owned accounts\r\n * can lead to the loss of funds.\r\n * Use Primitive's Trader.sol contract to interact with this contract safely.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { IFlash } from \"../interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\n\r\ncontract Option is IOption, ERC20 {\r\n using SafeMath for uint256;\r\n using SafeERC20 for IERC20;\r\n\r\n struct OptionParameters {\r\n address underlyingToken;\r\n address strikeToken;\r\n uint256 base;\r\n uint256 quote;\r\n uint256 expiry;\r\n }\r\n\r\n OptionParameters public optionParameters;\r\n\r\n // solhint-disable-next-line const-name-snakecase\r\n uint256 public override underlyingCache;\r\n uint256 public override strikeCache;\r\n address public override redeemToken;\r\n address public override factory;\r\n bool private _notEntered;\r\n\r\n string public constant name = \"Primitive V1 Option\";\r\n string public constant symbol = \"PRM\";\r\n uint8 public constant decimals = 18;\r\n\r\n event Mint(address indexed from, uint256 outOptions, uint256 outRedeems);\r\n event Exercise(\r\n address indexed from,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event Redeem(address indexed from, uint256 inRedeems);\r\n event Close(address indexed from, uint256 outUnderlyings);\r\n event UpdatedCacheBalances(uint256 underlyingCache, uint256 strikeCache);\r\n event InitializedRedeem(\r\n address indexed caller,\r\n address indexed redeemToken\r\n );\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the intial state for the contract. Only called immediately after deployment.\r\n * @param underlyingToken The address of the underlying asset.\r\n * @param strikeToken The address of the strike asset.\r\n * @param base The quantity of underlying tokens per quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per base amount of underlying tokens.\r\n * @param expiry The expiration date for the option.\r\n */\r\n function initialize(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= block.timestamp, \"ERR_EXPIRY\");\r\n factory = msg.sender;\r\n optionParameters = OptionParameters(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n _notEntered = true;\r\n }\r\n\r\n modifier notExpired {\r\n // solhint-disable-next-line not-rely-on-time\r\n require(isNotExpired(), \"ERR_EXPIRED\");\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Prevents a contract from calling itself, directly or indirectly.\r\n * Calling a `nonReentrant` function from another `nonReentrant`\r\n * function is not supported. It is possible to prevent this from happening\r\n * by making the `nonReentrant` function external, and make it call a\r\n * `private` function that does the actual work.\r\n */\r\n modifier nonReentrant() {\r\n // On the first call to nonReentrant, _notEntered will be true\r\n require(_notEntered, \"ReentrancyGuard: reentrant call\");\r\n\r\n // Any calls to nonReentrant after this point will fail\r\n _notEntered = false;\r\n\r\n _;\r\n\r\n // By storing the original value once again, a refund is triggered (see\r\n // https://eips.ethereum.org/EIPS/eip-2200)\r\n _notEntered = true;\r\n }\r\n\r\n /**\r\n * @dev Called after the option contract is initialized, and a redeem token has been deployed.\r\n * @notice Entangles a redeem token to this option contract permanently.\r\n * @param redeemToken_ The address of the redeem token.\r\n */\r\n function initRedeemToken(address redeemToken_) external override {\r\n require(msg.sender == factory, \"ERR_NOT_OWNER\");\r\n require(redeemToken == address(0x0), \"ERR_REDEEM_INITIALIZED\");\r\n redeemToken = redeemToken_;\r\n emit InitializedRedeem(msg.sender, redeemToken_);\r\n }\r\n\r\n /**\r\n * @dev Updates the cached balances to match the actual current balances.\r\n * Attempting to transfer tokens to this contract directly, in a separate transaction,\r\n * is incorrect and could result in loss of funds. Calling this function will permanently lock any excess\r\n * underlying or strike tokens which were erroneously sent to this contract.\r\n */\r\n function updateCacheBalances() external override nonReentrant {\r\n _updateCacheBalances(\r\n IERC20(optionParameters.underlyingToken).balanceOf(address(this)),\r\n IERC20(optionParameters.strikeToken).balanceOf(address(this))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Sets the cache balances to new values.\r\n */\r\n function _updateCacheBalances(\r\n uint256 underlyingBalance,\r\n uint256 strikeBalance\r\n ) private {\r\n underlyingCache = underlyingBalance;\r\n strikeCache = strikeBalance;\r\n emit UpdatedCacheBalances(underlyingBalance, strikeBalance);\r\n }\r\n\r\n /* === STATE MUTABLE === */\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Mints optionTokens at a 1:1 ratio to underlyingToken deposits. Also mints Redeem tokens at a base:quote ratio.\r\n * @notice inUnderlyings = outOptionTokens. inUnderlying / strike ratio = outRedeemTokens.\r\n * @param receiver The newly minted tokens are sent to the receiver address.\r\n */\r\n function mintOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n notExpired\r\n returns (uint256, uint256)\r\n {\r\n // Save on gas because this variable is used twice.\r\n uint256 underlyingBalance = IERC20(optionParameters.underlyingToken)\r\n .balanceOf(address(this));\r\n\r\n // Mint optionTokens equal to the difference between current and cached balance of underlyingTokens.\r\n uint256 inUnderlyings = underlyingBalance.sub(underlyingCache);\r\n\r\n // Calculate the quantity of redeemTokens to mint.\r\n uint256 outRedeems = inUnderlyings.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n require(outRedeems > 0, \"ERR_ZERO\");\r\n\r\n // Mint the optionTokens and redeemTokens.\r\n IRedeem(redeemToken).mint(receiver, outRedeems);\r\n _mint(receiver, inUnderlyings);\r\n\r\n // Update the underlyingCache.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Mint(msg.sender, inUnderlyings, outRedeems);\r\n return (inUnderlyings, outRedeems);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Sends out underlyingTokens then checks to make sure they are returned or paid for.\r\n * This function enables flash exercises and flash loans. Only smart contracts who implement\r\n * their own IFlash interface should be calling this function to initiate a flash exercise/loan.\r\n * @notice If the underlyingTokens are returned, only the fee has to be paid.\r\n * @param receiver The outUnderlyings are sent to the receiver address.\r\n * @param outUnderlyings Quantity of underlyingTokens to safeTransfer to receiver optimistically.\r\n * @param data Passing in any abritrary data will trigger the flash exercise callback function.\r\n */\r\n function exerciseOptions(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override nonReentrant notExpired returns (uint256, uint256) {\r\n // Store the cached balances and token addresses in memory.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n //(uint256 _underlyingCache, uint256 _strikeCache) = getCacheBalances();\r\n\r\n // Require outUnderlyings > 0 and balance of underlyings >= outUnderlyings.\r\n require(outUnderlyings > 0, \"ERR_ZERO\");\r\n require(\r\n IERC20(underlyingToken).balanceOf(address(this)) >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Optimistically safeTransfer out underlyingTokens.\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n if (data.length > 0)\r\n IFlash(receiver).primitiveFlash(msg.sender, outUnderlyings, data);\r\n\r\n // Store in memory for gas savings.\r\n uint256 strikeBalance = IERC20(optionParameters.strikeToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n\r\n // Calculate the differences.\r\n uint256 inStrikes = strikeBalance.sub(strikeCache);\r\n uint256 inUnderlyings = underlyingBalance.sub(\r\n underlyingCache.sub(outUnderlyings)\r\n ); // will be > 0 if underlyingTokens are returned.\r\n\r\n // Either underlyingTokens or strikeTokens must be sent into the contract.\r\n require(inStrikes > 0 || inUnderlyings > 0, \"ERR_ZERO\");\r\n\r\n // Calculate the remaining amount of underlyingToken that needs to be paid for.\r\n uint256 remainder = inUnderlyings > outUnderlyings\r\n ? 0\r\n : outUnderlyings.sub(inUnderlyings);\r\n\r\n // Calculate the expected payment of strikeTokens.\r\n uint256 payment = remainder.mul(optionParameters.quote).div(\r\n optionParameters.base\r\n );\r\n\r\n // Assumes the cached optionToken balance is 0, which is what it should be.\r\n uint256 inOptions = balanceOf(address(this));\r\n\r\n // Enforce the invariants.\r\n require(inStrikes >= payment, \"ERR_STRIKES_INPUT\");\r\n require(inOptions >= remainder, \"ERR_OPTIONS_INPUT\");\r\n\r\n // Burn the optionTokens at a 1:1 ratio to outUnderlyings.\r\n _burn(address(this), inOptions);\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeBalance);\r\n emit Exercise(msg.sender, outUnderlyings, inStrikes);\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * Burns redeemTokens to withdraw strikeTokens at a ratio of 1:1.\r\n * @notice inRedeemTokens = outStrikeTokens. Only callable when strikeTokens are in the contract.\r\n * @param receiver The inRedeems quantity of strikeTokens are sent to the receiver address.\r\n */\r\n function redeemStrikeTokens(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (uint256)\r\n {\r\n address strikeToken = optionParameters.strikeToken;\r\n address _redeemToken = redeemToken;\r\n uint256 strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // Difference between redeemTokens balance and cache.\r\n require(inRedeems > 0, \"ERR_ZERO\");\r\n require(strikeBalance >= inRedeems, \"ERR_BAL_STRIKE\");\r\n\r\n // Burn redeemTokens in the contract. Send strikeTokens to receiver.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(strikeToken).safeTransfer(receiver, inRedeems);\r\n\r\n // Current balances.\r\n strikeBalance = IERC20(strikeToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingCache, strikeBalance);\r\n emit Redeem(msg.sender, inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Warning: This low-level function should be called from a contract which performs important safety checks.\r\n * This function should never be called directly by an externally owned account.\r\n * A sophsticated smart contract should make the important checks to make sure the correct amount of tokens\r\n * are transferred into this contract prior to the function call. If an incorrect amount of tokens are transferred\r\n * into this contract, and this function is called, it can result in the loss of funds.\r\n * If the option has expired, burn redeem tokens to withdraw underlying tokens.\r\n * If the option is not expired, burn option and redeem tokens to withdraw underlying tokens.\r\n * @notice inRedeemTokens / strike ratio = outUnderlyingTokens && inOptionTokens >= outUnderlyingTokens.\r\n * @param receiver The outUnderlyingTokens are sent to the receiver address.\r\n */\r\n function closeOptions(address receiver)\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n // Stores addresses and balances locally for gas savings.\r\n address underlyingToken = optionParameters.underlyingToken;\r\n address _redeemToken = redeemToken;\r\n uint256 underlyingBalance = IERC20(underlyingToken).balanceOf(\r\n address(this)\r\n );\r\n uint256 optionBalance = balanceOf(address(this));\r\n uint256 inRedeems = IERC20(_redeemToken).balanceOf(address(this));\r\n\r\n // The quantity of underlyingToken to send out it still determined by the quantity of inRedeems.\r\n // inRedeems is in units of strikeTokens, which is converted to underlyingTokens\r\n // by multiplying inRedeems by the strike ratio, which is base / quote.\r\n // This outUnderlyings quantity is checked against inOptions.\r\n // inOptions must be greater than or equal to outUnderlyings (1 option burned per 1 underlying purchased).\r\n // optionBalance must be greater than or equal to outUnderlyings.\r\n // Neither inRedeems or inOptions can be zero.\r\n uint256 outUnderlyings = inRedeems.mul(optionParameters.base).div(\r\n optionParameters.quote\r\n );\r\n\r\n // Assumes the cached balance is 0 so inOptions = balance of optionToken.\r\n // If optionToken is expired, optionToken does not need to be sent in. Only redeemToken.\r\n // solhint-disable-next-line not-rely-on-time\r\n uint256 inOptions = isNotExpired() ? optionBalance : outUnderlyings;\r\n require(inRedeems > 0 && inOptions > 0, \"ERR_ZERO\");\r\n require(\r\n inOptions >= outUnderlyings && underlyingBalance >= outUnderlyings,\r\n \"ERR_BAL_UNDERLYING\"\r\n );\r\n\r\n // Burn optionTokens. optionTokens are only sent into contract when not expired.\r\n // solhint-disable-next-line not-rely-on-time\r\n if (isNotExpired()) {\r\n _burn(address(this), inOptions);\r\n }\r\n\r\n // Send underlyingTokens to user.\r\n // Burn redeemTokens held in the contract.\r\n // User does not receive extra underlyingTokens if there was extra optionTokens in the contract.\r\n // User receives outUnderlyings proportional to inRedeems.\r\n IRedeem(_redeemToken).burn(address(this), inRedeems);\r\n IERC20(underlyingToken).safeTransfer(receiver, outUnderlyings);\r\n\r\n // Current balances of underlyingToken and redeemToken.\r\n underlyingBalance = IERC20(underlyingToken).balanceOf(address(this));\r\n\r\n // Update the cached balances.\r\n _updateCacheBalances(underlyingBalance, strikeCache);\r\n emit Close(msg.sender, outUnderlyings);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /* === VIEW === */\r\n\r\n /**\r\n * @dev Returns the previously saved balances of underlying and strike tokens.\r\n */\r\n function getCacheBalances()\r\n public\r\n override\r\n view\r\n returns (uint256, uint256)\r\n {\r\n return (underlyingCache, strikeCache);\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying, strike, and redeem token addresses.\r\n */\r\n function getAssetAddresses()\r\n public\r\n override\r\n view\r\n returns (\r\n address,\r\n address,\r\n address\r\n )\r\n {\r\n return (\r\n optionParameters.underlyingToken,\r\n optionParameters.strikeToken,\r\n redeemToken\r\n );\r\n }\r\n\r\n /**\r\n * @dev Returns the strike token address.\r\n */\r\n function getStrikeTokenAddress() public override view returns (address) {\r\n return optionParameters.strikeToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the underlying token address.\r\n */\r\n function getUnderlyingTokenAddress()\r\n public\r\n override\r\n view\r\n returns (address)\r\n {\r\n return optionParameters.underlyingToken;\r\n }\r\n\r\n /**\r\n * @dev Returns the base value option parameter.\r\n */\r\n function getBaseValue() public override view returns (uint256) {\r\n return optionParameters.base;\r\n }\r\n\r\n /**\r\n * @dev Returns the quote value option parameter.\r\n */\r\n function getQuoteValue() public override view returns (uint256) {\r\n return optionParameters.quote;\r\n }\r\n\r\n /**\r\n * @dev Returns the expiry timestamp option parameter.\r\n */\r\n function getExpiryTime() public override view returns (uint256) {\r\n return optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the option parameters and redeem token address.\r\n */\r\n function getParameters()\r\n public\r\n override\r\n view\r\n returns (\r\n address _underlyingToken,\r\n address _strikeToken,\r\n address _redeemToken,\r\n uint256 _base,\r\n uint256 _quote,\r\n uint256 _expiry\r\n )\r\n {\r\n OptionParameters memory _optionParameters = optionParameters;\r\n _underlyingToken = _optionParameters.underlyingToken;\r\n _strikeToken = _optionParameters.strikeToken;\r\n _redeemToken = redeemToken;\r\n _base = _optionParameters.base;\r\n _quote = _optionParameters.quote;\r\n _expiry = _optionParameters.expiry;\r\n }\r\n\r\n /**\r\n * @dev Internal function to check if the option is expired.\r\n */\r\n function isNotExpired() internal view returns (bool) {\r\n return optionParameters.expiry >= block.timestamp;\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ninterface IRedeem is IERC20 {\r\n function optionToken() external view returns (address);\r\n\r\n function factory() external view returns (address);\r\n\r\n function mint(address user, uint256 amount) external;\r\n\r\n function burn(address user, uint256 amount) external;\r\n\r\n function initialize(address _factory, address _optionToken) external;\r\n}\r\n" + }, + "contracts/option/interfaces/IFlash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IFlash {\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external;\r\n}\r\n" + }, + "contracts/option/primitives/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @dev Modifies name, symbol, and decimals by deleting them. Implemented as constants in parent contract.\r\n */\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\n/**\r\n * @dev Implementation of the {IERC20} interface.\r\n *\r\n * This implementation is agnostic to the way tokens are created. This means\r\n * that a supply mechanism has to be added in a derived contract using {_mint}.\r\n * For a generic mechanism see {ERC20PresetMinterPauser}.\r\n *\r\n * TIP: For a detailed writeup see our guide\r\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\r\n * to implement supply mechanisms].\r\n *\r\n * We have followed general OpenZeppelin guidelines: functions revert instead\r\n * of returning `false` on failure. This behavior is nonetheless conventional\r\n * and does not conflict with the expectations of ERC20 applications.\r\n *\r\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\r\n * This allows applications to reconstruct the allowance for all accounts just\r\n * by listening to said events. Other implementations of the EIP may not emit\r\n * these events, as it isn't required by the specification.\r\n *\r\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\r\n * functions have been added to mitigate the well-known issues around setting\r\n * allowances. See {IERC20-approve}.\r\n */\r\ncontract ERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n /**\r\n * @dev See {IERC20-totalSupply}.\r\n */\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-balanceOf}.\r\n */\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transfer}.\r\n *\r\n * Requirements:\r\n *\r\n * - `recipient` cannot be the zero address.\r\n * - the caller must have a balance of at least `amount`.\r\n */\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-allowance}.\r\n */\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-approve}.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev See {IERC20-transferFrom}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance. This is not\r\n * required by the EIP. See the note at the beginning of {ERC20};\r\n *\r\n * Requirements:\r\n * - `sender` and `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n * - the caller must have allowance for ``sender``'s tokens of at least\r\n * `amount`.\r\n */\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override returns (bool) {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically increases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n */\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\r\n *\r\n * This is an alternative to {approve} that can be used as a mitigation for\r\n * problems described in {IERC20-approve}.\r\n *\r\n * Emits an {Approval} event indicating the updated allowance.\r\n *\r\n * Requirements:\r\n *\r\n * - `spender` cannot be the zero address.\r\n * - `spender` must have allowance for the caller of at least\r\n * `subtractedValue`.\r\n */\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev Moves tokens `amount` from `sender` to `recipient`.\r\n *\r\n * This is internal function is equivalent to {transfer}, and can be used to\r\n * e.g. implement automatic token fees, slashing mechanisms, etc.\r\n *\r\n * Emits a {Transfer} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `sender` cannot be the zero address.\r\n * - `recipient` cannot be the zero address.\r\n * - `sender` must have a balance of at least `amount`.\r\n */\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\r\n * the total supply.\r\n *\r\n * Emits a {Transfer} event with `from` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `to` cannot be the zero address.\r\n */\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n /**\r\n * @dev Destroys `amount` tokens from `account`, reducing the\r\n * total supply.\r\n *\r\n * Emits a {Transfer} event with `to` set to the zero address.\r\n *\r\n * Requirements\r\n *\r\n * - `account` cannot be the zero address.\r\n * - `account` must have at least `amount` tokens.\r\n */\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n /**\r\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\r\n *\r\n * This is internal function is equivalent to `approve`, and can be used to\r\n * e.g. set automatic allowances for certain subsystems, etc.\r\n *\r\n * Emits an {Approval} event.\r\n *\r\n * Requirements:\r\n *\r\n * - `owner` cannot be the zero address.\r\n * - `spender` cannot be the zero address.\r\n */\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n /**\r\n * @dev Sets {decimals} to a value other than the default one of 18.\r\n *\r\n * WARNING: This function should only be called from the constructor. Most\r\n * applications that interact with token contracts will not expect\r\n * {decimals} to ever change, and may work incorrectly if it does.\r\n */\r\n /* function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n } */\r\n\r\n // ======= WARNING: ADDED FUNCTIONS =========\r\n\r\n /* function _setupName(string memory name_) internal {\r\n _name = name_;\r\n }\r\n\r\n function _setupSymbol(string memory symbol_) internal {\r\n _symbol = symbol_;\r\n } */\r\n\r\n // ======= END ADDED FUNCTIONS =========\r\n\r\n /**\r\n * @dev Hook that is called before any transfer of tokens. This includes\r\n * minting and burning.\r\n *\r\n * Calling conditions:\r\n *\r\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\r\n * will be to transferred to `to`.\r\n * - when `from` is zero, `amount` tokens will be minted for `to`.\r\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\r\n * - `from` and `to` are never both zero.\r\n *\r\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r\n */\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {}\r\n}\r\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "contracts/option/libraries/OptionTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Option } from \"../primitives/Option.sol\";\r\n\r\nlibrary OptionTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _OPTION_SALT = 0x56f3a99c8e36689645460020839ea1340cbbb2e507b7effe3f180a89db85dd87; // keccak(\"primitive-option\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function OPTION_SALT() internal pure returns (bytes32) {\r\n return _OPTION_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Option.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Option).creationCode;\r\n implementationAddress = Create2.deploy(0, _OPTION_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Create2.sol": { + "content": "pragma solidity ^0.6.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address) {\n address addr;\n require(address(this).balance >= amount, \"Create2: insufficient balance\");\n require(bytecode.length != 0, \"Create2: bytecode length is zero\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), \"Create2: Failed on deploy\");\n return addr;\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address) {\n bytes32 _data = keccak256(\n abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)\n );\n return address(bytes20(_data << 96));\n }\n}\n" + }, + "contracts/option/applications/NullCloneConstructor.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ncontract NullCloneConstructor {\r\n // solhint-disable-next-line no-empty-blocks\r\n function cloneConstructor(bytes memory consData) public {\r\n // blank\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/CloneLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @title Create2 Clone Factory Library\r\n * @author Alan Lu, Gnosis.\r\n * Raymond Pulver IV.\r\n */\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\n\r\nlibrary CloneLib {\r\n /**\r\n * @dev Calls internal creation computation function.\r\n */\r\n function computeCreationCode(address target)\r\n internal\r\n view\r\n returns (bytes memory clone)\r\n {\r\n clone = computeCreationCode(address(this), target);\r\n }\r\n\r\n /**\r\n * @dev Computes the Clone's creation code.\r\n */\r\n function computeCreationCode(address deployer, address target)\r\n internal\r\n pure\r\n returns (bytes memory clone)\r\n {\r\n bytes memory consData = abi.encodeWithSignature(\r\n \"cloneConstructor(bytes)\",\r\n new bytes(0)\r\n );\r\n clone = new bytes(99 + consData.length);\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n mstore(\r\n add(clone, 0x20),\r\n 0x3d3d606380380380913d393d73bebebebebebebebebebebebebebebebebebebe\r\n )\r\n mstore(\r\n add(clone, 0x2d),\r\n mul(deployer, 0x01000000000000000000000000)\r\n )\r\n mstore(\r\n add(clone, 0x41),\r\n 0x5af4602a57600080fd5b602d8060366000396000f3363d3d373d3d3d363d73be\r\n )\r\n mstore(add(clone, 0x60), mul(target, 0x01000000000000000000000000))\r\n mstore(\r\n add(clone, 116),\r\n 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000\r\n )\r\n }\r\n for (uint256 i = 0; i < consData.length; i++) {\r\n clone[i + 99] = consData[i];\r\n }\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(address target, bytes32 salt)\r\n internal\r\n view\r\n returns (address)\r\n {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(target))\r\n );\r\n }\r\n\r\n /**\r\n * @dev Calls Open Zeppelin's Create2.computeAddress() to get an address for the clone.\r\n */\r\n function deriveInstanceAddress(\r\n address from,\r\n address target,\r\n bytes32 salt\r\n ) internal pure returns (address) {\r\n return\r\n Create2.computeAddress(\r\n salt,\r\n keccak256(computeCreationCode(from, target)),\r\n from\r\n );\r\n }\r\n\r\n /**\r\n * @dev Computs creation code, and then instantiates it with create2.\r\n */\r\n function create2Clone(address target, uint256 saltNonce)\r\n internal\r\n returns (address result)\r\n {\r\n bytes memory clone = computeCreationCode(target);\r\n bytes32 salt = bytes32(saltNonce);\r\n\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n let len := mload(clone)\r\n let data := add(clone, 0x20)\r\n result := create2(0, data, len, salt)\r\n }\r\n\r\n require(result != address(0), \"ERR_CREATE2_FAIL\");\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IOptionFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IOptionFactory {\r\n function deployClone(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function initRedeemToken(address optionAddress, address redeemAddress)\r\n external;\r\n\r\n function deployOptionTemplate() external;\r\n\r\n function optionTemplate() external returns (address);\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n}\r\n" + }, + "contracts/option/applications/factories/RedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Factory Contract for Redeem Tokens.\r\n * @notice Uses cloning technology on a deployed template contract.\r\n * @author Primitive\r\n */\r\n\r\nimport { Redeem, SafeMath } from \"../../primitives/Redeem.sol\";\r\nimport { RedeemTemplateLib } from \"../../libraries/RedeemTemplateLib.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { CloneLib } from \"../../libraries/CloneLib.sol\";\r\nimport { NullCloneConstructor } from \"../NullCloneConstructor.sol\";\r\nimport { IRedeemFactory } from \"../../interfaces/IRedeemFactory.sol\";\r\n\r\ncontract RedeemFactory is IRedeemFactory, Ownable, NullCloneConstructor {\r\n using SafeMath for uint256;\r\n\r\n address public override redeemTemplate;\r\n\r\n constructor(address registry) public {\r\n transferOwnership(registry);\r\n }\r\n\r\n /**\r\n * @dev Deploys the full bytecode of the Redeem contract to be used as a template for clones.\r\n */\r\n function deployRedeemTemplate() public override {\r\n redeemTemplate = RedeemTemplateLib.deployTemplate();\r\n }\r\n\r\n /**\r\n * @dev Deploys a cloned instance of the template Redeem contract.\r\n * @param optionToken The address of the option token which this redeem clone will be paired with.\r\n * @return redeemAddress The address of the deployed Redeem token clone.\r\n */\r\n function deployClone(address optionToken)\r\n external\r\n override\r\n onlyOwner\r\n returns (address)\r\n {\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(\r\n RedeemTemplateLib.REDEEM_SALT(),\r\n owner(),\r\n optionToken\r\n )\r\n );\r\n address redeemAddress = CloneLib.create2Clone(\r\n redeemTemplate,\r\n uint256(salt)\r\n );\r\n Redeem(redeemAddress).initialize(owner(), optionToken);\r\n return redeemAddress;\r\n }\r\n}\r\n" + }, + "contracts/option/primitives/Redeem.sol": { + "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Redeem Token\r\n * @notice A token that is redeemable for it's paird option token's assets.\r\n * @author Primitive\r\n */\r\n\r\nimport { IRedeem } from \"../interfaces/IRedeem.sol\";\r\nimport { ERC20 } from \"./ERC20.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Redeem is IRedeem, ERC20 {\r\n using SafeMath for uint256;\r\n\r\n address public override factory;\r\n address public override optionToken;\r\n\r\n string public constant name = \"Primitive V1 Redeem\";\r\n string public constant symbol = \"RDM\";\r\n uint8 public constant decimals = 18;\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public {}\r\n\r\n /**\r\n * @dev Sets the initial state for the redeem token. Called only once and immediately after deployment.\r\n * @param factory_ The address of the factory contract which handles the deployment.\r\n * @param optionToken_ The address of the option token which this redeem token will be paired with.\r\n */\r\n function initialize(address factory_, address optionToken_)\r\n public\r\n override\r\n {\r\n require(factory == address(0x0), \"ERR_IS_INITIALIZED\");\r\n factory = factory_;\r\n optionToken = optionToken_;\r\n }\r\n\r\n /**\r\n * @dev Mints redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to mint redeem tokens to.\r\n * @param amount The quantity of redeem tokens to mint.\r\n */\r\n function mint(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _mint(to, amount);\r\n }\r\n\r\n /**\r\n * @dev Burns redeem tokens. Only callable by the paired option contract.\r\n * @param to The address to burn redeem tokens from.\r\n * @param amount The quantity of redeem tokens to burn.\r\n */\r\n function burn(address to, uint256 amount) external override {\r\n require(msg.sender == optionToken, \"ERR_NOT_VALID\");\r\n _burn(to, amount);\r\n }\r\n}\r\n" + }, + "contracts/option/libraries/RedeemTemplateLib.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\nimport { Create2 } from \"@openzeppelin/contracts/utils/Create2.sol\";\r\nimport { Redeem } from \"../primitives/Redeem.sol\";\r\n\r\nlibrary RedeemTemplateLib {\r\n // solhint-disable-next-line max-line-length\r\n bytes32\r\n private constant _REDEEM_SALT = 0xe7383acf78b06b8f24cfa7359d041702736fa6a58e63dd38afea80889c4636e2; // keccak(\"primitive-redeem\")\r\n\r\n // solhint-disable-next-line func-name-mixedcase\r\n function REDEEM_SALT() internal pure returns (bytes32) {\r\n return _REDEEM_SALT;\r\n }\r\n\r\n /**\r\n * @dev Deploys a clone of the deployed Redeem.sol contract.\r\n */\r\n function deployTemplate() external returns (address implementationAddress) {\r\n bytes memory creationCode = type(Redeem).creationCode;\r\n implementationAddress = Create2.deploy(0, _REDEEM_SALT, creationCode);\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRedeemFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRedeemFactory {\r\n function deployClone(address optionToken) external returns (address);\r\n\r\n function deployRedeemTemplate() external;\r\n\r\n function redeemTemplate() external returns (address);\r\n}\r\n" + }, + "contracts/option/applications/Registry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Protocol Registry Contract for Deployed Options.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { IRegistry } from \"../interfaces/IRegistry.sol\";\r\nimport { IOptionFactory } from \"../interfaces/IOptionFactory.sol\";\r\nimport { IRedeemFactory } from \"../interfaces/IRedeemFactory.sol\";\r\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport { Pausable } from \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\n\r\ncontract Registry is IRegistry, Ownable, Pausable, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address public override optionFactory;\r\n address public override redeemFactory;\r\n\r\n mapping(address => bool) private verifiedTokens;\r\n mapping(uint256 => bool) private verifiedExpiries;\r\n address[] public allOptionClones;\r\n\r\n event UpdatedOptionFactory(address indexed optionFactory_);\r\n event UpdatedRedeemFactory(address indexed redeemFactory_);\r\n event VerifiedToken(address indexed token);\r\n event VerifiedExpiry(uint256 expiry);\r\n event UnverifiedToken(address indexed token);\r\n event UnverifiedExpiry(uint256 expiry);\r\n event DeployedOptionClone(\r\n address indexed from,\r\n address indexed optionAddress,\r\n address indexed redeemAddress\r\n );\r\n\r\n constructor() public {\r\n transferOwnership(msg.sender);\r\n }\r\n\r\n /**\r\n * @dev Pauses the deployOption function.\r\n */\r\n function pauseDeployments() external override onlyOwner {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @dev Unpauses the deployOption function.\r\n */\r\n function unpauseDeployments() external override onlyOwner {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @dev Sets the option factory contract to use for deploying clones.\r\n * @param optionFactory_ The address of the option factory.\r\n */\r\n function setOptionFactory(address optionFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n optionFactory = optionFactory_;\r\n emit UpdatedOptionFactory(optionFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets the redeem factory contract to use for deploying clones.\r\n * @param redeemFactory_ The address of the redeem factory.\r\n */\r\n function setRedeemFactory(address redeemFactory_)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n redeemFactory = redeemFactory_;\r\n emit UpdatedRedeemFactory(redeemFactory_);\r\n }\r\n\r\n /**\r\n * @dev Sets an ERC-20 token verification status to true.\r\n * @notice A \"verified\" token is a standard ERC-20 token that we have tested with the option contract.\r\n * An example of an \"unverified\" token is a non-standard ERC-20 token which has not been tested.\r\n */\r\n function verifyToken(address tokenAddress) external override onlyOwner {\r\n require(tokenAddress != address(0x0), \"ERR_ZERO_ADDRESS\");\r\n verifiedTokens[tokenAddress] = true;\r\n emit VerifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets a verified token's verification status to false.\r\n */\r\n function unverifyToken(address tokenAddress) external override onlyOwner {\r\n verifiedTokens[tokenAddress] = false;\r\n emit UnverifiedToken(tokenAddress);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to true.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function verifyExpiry(uint256 expiry) external override onlyOwner {\r\n require(expiry >= now, \"ERR_EXPIRED_TIMESTAMP\");\r\n verifiedExpiries[expiry] = true;\r\n emit VerifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Sets an expiry timestamp's verification status to false.\r\n * @notice A mapping of standardized, \"verified\", timestamps for the options.\r\n */\r\n function unverifyExpiry(uint256 expiry) external override onlyOwner {\r\n verifiedExpiries[expiry] = false;\r\n emit UnverifiedExpiry(expiry);\r\n }\r\n\r\n /**\r\n * @dev Deploys an option contract clone with create2.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the deployed option clone.\r\n */\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external override nonReentrant whenNotPaused returns (address) {\r\n // Validation checks for option parameters.\r\n require(base > 0, \"ERR_BASE_ZERO\");\r\n require(quote > 0, \"ERR_QUOTE_ZERO\");\r\n require(expiry >= now, \"ERR_EXPIRY\");\r\n require(underlyingToken != strikeToken, \"ERR_SAME_ASSETS\");\r\n require(\r\n underlyingToken != address(0x0) && strikeToken != address(0x0),\r\n \"ERR_ZERO_ADDRESS\"\r\n );\r\n\r\n // Deploy option and redeem contract clones.\r\n address optionAddress = IOptionFactory(optionFactory).deployClone(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n address redeemAddress = IRedeemFactory(redeemFactory).deployClone(\r\n optionAddress\r\n );\r\n\r\n // Add the clone to the allOptionClones address array.\r\n allOptionClones.push(optionAddress);\r\n\r\n // Initialize the new option contract's paired redeem token.\r\n IOptionFactory(optionFactory).initRedeemToken(\r\n optionAddress,\r\n redeemAddress\r\n );\r\n emit DeployedOptionClone(msg.sender, optionAddress, redeemAddress);\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Calculates the option address deployed with create2 using the parameter arguments.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = IOptionFactory(optionFactory)\r\n .calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n return optionAddress;\r\n }\r\n\r\n /**\r\n * @dev Checks an option address to see if it has verified assets and expiry time.\r\n * @param optionAddress The address of the option token.\r\n * @return bool If the option has verified underlying and strike tokens, and expiry time.\r\n */\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n override\r\n view\r\n returns (bool)\r\n {\r\n IOption option = IOption(optionAddress);\r\n address underlyingToken = option.getUnderlyingTokenAddress();\r\n address strikeToken = option.getStrikeTokenAddress();\r\n uint256 expiry = option.getExpiryTime();\r\n bool verifiedUnderlying = isVerifiedToken(underlyingToken);\r\n bool verifiedStrike = isVerifiedToken(strikeToken);\r\n bool verifiedExpiry = isVerifiedExpiry(expiry);\r\n return verifiedUnderlying && verifiedStrike && verifiedExpiry;\r\n }\r\n\r\n /**\r\n * @dev Returns the length of the allOptionClones address array.\r\n */\r\n function getAllOptionClonesLength() public view returns (uint256) {\r\n return allOptionClones.length;\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedTokens private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedToken(address tokenAddress) public view returns (bool) {\r\n return verifiedTokens[tokenAddress];\r\n }\r\n\r\n /**\r\n * @dev Checks the verifiedExpiries private mapping and returns verification status of token.\r\n * @return bool Verified or not verified.\r\n */\r\n function isVerifiedExpiry(uint256 expiry) public view returns (bool) {\r\n return verifiedExpiries[expiry];\r\n }\r\n\r\n /**\r\n * @dev Gets the option address and returns address zero if not yet deployed.\r\n * @notice Will calculate the option address using the parameter arguments.\r\n * Checks the code size of the address to see if the contract has been deployed yet.\r\n * If contract has not been deployed, returns address zero.\r\n * @param underlyingToken The address of the ERC-20 underlying token.\r\n * @param strikeToken The address of the ERC-20 strike token.\r\n * @param base The quantity of underlying tokens per unit of quote amount of strike tokens.\r\n * @param quote The quantity of strike tokens per unit of base amount of underlying tokens.\r\n * @param expiry The unix timestamp of the option's expiration date.\r\n * @return The address of the option with the parameter arguments.\r\n */\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) public override view returns (address) {\r\n address optionAddress = calculateOptionAddress(\r\n underlyingToken,\r\n strikeToken,\r\n base,\r\n quote,\r\n expiry\r\n );\r\n uint32 size = checkCodeSize(optionAddress);\r\n if (size > 0) {\r\n return optionAddress;\r\n } else {\r\n return address(0x0);\r\n }\r\n }\r\n\r\n /**\r\n * @dev Checks the code size of a target address and returns the uint32 size.\r\n * @param target The address to check code size.\r\n */\r\n function checkCodeSize(address target) private view returns (uint32) {\r\n uint32 size;\r\n assembly {\r\n size := extcodesize(target)\r\n }\r\n return size;\r\n }\r\n}\r\n" + }, + "contracts/option/interfaces/IRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\ninterface IRegistry {\r\n function pauseDeployments() external;\r\n\r\n function unpauseDeployments() external;\r\n\r\n function deployOption(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external returns (address);\r\n\r\n function setOptionFactory(address optionFactory_) external;\r\n\r\n function setRedeemFactory(address redeemFactory_) external;\r\n\r\n function optionFactory() external returns (address);\r\n\r\n function redeemFactory() external returns (address);\r\n\r\n function verifyToken(address tokenAddress) external;\r\n\r\n function verifyExpiry(uint256 expiry) external;\r\n\r\n function unverifyToken(address tokenAddress) external;\r\n\r\n function unverifyExpiry(uint256 expiry) external;\r\n\r\n function calculateOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function getOptionAddress(\r\n address underlyingToken,\r\n address strikeToken,\r\n uint256 base,\r\n uint256 quote,\r\n uint256 expiry\r\n ) external view returns (address);\r\n\r\n function isVerifiedOption(address optionAddress)\r\n external\r\n view\r\n returns (bool);\r\n}\r\n" + }, + "@openzeppelin/contracts/utils/Pausable.sol": { + "content": "pragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\ncontract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor () internal {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n */\n modifier whenNotPaused() {\n require(!_paused, \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n */\n modifier whenPaused() {\n require(_paused, \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "contracts/option/extensions/Trader.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.6.2;\r\n\r\n/**\r\n * @title Trader\r\n * @notice Abstracts the interfacing with the protocol's option contract for ease-of-use.\r\n * @author Primitive\r\n */\r\n\r\nimport { IOption } from \"../interfaces/IOption.sol\";\r\nimport { ITrader } from \"../interfaces/ITrader.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport {\r\n ReentrancyGuard\r\n} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport { TraderLib } from \"../libraries/TraderLib.sol\";\r\n\r\ncontract Trader is ITrader, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n address payable public weth;\r\n\r\n event TraderMint(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outputOptions,\r\n uint256 outputRedeems\r\n );\r\n event TraderExercise(\r\n address indexed from,\r\n address indexed option,\r\n uint256 outUnderlyings,\r\n uint256 inStrikes\r\n );\r\n event TraderRedeem(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inRedeems\r\n );\r\n event TraderClose(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n event TraderUnwind(\r\n address indexed from,\r\n address indexed option,\r\n uint256 inOptions\r\n );\r\n\r\n constructor(address payable _weth) public {\r\n weth = _weth;\r\n }\r\n\r\n /**\r\n * @dev Mint options at a 1:1 ratio with deposited underlying tokens.\r\n * @notice Also mints redeems at a strike ratio to the deposited underlyings.\r\n * Warning: Calls msg.sender with safeTransferFrom.\r\n * @param optionToken The address of the option contract.\r\n * @param mintQuantity Quantity of options to mint and underlyingToken to deposit.\r\n * @param receiver The newly minted options and redeems are sent to the receiver address.\r\n */\r\n function safeMint(\r\n IOption optionToken,\r\n uint256 mintQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 outputOptions, uint256 outputRedeems) = TraderLib.safeMint(\r\n optionToken,\r\n mintQuantity,\r\n receiver\r\n );\r\n emit TraderMint(\r\n msg.sender,\r\n address(optionToken),\r\n outputOptions,\r\n outputRedeems\r\n );\r\n return (outputOptions, outputRedeems);\r\n }\r\n\r\n /**\r\n * @dev Swaps strikeTokens to underlyingTokens using the strike ratio as the exchange rate.\r\n * @notice Burns optionTokens, option contract receives strikeTokens, user receives underlyingTokens.\r\n * @param optionToken The address of the option contract.\r\n * @param exerciseQuantity Quantity of optionTokens to exercise.\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeExercise(\r\n IOption optionToken,\r\n uint256 exerciseQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256, uint256) {\r\n (uint256 inStrikes, uint256 inOptions) = TraderLib.safeExercise(\r\n optionToken,\r\n exerciseQuantity,\r\n receiver\r\n );\r\n emit TraderExercise(\r\n msg.sender,\r\n address(optionToken),\r\n exerciseQuantity,\r\n inStrikes\r\n );\r\n\r\n return (inStrikes, inOptions);\r\n }\r\n\r\n /**\r\n * @dev Burns redeemTokens to withdraw available strikeTokens.\r\n * @notice inRedeems = outStrikes.\r\n * @param optionToken The address of the option contract.\r\n * @param redeemQuantity redeemQuantity of redeemTokens to burn.\r\n * @param receiver The strikeTokens are sent to the receiver address.\r\n */\r\n function safeRedeem(\r\n IOption optionToken,\r\n uint256 redeemQuantity,\r\n address receiver\r\n ) external override nonReentrant returns (uint256) {\r\n uint256 inRedeems = TraderLib.safeRedeem(\r\n optionToken,\r\n redeemQuantity,\r\n receiver\r\n );\r\n emit TraderRedeem(msg.sender, address(optionToken), inRedeems);\r\n return inRedeems;\r\n }\r\n\r\n /**\r\n * @dev Burn optionTokens and redeemTokens to withdraw underlyingTokens.\r\n * @notice The redeemTokens to burn is equal to the optionTokens * strike ratio.\r\n * inOptions = inRedeems / strike ratio = outUnderlyings\r\n * @param optionToken The address of the option contract.\r\n * @param closeQuantity Quantity of optionTokens to burn.\r\n * (Implictly will burn the strike ratio quantity of redeemTokens).\r\n * @param receiver The underlyingTokens are sent to the receiver address.\r\n */\r\n function safeClose(\r\n IOption optionToken,\r\n uint256 closeQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeClose(optionToken, closeQuantity, receiver);\r\n emit TraderClose(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n\r\n /**\r\n * @dev Burn redeemTokens to withdraw underlyingTokens and strikeTokens from expired options.\r\n * @param optionToken The address of the option contract.\r\n * @param unwindQuantity Quantity of option tokens used to calculate the amount of redeem tokens to burn.\r\n * @param receiver The underlyingTokens and redeemTokens are sent to the receiver address.\r\n */\r\n function safeUnwind(\r\n IOption optionToken,\r\n uint256 unwindQuantity,\r\n address receiver\r\n )\r\n external\r\n override\r\n nonReentrant\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n (\r\n uint256 inRedeems,\r\n uint256 inOptions,\r\n uint256 outUnderlyings\r\n ) = TraderLib.safeUnwind(optionToken, unwindQuantity, receiver);\r\n emit TraderUnwind(msg.sender, address(optionToken), inOptions);\r\n return (inRedeems, inOptions, outUnderlyings);\r\n }\r\n}\r\n" + }, + "contracts/test/Flash.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Test Flash Exercise contract\r\n * @author Primitive\r\n */\r\n\r\n/**\r\n * A flash exercise is initiated by the exerciseOptions() function in the Option.sol contract.\r\n * Warning: Only correctly implemented wrapper smart contracts can safely execute these flash features.\r\n * Underlying tokens will be sent to the msg.sender of the exerciseOptions() call first.\r\n * The msg.sender should be a smart contract that implements the IFlash interface, which has a single\r\n * function: primitiveFlash().\r\n * The callback function primitiveFlash() can be triggered by passing in any arbritrary data to the\r\n * exerciseOptions() function. If the length of the data is greater than 0, it triggers the callback.\r\n * The implemented primitiveFlash() callback is where customized operations can be undertaken using the\r\n * underlying tokens received from the flash exercise.\r\n * After the callback function (whether its called or not), the exerciseOptions() function checks to see\r\n * if it has been paid the correct amount of strike and option tokens (an actual exercise of the option),\r\n * or if it has received the same quantity of underlying tokens back (a flash loan).\r\n */\r\n\r\nimport { IOption } from \"../option/interfaces/IOption.sol\";\r\nimport { IFlash } from \"../option/interfaces/IFlash.sol\";\r\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\n\r\ncontract Flash is IFlash {\r\n using SafeMath for uint256;\r\n\r\n address public optionToken;\r\n\r\n event FlashExercise(address indexed from);\r\n\r\n constructor(address _optionToken) public {\r\n optionToken = _optionToken;\r\n }\r\n\r\n function goodFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(1)\r\n );\r\n }\r\n\r\n function badFlashLoan(uint256 amount) external {\r\n // Call the exerciseOptions function and trigger the fallback function by passing in data\r\n // bytes(2) will cause our implemented flash exercise to fail\r\n IOption(optionToken).exerciseOptions(\r\n address(this),\r\n amount,\r\n new bytes(2)\r\n );\r\n }\r\n\r\n /**\r\n * @dev An implemented primitiveFlash callback function that matches the interface in Option.sol.\r\n * @notice Calling the exerciseOptions() function in the Option contract will trigger this callback function.\r\n * @param receiver The account which receives the underlying tokens.\r\n * @param outUnderlyings The quantity of underlying tokens received as a flash loan.\r\n * @param data Any data that will be passed as an argument to the original exerciseOptions() call.\r\n */\r\n function primitiveFlash(\r\n address receiver,\r\n uint256 outUnderlyings,\r\n bytes calldata data\r\n ) external override {\r\n // Get the underlying token address.\r\n address underlyingToken = IOption(optionToken)\r\n .getUnderlyingTokenAddress();\r\n // In our test case we pass in the data param with bytes(1).\r\n bool good = keccak256(abi.encodePacked(data)) ==\r\n keccak256(abi.encodePacked(new bytes(1)));\r\n // If the flash exercise went through, we return the loaned underlyings.\r\n if (good) {\r\n IERC20(underlyingToken).transfer(optionToken, outUnderlyings);\r\n }\r\n emit FlashExercise(receiver);\r\n }\r\n}\r\n" + }, + "contracts/test/OptionTest.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @title Option test contract.\r\n * @author Primitive\r\n */\r\n\r\nimport \"../option/primitives/Option.sol\";\r\n\r\ncontract OptionTest is Option {\r\n // solhint-disable-next-line no-empty-blocks\r\n constructor() public Option() {}\r\n\r\n function setExpiry(uint256 expiry) public {\r\n optionParameters.expiry = expiry;\r\n }\r\n\r\n function setRedeemToken(address redeem) public {\r\n redeemToken = redeem;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/BadERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/GSN/Context.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\ninterface IERC20 {\r\n function totalSupply() external view returns (uint256);\r\n\r\n function balanceOf(address account) external view returns (uint256);\r\n\r\n function transfer(address recipient, uint256 amount) external;\r\n\r\n function allowance(address owner, address spender)\r\n external\r\n view\r\n returns (uint256);\r\n\r\n function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) external;\r\n\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n event Approval(\r\n address indexed owner,\r\n address indexed spender,\r\n uint256 value\r\n );\r\n}\r\n\r\ncontract BadERC20 is Context, IERC20 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n mapping(address => uint256) private _balances;\r\n\r\n mapping(address => mapping(address => uint256)) private _allowances;\r\n\r\n uint256 private _totalSupply;\r\n\r\n string private _name;\r\n string private _symbol;\r\n uint8 private _decimals;\r\n\r\n constructor(string memory name, string memory symbol) public {\r\n _name = name;\r\n _symbol = symbol;\r\n _decimals = 18;\r\n }\r\n\r\n function name() public view returns (string memory) {\r\n return _name;\r\n }\r\n\r\n function symbol() public view returns (string memory) {\r\n return _symbol;\r\n }\r\n\r\n function decimals() public view returns (uint8) {\r\n return _decimals;\r\n }\r\n\r\n function totalSupply() public override view returns (uint256) {\r\n return _totalSupply;\r\n }\r\n\r\n function balanceOf(address account) public override view returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n function transfer(address recipient, uint256 amount)\r\n public\r\n virtual\r\n override\r\n {\r\n _transfer(_msgSender(), recipient, amount);\r\n }\r\n\r\n function allowance(address owner, address spender)\r\n public\r\n virtual\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n function mint(address account, uint256 amount) public {\r\n _mint(account, amount);\r\n }\r\n\r\n function approve(address spender, uint256 amount)\r\n public\r\n virtual\r\n override\r\n returns (bool)\r\n {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n function transferFrom(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) public virtual override {\r\n _transfer(sender, recipient, amount);\r\n _approve(\r\n sender,\r\n _msgSender(),\r\n _allowances[sender][_msgSender()].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds allowance\"\r\n )\r\n );\r\n }\r\n\r\n function increaseAllowance(address spender, uint256 addedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].add(addedValue)\r\n );\r\n return true;\r\n }\r\n\r\n function decreaseAllowance(address spender, uint256 subtractedValue)\r\n public\r\n virtual\r\n returns (bool)\r\n {\r\n _approve(\r\n _msgSender(),\r\n spender,\r\n _allowances[_msgSender()][spender].sub(\r\n subtractedValue,\r\n \"ERC20: decreased allowance below zero\"\r\n )\r\n );\r\n return true;\r\n }\r\n\r\n function _transfer(\r\n address sender,\r\n address recipient,\r\n uint256 amount\r\n ) internal virtual {\r\n require(sender != address(0), \"ERC20: transfer from the zero address\");\r\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n _beforeTokenTransfer(sender, recipient, amount);\r\n\r\n _balances[sender] = _balances[sender].sub(\r\n amount,\r\n \"ERC20: transfer amount exceeds balance\"\r\n );\r\n _balances[recipient] = _balances[recipient].add(amount);\r\n emit Transfer(sender, recipient, amount);\r\n }\r\n\r\n function _mint(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: mint to the zero address\");\r\n\r\n _beforeTokenTransfer(address(0), account, amount);\r\n\r\n _totalSupply = _totalSupply.add(amount);\r\n _balances[account] = _balances[account].add(amount);\r\n emit Transfer(address(0), account, amount);\r\n }\r\n\r\n function _burn(address account, uint256 amount) internal virtual {\r\n require(account != address(0), \"ERC20: burn from the zero address\");\r\n\r\n _beforeTokenTransfer(account, address(0), amount);\r\n\r\n _balances[account] = _balances[account].sub(\r\n amount,\r\n \"ERC20: burn amount exceeds balance\"\r\n );\r\n _totalSupply = _totalSupply.sub(amount);\r\n emit Transfer(account, address(0), amount);\r\n }\r\n\r\n function _approve(\r\n address owner,\r\n address spender,\r\n uint256 amount\r\n ) internal virtual {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n function _setupDecimals(uint8 decimals_) internal {\r\n _decimals = decimals_;\r\n }\r\n\r\n // solhint-disable-next-line no-empty-blocks\r\n function _beforeTokenTransfer(\r\n address from,\r\n address to,\r\n uint256 amount\r\n ) internal virtual {\r\n // do nothing\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract TestERC20 is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/USDC.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.2;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\r\n\r\ncontract USDC is ERC20 {\r\n constructor(\r\n string memory name,\r\n string memory symbol,\r\n uint256 initialSupply\r\n ) public ERC20(name, symbol) {\r\n _mint(msg.sender, initialSupply);\r\n }\r\n\r\n /**\r\n * @dev Function to mint tokens\r\n * @param to The address that will receive the minted tokens.\r\n * @param value The amount of tokens to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 value) public returns (bool) {\r\n _mint(to, value);\r\n return true;\r\n }\r\n}\r\n" + }, + "contracts/test/tokens/WETH9.sol": { + "content": "// SPDX-License-Identifier: MIT\r\n\r\n// Copyright (C) 2015, 2016, 2017 Dapphub\r\n\r\n// This program is free software: you can redistribute it and/or modify\r\n// it under the terms of the GNU General Public License as published by\r\n// the Free Software Foundation, either version 3 of the License, or\r\n// (at your option) any later version.\r\n\r\n// This program is distributed in the hope that it will be useful,\r\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n// GNU General Public License for more details.\r\n\r\n// You should have received a copy of the GNU General Public License\r\n// along with this program. If not, see .\r\n\r\npragma solidity ^0.6.2;\r\n\r\ncontract WETH9 {\r\n string public name = \"Wrapped Ether\";\r\n string public symbol = \"WETH\";\r\n uint8 public decimals = 18;\r\n\r\n event Approval(address indexed src, address indexed guy, uint256 wad);\r\n event Transfer(address indexed src, address indexed dst, uint256 wad);\r\n event Deposit(address indexed dst, uint256 wad);\r\n event Withdrawal(address indexed src, uint256 wad);\r\n\r\n mapping(address => uint256) public balanceOf;\r\n mapping(address => mapping(address => uint256)) public allowance;\r\n\r\n /* function() external payable {\r\n deposit();\r\n } */\r\n function deposit() public payable {\r\n balanceOf[msg.sender] += msg.value;\r\n emit Deposit(msg.sender, msg.value);\r\n }\r\n\r\n function withdraw(uint256 wad) public {\r\n require(balanceOf[msg.sender] >= wad);\r\n balanceOf[msg.sender] -= wad;\r\n msg.sender.transfer(wad);\r\n emit Withdrawal(msg.sender, wad);\r\n }\r\n\r\n function totalSupply() public view returns (uint256) {\r\n return address(this).balance;\r\n }\r\n\r\n function approve(address guy, uint256 wad) public returns (bool) {\r\n allowance[msg.sender][guy] = wad;\r\n emit Approval(msg.sender, guy, wad);\r\n return true;\r\n }\r\n\r\n function transfer(address dst, uint256 wad) public returns (bool) {\r\n return transferFrom(msg.sender, dst, wad);\r\n }\r\n\r\n function transferFrom(\r\n address src,\r\n address dst,\r\n uint256 wad\r\n ) public returns (bool) {\r\n require(balanceOf[src] >= wad);\r\n\r\n if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) {\r\n require(allowance[src][msg.sender] >= wad);\r\n allowance[src][msg.sender] -= wad;\r\n }\r\n\r\n balanceOf[src] -= wad;\r\n balanceOf[dst] += wad;\r\n\r\n emit Transfer(src, dst, wad);\r\n\r\n return true;\r\n }\r\n}\r\n\r\n/*\r\n GNU GENERAL PUBLIC LICENSE\r\n Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. \r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n Preamble\r\n\r\n The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works. By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users. We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors. You can apply it to\r\nyour programs, too.\r\n\r\n When we speak of free software, we are referring to freedom, not\r\nprice. Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights. Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received. You must make sure that they, too, receive\r\nor can get the source code. And you must show them these terms so they\r\nknow their rights.\r\n\r\n Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software. For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so. This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software. The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable. Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts. If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary. To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n TERMS AND CONDITIONS\r\n\r\n 0. Definitions.\r\n\r\n \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n \"The Program\" refers to any copyrightable work licensed under this\r\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy. The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy. Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies. Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License. If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n 1. Source Code.\r\n\r\n The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it. \"Object code\" means any non-source\r\nform of a work.\r\n\r\n A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form. A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities. However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work. For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n 2. Basic Permissions.\r\n\r\n All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met. This License explicitly affirms your unlimited\r\npermission to run the unmodified Program. The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work. This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force. You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright. Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below. Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n 4. Conveying Verbatim Copies.\r\n\r\n You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n 5. Conveying Modified Source Versions.\r\n\r\n You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n a) The work must carry prominent notices stating that you modified\r\n it, and giving a relevant date.\r\n\r\n b) The work must carry prominent notices stating that it is\r\n released under this License and any conditions added under section\r\n 7. This requirement modifies the requirement in section 4 to\r\n \"keep intact all notices\".\r\n\r\n c) You must license the entire work, as a whole, under this\r\n License to anyone who comes into possession of a copy. This\r\n License will therefore apply, along with any applicable section 7\r\n additional terms, to the whole of the work, and all its parts,\r\n regardless of how they are packaged. This License gives no\r\n permission to license the work in any other way, but it does not\r\n invalidate such permission if you have separately received it.\r\n\r\n d) If the work has interactive user interfaces, each must display\r\n Appropriate Legal Notices; however, if the Program has interactive\r\n interfaces that do not display Appropriate Legal Notices, your\r\n work need not make them do so.\r\n\r\n A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit. Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n 6. Conveying Non-Source Forms.\r\n\r\n You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n a) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by the\r\n Corresponding Source fixed on a durable physical medium\r\n customarily used for software interchange.\r\n\r\n b) Convey the object code in, or embodied in, a physical product\r\n (including a physical distribution medium), accompanied by a\r\n written offer, valid for at least three years and valid for as\r\n long as you offer spare parts or customer support for that product\r\n model, to give anyone who possesses the object code either (1) a\r\n copy of the Corresponding Source for all the software in the\r\n product that is covered by this License, on a durable physical\r\n medium customarily used for software interchange, for a price no\r\n more than your reasonable cost of physically performing this\r\n conveying of source, or (2) access to copy the\r\n Corresponding Source from a network server at no charge.\r\n\r\n c) Convey individual copies of the object code with a copy of the\r\n written offer to provide the Corresponding Source. This\r\n alternative is allowed only occasionally and noncommercially, and\r\n only if you received the object code with such an offer, in accord\r\n with subsection 6b.\r\n\r\n d) Convey the object code by offering access from a designated\r\n place (gratis or for a charge), and offer equivalent access to the\r\n Corresponding Source in the same way through the same place at no\r\n further charge. You need not require recipients to copy the\r\n Corresponding Source along with the object code. If the place to\r\n copy the object code is a network server, the Corresponding Source\r\n may be on a different server (operated by you or a third party)\r\n that supports equivalent copying facilities, provided you maintain\r\n clear directions next to the object code saying where to find the\r\n Corresponding Source. Regardless of what server hosts the\r\n Corresponding Source, you remain obligated to ensure that it is\r\n available for as long as needed to satisfy these requirements.\r\n\r\n e) Convey the object code using peer-to-peer transmission, provided\r\n you inform other peers where the object code and Corresponding\r\n Source of the work are being offered to the general public at no\r\n charge under subsection 6d.\r\n\r\n A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling. In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage. For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product. A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source. The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information. But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed. Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n 7. Additional Terms.\r\n\r\n \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law. If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit. (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.) You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n a) Disclaiming warranty or limiting liability differently from the\r\n terms of sections 15 and 16 of this License; or\r\n\r\n b) Requiring preservation of specified reasonable legal notices or\r\n author attributions in that material or in the Appropriate Legal\r\n Notices displayed by works containing it; or\r\n\r\n c) Prohibiting misrepresentation of the origin of that material, or\r\n requiring that modified versions of such material be marked in\r\n reasonable ways as different from the original version; or\r\n\r\n d) Limiting the use for publicity purposes of names of licensors or\r\n authors of the material; or\r\n\r\n e) Declining to grant rights under trademark law for use of some\r\n trade names, trademarks, or service marks; or\r\n\r\n f) Requiring indemnification of licensors and authors of that\r\n material by anyone who conveys the material (or modified versions of\r\n it) with contractual assumptions of liability to the recipient, for\r\n any liability that these contractual assumptions directly impose on\r\n those licensors and authors.\r\n\r\n All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10. If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term. If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n 8. Termination.\r\n\r\n You may not propagate or modify a covered work except as expressly\r\nprovided under this License. Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License. If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n 9. Acceptance Not Required for Having Copies.\r\n\r\n You are not required to accept this License in order to receive or\r\nrun a copy of the Program. Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance. However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work. These actions infringe copyright if you do\r\nnot accept this License. Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n 10. Automatic Licensing of Downstream Recipients.\r\n\r\n Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License. You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations. If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License. For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n 11. Patents.\r\n\r\n A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based. The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version. For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement). To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients. \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License. You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n 12. No Surrender of Others' Freedom.\r\n\r\n If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License. If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all. For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n 13. Use with the GNU Affero General Public License.\r\n\r\n Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work. The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n 14. Revised Versions of this License.\r\n\r\n The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time. Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n Each version is given a distinguishing version number. If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation. If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n Later license versions may give you additional or different\r\npermissions. However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n 15. Disclaimer of Warranty.\r\n\r\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n 16. Limitation of Liability.\r\n\r\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n 17. Interpretation of Sections 15 and 16.\r\n\r\n If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n END OF TERMS AND CONDITIONS\r\n\r\n How to Apply These Terms to Your New Programs\r\n\r\n If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n To do so, attach the following notices to the program. It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n \r\n Copyright (C) \r\n\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU General Public License as published by\r\n the Free Software Foundation, either version 3 of the License, or\r\n (at your option) any later version.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n GNU General Public License for more details.\r\n\r\n You should have received a copy of the GNU General Public License\r\n along with this program. If not, see .\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n Copyright (C) \r\n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n This is free software, and you are welcome to redistribute it\r\n under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License. Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n.\r\n\r\n The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs. If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library. If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License. But first, please read\r\n.\r\n\r\n*/\r\n" + } + }, + "settings": { + "metadata": { + "useLiteralContent": false + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "id", + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/package.json b/package.json index 7c03d73a..9cdf0a92 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,9 @@ "test:local": "cross-env buidler test --network local ./test/test_trader.js ./test/test_option.js ./test/test_flash.js", "deploy:local": "cross-env buidler deploy --network local", "deploy:rinkeby": "cross-env buidler deploy --network rinkeby", - "deploy:mainnet": "cross-env buidler deploy --network live --tags Core", + "deploy-periphery:rinkeby": "cross-env buidler deploy --network rinkeby --tags Periphery", + "deploy-core:rinkeby": "cross-env buidler deploy --network rinkeby --tags Core", + "deploy:mainnet": "cross-env buidler deploy --network live --tags Core Periphery", "deploy-options:rinkeby": "cross-env buidler run ./scripts/deploy_options.js --network rinkeby", "deploy-options:mainnet": "cross-env buidler run ./scripts/deploy_options.js --network live", "deploy-pairs:rinkeby": "cross-env buidler run ./scripts/deploy_uniswap_pairs.js --network rinkeby", diff --git a/scripts/verify.js b/scripts/verify.js index 7dfa1a2c..9c1ebc1d 100644 --- a/scripts/verify.js +++ b/scripts/verify.js @@ -110,12 +110,29 @@ const verifyTrader = async () => { * @dev Verifies the Trader and UniswapTrader contracts. */ const verifyWethConnnector = async () => { - let WethConnector = await deployments.get("WethConnector"); + let WethConnector01 = await deployments.get("WethConnector01"); try { await verifyContract( UNISWAP_TRADER, - WethConnector.address, - WethConnector.args, + WethConnector01.address, + WethConnector01.args, + {} + ); + } catch (err) { + console.error(err); + } +}; + +/** + * @dev Verifies the Trader and UniswapTrader contracts. + */ +const verifyWethConnnector01 = async () => { + let WethConnector01 = await deployments.get("WethConnector01"); + try { + await verifyContract( + UNISWAP_TRADER, + WethConnector01.address, + WethConnector01.args, {} ); } catch (err) { @@ -140,6 +157,23 @@ const verifyUniswapConnector = async () => { } }; +/** + * @dev Verifies the Trader and UniswapTrader contracts. + */ +const verifyUniswapConnector02 = async () => { + let UniswapConnector02 = await deployments.get("UniswapConnector02"); + try { + await verifyContract( + UNISWAP_TRADER, + UniswapConnector02.address, + UniswapConnector02.args, + {} + ); + } catch (err) { + console.error(err); + } +}; + /** * @dev Verifies the template addresses which will be cloned. These are the canonical * Option and Redeem contracts effectively. @@ -181,6 +215,9 @@ async function main() { await verifyTrader(); await verifyTemplates(); await verifyUniswapConnector(); + await verifyUniswapConnector02(); + await verifyWethConnnector(); + await verifyWethConnnector01(); } main()